Skip to content

Commit

Permalink
fix invoke for commands without options
Browse files Browse the repository at this point in the history
  • Loading branch information
BobDotCom committed Aug 30, 2021
1 parent 7215811 commit 6601e1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def __eq__(self, other):
)

async def invoke(self, interaction):
args = (o['value'] for o in interaction.data['options'])
args = (o['value'] for o in interaction.data.get('options', []))
ctx = InteractionContext(interaction)
await self.callback(ctx, *args)

Expand Down

0 comments on commit 6601e1b

Please sign in to comment.