Fix some type hints in interactions
This commit is contained in:
parent
2ad2cab50c
commit
d42c63e186
@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
from typing import Optional, TYPE_CHECKING
|
from typing import Optional, TYPE_CHECKING, Tuple, Union
|
||||||
|
|
||||||
from . import utils
|
from . import utils
|
||||||
from .enums import try_enum, InteractionType
|
from .enums import try_enum, InteractionType
|
||||||
@ -77,7 +77,7 @@ class Interaction:
|
|||||||
for 15 minutes.
|
for 15 minutes.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__slots__: Tuple[str, ...] = (
|
||||||
'id',
|
'id',
|
||||||
'type',
|
'type',
|
||||||
'guild_id',
|
'guild_id',
|
||||||
@ -112,6 +112,7 @@ class Interaction:
|
|||||||
self.message = None
|
self.message = None
|
||||||
|
|
||||||
self.user: Optional[Union[User, Member]] = None
|
self.user: Optional[Union[User, Member]] = None
|
||||||
|
|
||||||
# TODO: there's a potential data loss here
|
# TODO: there's a potential data loss here
|
||||||
if self.guild_id:
|
if self.guild_id:
|
||||||
guild = self.guild or Object(id=self.guild_id)
|
guild = self.guild or Object(id=self.guild_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user