Skip to content

Commit

Permalink
Fix 'Unknown Message' error
Browse files Browse the repository at this point in the history
SylteA committed Mar 4, 2024
1 parent 1e8694a commit 02d5df6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bot/extensions/polls/events.py
Original file line number Diff line number Diff line change
@@ -14,7 +14,11 @@ def __init__(self, bot: core.DiscordBot):
@commands.Cog.listener()
async def on_raw_reaction_add(self, payload: discord.RawReactionActionEvent):
channel: discord.TextChannel = self.bot.get_channel(payload.channel_id)
message: discord.Message = await channel.fetch_message(payload.message_id)

try:
message: discord.Message = await channel.fetch_message(payload.message_id)
except discord.NotFound:
return

if payload.user_id == self.bot.user.id:
return

0 comments on commit 02d5df6

Please sign in to comment.