Skip to content

Commit

Permalink
Fix not syncing global commands
Browse files Browse the repository at this point in the history
  • Loading branch information
SeoulSKY committed Jan 17, 2024
1 parent a6c53e2 commit 071950e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,14 @@ def _add_commands(self):
continue

# noinspection PyArgumentList
self.tree.add_command(group_command_class(bot=self), guild=TEST_GUILD)
self.tree.add_command(group_command_class(bot=self))

async def setup_hook(self):
await self.tree.sync(guild=TEST_GUILD)
if TEST_GUILD is not None:
self.tree.copy_global_to(guild=TEST_GUILD)
await self.tree.sync(guild=TEST_GUILD)
else:
await self.tree.sync()


bot = SoruSora()
Expand Down

0 comments on commit 071950e

Please sign in to comment.