parent
2c7a855e11
commit
351bb1927a
@ -819,7 +819,7 @@ class ConnectionState:
|
||||
user_id = utils._get_as_snowflake(data, 'user_id')
|
||||
if isinstance(channel, DMChannel):
|
||||
member = channel.recipient
|
||||
elif isinstance(channel, TextChannel):
|
||||
elif isinstance(channel, TextChannel) and guild is not None:
|
||||
member = guild.get_member(user_id)
|
||||
elif isinstance(channel, GroupChannel):
|
||||
member = utils.find(lambda x: x.id == user_id, channel.recipients)
|
||||
|
Loading…
x
Reference in New Issue
Block a user