bug: command syncing fix
fixes command sync when adding bot to a server
This commit is contained in:
2
run.py
2
run.py
@@ -36,6 +36,8 @@ class Bot(commands.Bot):
|
|||||||
async def on_guild_join(self, guild):
|
async def on_guild_join(self, guild):
|
||||||
print(f"Joined guild {guild.name}")
|
print(f"Joined guild {guild.name}")
|
||||||
print(f"Syncing commands to {guild.name}")
|
print(f"Syncing commands to {guild.name}")
|
||||||
|
self.tree.copy_global_to(guild=guild)
|
||||||
|
await self.tree.sync(guild=guild)
|
||||||
|
|
||||||
async def setup_hook(self):
|
async def setup_hook(self):
|
||||||
print("Loading media server connectors")
|
print("Loading media server connectors")
|
||||||
|
|||||||
Reference in New Issue
Block a user