mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 17:36:15 +00:00
Type up gateway payloads
This commit is contained in:
@ -59,6 +59,7 @@ if TYPE_CHECKING:
|
||||
Member as MemberPayload,
|
||||
UserWithMember as UserWithMemberPayload,
|
||||
)
|
||||
from .types.gateway import GuildMemberUpdateEvent
|
||||
from .types.user import User as UserPayload
|
||||
from .abc import Snowflake
|
||||
from .state import ConnectionState
|
||||
@ -372,7 +373,7 @@ class Member(discord.abc.Messageable, _UserTag):
|
||||
ch = await self.create_dm()
|
||||
return ch
|
||||
|
||||
def _update(self, data: MemberPayload) -> None:
|
||||
def _update(self, data: GuildMemberUpdateEvent) -> None:
|
||||
# the nickname change is optional,
|
||||
# if it isn't in the payload then it didn't change
|
||||
try:
|
||||
|
Reference in New Issue
Block a user