discord.command_group() does not work.
TheDevFreak opened this issue · 2 comments
TheDevFreak commented
According to the documentation syntax like the following can be used:
comic = discord.command_group("comic")
@comic.command()
def xkcd(ctx, number: int):
return f"https://xkcd.com/{number}/"
However doing this results in the following in the logs:
AttributeError: 'SlashCommandGroup' object has no attribute 'default_permission'
if discord.update_slash_commands()
is being used
breqdev commented
Looks like this bug was introduced here, as the permissions registration code assumes that all Commands will have a permissions array.
I've pushed a new release, v1.0.1, that should resolve this issue. pip3 install Flask-Discord-Interactions=1.0.1
should download this new version.
TheDevFreak commented
Can confirm the issue is fixed. 👍