Skip to content

Commit c830b9c

Browse files
committed
Improved cmd syncing
1 parent 7b85a6f commit c830b9c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

grace/bot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ async def sync_commands(self) -> None:
5050

5151
if guild_id := self.config.get("guild_id"):
5252
guild = DiscordObject(id=guild_id)
53+
self.tree.copy_global_to(guild=guild)
5354
await self.tree.sync(guild=guild)
5455

5556
async def invoke(self, ctx):
@@ -90,11 +91,11 @@ async def on_reload(self):
9091
await self.unload_extension(module)
9192
await self.load_extension(module)
9293

93-
def run(self) -> None: # type: ignore[override]
94+
def run(self, **kwargs) -> None: # type: ignore[override]
9495
"""Override the `run` method to handle the token retrieval"""
9596
try:
9697
if self.app.token:
97-
super().run(self.app.token)
98+
super().run(self.app.token, **kwargs)
9899
else:
99100
critical(
100101
"Unable to find the token. Make sure your current"

0 commit comments

Comments
 (0)