mirror of
https://github.com/kurbezz/discord-bot.git
synced 2025-12-06 15:15:37 +01:00
Fix
This commit is contained in:
@@ -19,15 +19,16 @@ class DiscordClient(discord.Client):
|
|||||||
|
|
||||||
self.tree = app_commands.CommandTree(self)
|
self.tree = app_commands.CommandTree(self)
|
||||||
|
|
||||||
|
async def setup_hook(self):
|
||||||
|
self.tree.copy_global_to(guild=Object(id=config.DISCORD_GUILD_ID))
|
||||||
|
await self.tree.sync(guild=Object(id=config.DISCORD_GUILD_ID))
|
||||||
|
|
||||||
async def on_ready(self):
|
async def on_ready(self):
|
||||||
await self.change_presence(
|
await self.change_presence(
|
||||||
activity=discord.Game(config.DISCORD_BOT_ACTIVITY),
|
activity=discord.Game(config.DISCORD_BOT_ACTIVITY),
|
||||||
status=discord.Status.online,
|
status=discord.Status.online,
|
||||||
)
|
)
|
||||||
|
|
||||||
self.tree.copy_global_to(guild=Object(id=config.DISCORD_GUILD_ID))
|
|
||||||
await self.tree.sync(guild=Object(id=config.DISCORD_GUILD_ID))
|
|
||||||
|
|
||||||
|
|
||||||
client = DiscordClient()
|
client = DiscordClient()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user