mirror of
				https://github.com/Rapptz/discord.py.git
				synced 2025-10-30 21:12:58 +00:00 
			
		
		
		
	[types] Fix application command choice typings
This commit is contained in:
		| @@ -26,8 +26,8 @@ from __future__ import annotations | |||||||
|  |  | ||||||
| from typing import List, Literal, TypedDict, Union | from typing import List, Literal, TypedDict, Union | ||||||
|  |  | ||||||
| from discord.types.channel import ChannelType | from .channel import ChannelType | ||||||
| from discord.types.snowflake import Snowflake | from .snowflake import Snowflake | ||||||
|  |  | ||||||
| ApplicationCommandType = Literal[1, 2, 3] | ApplicationCommandType = Literal[1, 2, 3] | ||||||
| ApplicationCommandOptionType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] | ApplicationCommandOptionType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] | ||||||
| @@ -52,7 +52,7 @@ class _BaseValueApplicationCommandOption(_BaseApplicationCommandOption, total=Fa | |||||||
|     required: bool |     required: bool | ||||||
|  |  | ||||||
|  |  | ||||||
| class _StringApplicationCommandOptionChoice(TypedDict, total=False): | class _StringApplicationCommandOptionChoice(TypedDict): | ||||||
|     name: str |     name: str | ||||||
|     value: str |     value: str | ||||||
|  |  | ||||||
| @@ -66,7 +66,7 @@ class _StringApplicationCommandOption(_StringApplicationCommandOptionOptional): | |||||||
|     type: Literal[3] |     type: Literal[3] | ||||||
|  |  | ||||||
|  |  | ||||||
| class _IntegerApplicationCommandOptionChoice(TypedDict, total=False): | class _IntegerApplicationCommandOptionChoice(TypedDict): | ||||||
|     name: str |     name: str | ||||||
|     value: int |     value: int | ||||||
|  |  | ||||||
| @@ -104,7 +104,7 @@ _SnowflakeApplicationCommandOptionChoice = Union[ | |||||||
| ] | ] | ||||||
|  |  | ||||||
|  |  | ||||||
| class _NumberApplicationCommandOptionChoice(TypedDict, total=False): | class _NumberApplicationCommandOptionChoice(TypedDict): | ||||||
|     name: str |     name: str | ||||||
|     value: float |     value: float | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user