Skip to content

Commit

Permalink
fix: command is not synced and not interacted (#59)
Browse files Browse the repository at this point in the history
* fix(tree): interaction_check return None

Signed-off-by: Ryu Juheon <saidbysolo@gmail.com>

* fix(client): copy global command to server

* deps(poetry): fix lock file

---------

Signed-off-by: Ryu Juheon <saidbysolo@gmail.com>
  • Loading branch information
SaidBySolo authored Apr 17, 2024
1 parent 64dd7c5 commit 2394692
Show file tree
Hide file tree
Showing 3 changed files with 850 additions and 868 deletions.
5 changes: 3 additions & 2 deletions crenata/application/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ async def closeup(self) -> None:
async def setup_hook(self) -> None:
if self.config.PRODUCTION:
await self.tree.sync()

else:
await self.tree.sync(guild=Object(self.config.TEST_GUILD_ID))
test_guild = Object(self.config.TEST_GUILD_ID)
self.tree.copy_global_to(guild=test_guild)
await self.tree.sync(guild=test_guild)

async def close(self) -> None:
await self.closeup()
Expand Down
3 changes: 0 additions & 3 deletions crenata/application/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,3 @@ async def on_error(
self, interaction: Interaction[ClientT], error: AppCommandError
) -> None:
await self.error_handler.on_error(interaction, error)

async def interaction_check(self, interaction: Interaction[ClientT]) -> bool:
...
Loading

0 comments on commit 2394692

Please sign in to comment.