aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-05-04 21:50:15 -0400
committerRapptz <[email protected]>2021-05-27 00:53:14 -0400
commitc89882441c337ac0924b4e27411ff74c9b885e89 (patch)
tree73f2776ddc3406e55c62104b0d0fe9dd723a8b04
parentOnly automatically defer if no response was given in callback (diff)
downloaddiscord.py-c89882441c337ac0924b4e27411ff74c9b885e89.tar.xz
discord.py-c89882441c337ac0924b4e27411ff74c9b885e89.zip
Fix typings for resolved channels in slash commands
-rw-r--r--discord/types/interactions.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/discord/types/interactions.py b/discord/types/interactions.py
index dabc77c9..7657c797 100644
--- a/discord/types/interactions.py
+++ b/discord/types/interactions.py
@@ -27,8 +27,8 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Dict, TypedDict, Union, List, Literal
from .snowflake import Snowflake
from .components import ComponentType
-from .channel import PartialChannel
from .embed import Embed
+from .channel import ChannelType
from .member import Member
from .role import Role
from .user import User
@@ -100,11 +100,18 @@ class ApplicationCommandInteractionDataOption(_ApplicationCommandInteractionData
type: ApplicationCommandOptionType
+class ApplicationCommandResolvedPartialChannel(TypedDict):
+ id: Snowflake
+ type: ChannelType
+ permissions: str
+ name: str
+
+
class ApplicationCommandInteractionDataResolved(TypedDict, total=False):
users: Dict[Snowflake, User]
members: Dict[Snowflake, Member]
roles: Dict[Snowflake, Role]
- channels: Dict[Snowflake, PartialChannel]
+ channels: Dict[Snowflake, ApplicationCommandResolvedPartialChannel]
class _ApplicationCommandInteractionDataOptional(TypedDict, total=False):