Check for PrivateChannel before GuildChannel in Client.get_channel
This commit is contained in:
parent
29f676c42e
commit
f6fcb62c7b
@ -734,15 +734,15 @@ class ConnectionState:
|
||||
if id is None:
|
||||
return None
|
||||
|
||||
pm = self._get_private_channel(id)
|
||||
if pm is not None:
|
||||
return pm
|
||||
|
||||
for guild in self.guilds:
|
||||
channel = guild.get_channel(id)
|
||||
if channel is not None:
|
||||
return channel
|
||||
|
||||
pm = self._get_private_channel(id)
|
||||
if pm is not None:
|
||||
return pm
|
||||
|
||||
def create_message(self, *, channel, data):
|
||||
return Message(state=self, channel=channel, data=data)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user