|
47 | 47 |
|
48 | 48 |
|
49 | 49 | class ApplicationCommand(TypedDict):
|
50 |
| - options: NotRequired[list[ApplicationCommandOption]] |
51 |
| - type: NotRequired[ApplicationCommandType] |
52 |
| - name_localized: NotRequired[str] |
53 |
| - name_localizations: NotRequired[dict[str, str]] |
54 |
| - description_localized: NotRequired[str] |
55 |
| - description_localizations: NotRequired[dict[str, str]] |
56 | 50 | id: Snowflake
|
| 51 | + type: NotRequired[ApplicationCommandType] |
57 | 52 | application_id: Snowflake
|
| 53 | + guild_id: NotRequired[Snowflake] |
58 | 54 | name: str
|
| 55 | + name_localizations: NotRequired[dict[str, str] | None] |
59 | 56 | description: str
|
| 57 | + description_localizations: NotRequired[dict[str, str] | None] |
| 58 | + options: NotRequired[list[ApplicationCommandOption]] |
| 59 | + default_member_permissions: str | None |
| 60 | + dm_permission: NotRequired[bool] |
| 61 | + default_permission: NotRequired[bool | None] |
| 62 | + nsfw: NotRequired[bool] |
| 63 | + version: Snowflake |
60 | 64 |
|
61 | 65 |
|
62 | 66 | ApplicationCommandOptionType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
63 | 67 |
|
64 | 68 |
|
65 | 69 | class ApplicationCommandOption(TypedDict):
|
66 |
| - choices: NotRequired[list[ApplicationCommandOptionChoice]] |
67 |
| - options: NotRequired[list[ApplicationCommandOption]] |
68 |
| - name_localizations: NotRequired[dict[str, str]] |
69 |
| - description_localizations: NotRequired[dict[str, str]] |
70 | 70 | type: ApplicationCommandOptionType
|
71 | 71 | name: str
|
| 72 | + name_localizations: NotRequired[dict[str, str] | None] |
72 | 73 | description: str
|
| 74 | + description_localizations: NotRequired[dict[str, str] | None] |
73 | 75 | required: bool
|
| 76 | + options: NotRequired[list[ApplicationCommandOption]] |
| 77 | + choices: NotRequired[list[ApplicationCommandOptionChoice]] |
| 78 | + channel_types: NotRequired[list[ChannelType]] |
| 79 | + min_value: NotRequired[int | float] |
| 80 | + max_value: NotRequired[int | float] |
| 81 | + min_length: NotRequired[int] |
| 82 | + max_length: NotRequired[int] |
| 83 | + autocomplete: NotRequired[bool] |
74 | 84 |
|
75 | 85 |
|
76 | 86 | class ApplicationCommandOptionChoice(TypedDict):
|
77 |
| - name_localizations: NotRequired[dict[str, str]] |
78 | 87 | name: str
|
| 88 | + name_localizations: NotRequired[dict[str, str] | None] |
79 | 89 | value: str | int
|
80 | 90 |
|
81 | 91 |
|
|
0 commit comments