add game activity

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

View file

@ -1,3 +1,4 @@
discord:
game_name: "Pathfinder 2E"
command_prefix: "."
token: <your discord token>

View file

@ -12,9 +12,13 @@ class NucuBot(bot.Bot):
self._logger = logging.getLogger(__name__)
@staticmethod
def create(command_prefix: str = ".") -> "NucuBot":
def create(command_prefix: str = ".", game_name: str = "RPG") -> "NucuBot":
intents = disnake.Intents.all()
discord_bot = NucuBot(intents=intents, command_prefix=command_prefix)
discord_bot = NucuBot(
intents=intents,
command_prefix=command_prefix,
activity=disnake.Game(name=game_name),
)
discord_bot.add_cog(DiceCog(discord_bot))
return discord_bot