mirror of
https://github.com/hencaric/SCNewsBot.git
synced 2026-08-16 22:46:03 +01:00
v1.0.3
This commit is contained in:
@@ -1,15 +1,11 @@
|
||||
> [!WARNING]
|
||||
> As of December 2023, this project does not work with Python 3.12.
|
||||
> Please use Python 3.11 until all dependencies are updated to support it.
|
||||
|
||||
# scnewsbot
|
||||
A bot for the r/starcitizen Discord server.
|
||||
|
||||
## Installation
|
||||
1. Make sure you have installed [Python](https://python.org) (>=3.11), [Git](https://git-scm.org), and [Poetry](https://pypi.org/project/poetry).
|
||||
1. Make sure you have installed [Python](https://python.org) (>=3.12), [Git](https://git-scm.org), and [Poetry](https://pypi.org/project/poetry).
|
||||
2. Clone the repository to your hard drive. (`git clone https://github.com/mudkipdev/scnewsbot`)
|
||||
3. Run `cd scnewsbot` and `poetry install` to install the required dependencies.
|
||||
4. Copy the `example.config.toml` and `example.env` files to `config.toml` and `.env` respectively.
|
||||
5. Edit the config files to your liking, then run the bot using `poetry run python scnewsbot` (This might also be `py`, `python3` or `python3.11` depending on your operating system).
|
||||
5. Edit the config files to your liking, then run the bot using `poetry run python scnewsbot` (This might also be `py`, `python3` or `python3.12` depending on your operating system).
|
||||
|
||||

|
||||
|
||||
1337
poetry.lock
generated
1337
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "scnewsbot"
|
||||
version = "1.0.2"
|
||||
version = "1.0.3"
|
||||
description = "A bot for the r/starcitizen Discord server."
|
||||
authors = ["mudkipdev <mudkip@mudkip.dev>"]
|
||||
license = "MIT"
|
||||
@@ -10,13 +10,13 @@ packages = [
|
||||
]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.11"
|
||||
discord-py = "^2.2.2"
|
||||
jishaku = "^2.5.1"
|
||||
python-dotenv = "^1.0.0"
|
||||
python = "^3.12"
|
||||
discord-py = "^2.3.2"
|
||||
jishaku = "^2.5.2"
|
||||
python-dotenv = "^1.0.1"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
black = "^23.3.0"
|
||||
black = "^24.3.0"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
|
||||
@@ -3,7 +3,7 @@ from discord.ext import commands
|
||||
import discord
|
||||
from utils import Config
|
||||
|
||||
VERSION = "1.0.2"
|
||||
VERSION = "1.0.3"
|
||||
INTENTS = discord.Intents.default()
|
||||
INTENTS.message_content = True
|
||||
INTENTS.members = True
|
||||
|
||||
@@ -496,7 +496,10 @@ class AnnouncementBuilderView(discord.ui.View):
|
||||
)
|
||||
|
||||
if self.announcement_builder.edit:
|
||||
await interaction.response.send_message("Your announcement was edited! 🎉")
|
||||
await interaction.response.send_message(
|
||||
f"Your announcement was edited! 🎉"
|
||||
+ f" ({self.announcement_builder.message.jump_url})"
|
||||
)
|
||||
self.stop()
|
||||
|
||||
embed = await self.announcement_builder.get_embed(bot=interaction.client)
|
||||
@@ -527,9 +530,6 @@ class AnnouncementBuilderView(discord.ui.View):
|
||||
)
|
||||
return
|
||||
|
||||
await interaction.response.send_message(
|
||||
"Your announcement was posted! 🎉 https://i.imgur.com/HRoxTzg.gif"
|
||||
)
|
||||
self.stop()
|
||||
|
||||
bot = interaction.client
|
||||
@@ -542,6 +542,11 @@ class AnnouncementBuilderView(discord.ui.View):
|
||||
)
|
||||
await message.add_reaction(ANNOUNCEMENT_EMOJI)
|
||||
|
||||
await interaction.response.send_message(
|
||||
f"Your announcement was posted! 🎉 ({message.jump_url})"
|
||||
+ "\nhttps://i.imgur.com/HRoxTzg.gif"
|
||||
)
|
||||
|
||||
for channel_id in bot.config.repost_channels:
|
||||
repost_channel = await bot.fetch_channel(channel_id)
|
||||
|
||||
@@ -586,9 +591,11 @@ class ChangeOptionModal(discord.ui.Modal):
|
||||
label=self.option.name,
|
||||
required=self.option.id in ("title", "channel"),
|
||||
placeholder=self.option.directions,
|
||||
style=discord.TextStyle.long
|
||||
if self.option.is_long
|
||||
else discord.TextStyle.short,
|
||||
style=(
|
||||
discord.TextStyle.long
|
||||
if self.option.is_long
|
||||
else discord.TextStyle.short
|
||||
),
|
||||
)
|
||||
self.add_item(self.option_input)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user