mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-19 04:24:41 +00:00
Reorganise documentation for interactions
This commit is contained in:
@@ -60,6 +60,8 @@ __all__ = (
|
||||
'Locale',
|
||||
'EntityType',
|
||||
'EventStatus',
|
||||
'AppCommandType',
|
||||
'AppCommandOptionType',
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -655,6 +657,26 @@ class EventStatus(Enum):
|
||||
cancelled = 4
|
||||
|
||||
|
||||
class AppCommandOptionType(Enum):
|
||||
subcommand = 1
|
||||
subcommand_group = 2
|
||||
string = 3
|
||||
integer = 4
|
||||
boolean = 5
|
||||
user = 6
|
||||
channel = 7
|
||||
role = 8
|
||||
mentionable = 9
|
||||
number = 10
|
||||
attachment = 11
|
||||
|
||||
|
||||
class AppCommandType(Enum):
|
||||
chat_input = 1
|
||||
user = 2
|
||||
message = 3
|
||||
|
||||
|
||||
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