Add ability to set a flag description. #99

Merged
Soheab merged 5 commits from flags_option_description into 2.0 2021-10-16 12:27:02 +00:00
2 changed files with 27 additions and 5 deletions
Showing only changes of commit 46b00f0d4a - Show all commits

View File

@ -1294,7 +1294,11 @@ class Command(_BaseCommand, Generic[CogT, P, T]):
elif all([arg in application_option_channel_types for arg in annotation.__args__]):
option["type"] = 7
option["channel_types"] = [discord_value for arg in annotation.__args__ for discord_value in application_option_channel_types[arg]]
option["channel_types"] = [
discord_value
for arg in annotation.__args__
for discord_value in application_option_channel_types[arg]
]
elif origin is Literal:
literal_values = annotation.__args__