diff options
| author | Rapptz <[email protected]> | 2021-04-29 23:20:14 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-05-27 00:53:14 -0400 |
| commit | d42c63e186aa33751d69e7735c3084216b761860 (patch) | |
| tree | ac1018d10ed3ac37fb90a9dcaf2d712a37b164f9 /discord/interactions.py | |
| parent | [Interactions] Create User only when in DMs (diff) | |
| download | discord.py-d42c63e186aa33751d69e7735c3084216b761860.tar.xz discord.py-d42c63e186aa33751d69e7735c3084216b761860.zip | |
Fix some type hints in interactions
Diffstat (limited to 'discord/interactions.py')
| -rw-r--r-- | discord/interactions.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/discord/interactions.py b/discord/interactions.py index e8d8f799..d9d9cd8a 100644 --- a/discord/interactions.py +++ b/discord/interactions.py @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. """ from __future__ import annotations -from typing import Optional, TYPE_CHECKING +from typing import Optional, TYPE_CHECKING, Tuple, Union from . import utils from .enums import try_enum, InteractionType @@ -77,7 +77,7 @@ class Interaction: for 15 minutes. """ - __slots__ = ( + __slots__: Tuple[str, ...] = ( 'id', 'type', 'guild_id', @@ -112,6 +112,7 @@ class Interaction: self.message = None self.user: Optional[Union[User, Member]] = None + # TODO: there's a potential data loss here if self.guild_id: guild = self.guild or Object(id=self.guild_id) |