Format with black
This commit is contained in:
@@ -1044,7 +1044,9 @@ class Option(Generic[T, DT]): # type: ignore
|
|||||||
"name",
|
"name",
|
||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self, default: T = inspect.Parameter.empty, *, description: DT, name: str = discord.utils.MISSING) -> None:
|
def __init__(
|
||||||
|
self, default: T = inspect.Parameter.empty, *, description: DT, name: str = discord.utils.MISSING
|
||||||
|
) -> None:
|
||||||
self.description = description
|
self.description = description
|
||||||
self.default = default
|
self.default = default
|
||||||
self.name: str = name
|
self.name: str = name
|
||||||
|
@@ -1288,7 +1288,11 @@ class Command(_BaseCommand, Generic[CogT, P, T]):
|
|||||||
|
|
||||||
elif all([arg in application_option_channel_types for arg in annotation.__args__]):
|
elif all([arg in application_option_channel_types for arg in annotation.__args__]):
|
||||||
option["type"] = 7
|
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:
|
elif origin is Literal:
|
||||||
literal_values = annotation.__args__
|
literal_values = annotation.__args__
|
||||||
|
Reference in New Issue
Block a user