mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Fix KeyError for cached messages from deleted channels in Streams
* Merge pull request #5031 * Fix KeyError for cached messages from deleted channels in Streams
This commit is contained in:
parent
01f86091ab
commit
9b66d19369
@ -80,8 +80,10 @@ class Stream:
|
|||||||
channel = guild and guild.get_channel(msg_data["channel"])
|
channel = guild and guild.get_channel(msg_data["channel"])
|
||||||
else:
|
else:
|
||||||
channel = self._bot.get_channel(msg_data["channel"])
|
channel = self._bot.get_channel(msg_data["channel"])
|
||||||
if channel is not None:
|
|
||||||
data["partial_message"] = channel.get_partial_message(data["message"])
|
data["partial_message"] = (
|
||||||
|
channel.get_partial_message(data["message"]) if channel is not None else None
|
||||||
|
)
|
||||||
yield data
|
yield data
|
||||||
|
|
||||||
def export(self):
|
def export(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user