Skip to content

Commit

Permalink
Bump hikari version and fix global commands not working
Browse files Browse the repository at this point in the history
  • Loading branch information
tandemdude committed May 1, 2024
1 parent 7a3177a commit 4dd78ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lightbulb/client.py
Expand Up @@ -482,9 +482,12 @@ def _resolve_options_and_command(
command_path.append(subcommand.name)
options = subcommand.options

root_commands = self._commands.get(interaction.guild_id or constants.GLOBAL_COMMAND_KEY, {}).get(
global_commands = self._commands.get(constants.GLOBAL_COMMAND_KEY, {}).get(interaction.command_name)
guild_commands = self._commands.get(interaction.guild_id or constants.GLOBAL_COMMAND_KEY, {}).get(
interaction.command_name
)
# TODO - fix this when hikari adds the guild_id from interaction data to the model
root_commands = guild_commands or global_commands
if root_commands is None:
LOGGER.debug("ignoring interaction received for unknown command - %r", interaction.command_name)
return
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -25,7 +25,7 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = ["hikari>=2.0.0.dev122, <3", "svcs>=23.21.0, <24"]
dependencies = ["hikari>=2.0.0.dev125, <3", "svcs>=23.21.0, <24"]
dynamic = ["version", "description"]

[project.urls]
Expand Down

0 comments on commit 4dd78ff

Please sign in to comment.