make game activity configurable

This commit is contained in:
Denis-Cosmin Nutiu 2024-01-26 19:50:48 +02:00
parent 940b580745
commit 587092ddfe
2 changed files with 4 additions and 1 deletions

View file

@ -63,6 +63,7 @@ class DiscordSettings(BaseModel):
Holds all the settings needed to configure the bot for Discord usage. Holds all the settings needed to configure the bot for Discord usage.
""" """
game_name: str = Field(default="RPG")
token: str = Field() token: str = Field()
command_prefix: str = Field(default=".") command_prefix: str = Field(default=".")

View file

@ -6,7 +6,9 @@ from src.bot.discord.bot import NucuBot
def main(): def main():
settings = Settings() settings = Settings()
bot = NucuBot.create(command_prefix=settings.discord.command_prefix) bot = NucuBot.create(
command_prefix=settings.discord.command_prefix, game_name=settings.game_name
)
bot.run(settings.discord.token) bot.run(settings.discord.token)