mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 10:22:59 +00:00
Add support for default_values field on selects
This commit is contained in:
@ -69,6 +69,7 @@ __all__ = (
|
||||
'AutoModRuleActionType',
|
||||
'ForumLayoutType',
|
||||
'ForumOrderType',
|
||||
'SelectDefaultValueType',
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@ -772,6 +773,12 @@ class ForumOrderType(Enum):
|
||||
creation_date = 1
|
||||
|
||||
|
||||
class SelectDefaultValueType(Enum):
|
||||
user = 'user'
|
||||
role = 'role'
|
||||
channel = 'channel'
|
||||
|
||||
|
||||
def create_unknown_value(cls: Type[E], val: Any) -> E:
|
||||
value_cls = cls._enum_value_cls_ # type: ignore # This is narrowed below
|
||||
name = f'unknown_{val}'
|
||||
|
Reference in New Issue
Block a user