mirror of
https://github.com/hencaric/SCNewsBot.git
synced 2026-08-16 22:46:03 +01:00
turn bot version into a constant
This commit is contained in:
@@ -3,6 +3,7 @@ from discord.ext import commands
|
|||||||
import discord
|
import discord
|
||||||
from utils import Config
|
from utils import Config
|
||||||
|
|
||||||
|
VERSION = "0.0.0"
|
||||||
INTENTS = discord.Intents.default()
|
INTENTS = discord.Intents.default()
|
||||||
INTENTS.message_content = True
|
INTENTS.message_content = True
|
||||||
INTENTS.members = True
|
INTENTS.members = True
|
||||||
@@ -17,6 +18,7 @@ class Bot(commands.Bot):
|
|||||||
case_insensitive=True,
|
case_insensitive=True,
|
||||||
)
|
)
|
||||||
self.config = config
|
self.config = config
|
||||||
|
self.version = VERSION
|
||||||
|
|
||||||
async def setup_hook(self) -> None:
|
async def setup_hook(self) -> None:
|
||||||
for extension in self.config.extensions:
|
for extension in self.config.extensions:
|
||||||
@@ -42,7 +44,7 @@ class CoreCog(commands.Cog, name="Core"):
|
|||||||
color=self.bot.config.embed_color,
|
color=self.bot.config.embed_color,
|
||||||
description="SCNewsBot is a Discord bot created for the r/starcitizen\n Discord server to help with writing news posts.",
|
description="SCNewsBot is a Discord bot created for the r/starcitizen\n Discord server to help with writing news posts.",
|
||||||
)
|
)
|
||||||
embed.add_field(name="Version", value=f"v0.0.0+{self._get_version()}")
|
embed.add_field(name="Version", value=f"v{self.bot.version}+{self._get_version()}")
|
||||||
embed.add_field(
|
embed.add_field(
|
||||||
name="Library", value=f"discord.py v{discord.__version__}", inline=False
|
name="Library", value=f"discord.py v{discord.__version__}", inline=False
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user