Browse Source

Allow single element Literal in app commands

Fix #7690
pull/7691/head
Rapptz 3 years ago
parent
commit
f0a47f5a40
  1. 3
      discord/app_commands/transformers.py

3
discord/app_commands/transformers.py

@ -267,9 +267,6 @@ def _make_range_transformer(
def _make_literal_transformer(values: Tuple[Any, ...]) -> Type[Transformer]:
if len(values) < 2:
raise TypeError(f'typing.Literal requires at least two values.')
first = type(values[0])
if first is int:
opt_type = AppCommandOptionType.integer

Loading…
Cancel
Save