Set Message.guild from guild_id if unavailable through Message.channel

This commit is contained in:
Lilly Rose Berner
2021-06-29 01:03:59 +02:00
committed by GitHub
parent e96df33ce0
commit 6b1d46a1ea
2 changed files with 11 additions and 13 deletions

View File

@ -1277,7 +1277,7 @@ class AutoShardedConnectionState(ConnectionState):
if new_guild is not None and new_guild is not msg.guild:
channel_id = msg.channel.id
channel = new_guild.get_channel(channel_id) or new_guild.get_thread(channel_id) or Object(id=channel_id)
msg._rebind_channel_reference(channel)
msg._rebind_cached_references(new_guild, channel)
async def chunker(self, guild_id, query='', limit=0, presences=False, *, shard_id=None, nonce=None):
ws = self._get_websocket(guild_id, shard_id=shard_id)