We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cf035b commit ef301fcCopy full SHA for ef301fc
discord/commands/core.py
@@ -864,8 +864,8 @@ async def _invoke(self, ctx: ApplicationContext) -> None:
864
arg = op._raw_type(int(arg))
865
except ValueError:
866
arg = op._raw_type(arg)
867
- else:
868
- arg = op._raw_type(arg)
+ elif choice := find(lambda c: c.value == arg, op.choices):
+ arg = getattr(op._raw_type, choice.name)
869
870
kwargs[op._parameter_name] = arg
871
0 commit comments