Skip to content

Commit

Permalink
Fix bridge command detection in cogs (#1592)
Browse files Browse the repository at this point in the history
Use updated method to retrieve command variants
  • Loading branch information
BobDotCom authored Aug 25, 2022
1 parent d6b91cf commit 0a928be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions discord/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ def __new__(cls: Type[CogMeta], *args: Any, **kwargs: Any) -> CogMeta:
if elem.startswith(("cog_", "bot_")):
raise TypeError(no_bot_cog.format(base, elem))

commands[f"ext_{elem}"] = value.get_ext_command()
commands[f"application_{elem}"] = value.get_application_command()
commands[f"ext_{elem}"] = value.ext_variant
commands[f"application_{elem}"] = value.slash_variant
except AttributeError:
# we are confident that the value is not a Bridge Command
pass
Expand Down

0 comments on commit 0a928be

Please sign in to comment.