Skip to content

Commit 82494ad

Browse files
authored
Add more checks for reaction add.
1 parent 0d02e79 commit 82494ad

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,8 @@ async def on_raw_reaction_add(self, payload):
677677
if not self.config.get('disable_recipient_thread_close'):
678678
await thread.close(closer=user)
679679
elif not isinstance(channel, discord.DMChannel):
680+
if not message.embeds:
681+
return
680682
message_id = str(message.embeds[0].author.url).split('/')[-1]
681683
if message_id.isdigit():
682684
thread = await self.threads.find(channel=message.channel)

0 commit comments

Comments
 (0)