aboutsummaryrefslogtreecommitdiff
path: root/discord/message.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-07-23 00:17:22 -0400
committerRapptz <[email protected]>2020-07-25 09:59:40 -0400
commitec3c3eb4c68e8f4ae9f09d51d530cc33add7bef8 (patch)
treea1a69dc468c549770a09c0af106ec38c3db30d01 /discord/message.py
parentAdd guild_ready_timeout to control the timeout of GUILD_CREATE stream (diff)
downloaddiscord.py-ec3c3eb4c68e8f4ae9f09d51d530cc33add7bef8.tar.xz
discord.py-ec3c3eb4c68e8f4ae9f09d51d530cc33add7bef8.zip
Update message references in AutoShardedConnectionState
Fixes #5133
Diffstat (limited to 'discord/message.py')
-rw-r--r--discord/message.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/discord/message.py b/discord/message.py
index 5b4d79cb..a09c2d73 100644
--- a/discord/message.py
+++ b/discord/message.py
@@ -524,6 +524,14 @@ class Message:
call['participants'] = participants
self.call = CallMessage(message=self, **call)
+ def _rebind_channel_reference(self, new_channel):
+ self.channel = new_channel
+
+ try:
+ del self._cs_guild
+ except AttributeError:
+ pass
+
@utils.cached_slot_property('_cs_guild')
def guild(self):
"""Optional[:class:`Guild`]: The guild that the message belongs to, if applicable."""