Reorganise documentation for interactions

This commit is contained in:
Rapptz committed 2022-03-04 21:17:27 -05:00
1 parent 41f2792ed9
commit aa74238053
14 files changed
+628 -410

No files matched your search

+22
View File
@@ -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}'