Skip to content

Commit

Permalink
fix: Ignore non-messageable channels
Browse files Browse the repository at this point in the history
  • Loading branch information
jkriste committed Jul 25, 2024
1 parent 2a386df commit 524726c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ClemBot.Bot/bot/services/emote_board_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ async def on_reaction_add(self, event: RawReactionActionEvent) -> None:
assert guild is not None

channel = guild.get_channel_or_thread(event.channel_id)
assert channel is not None and isinstance(channel, discord.abc.Messageable)
assert channel is not None

if not isinstance(channel, discord.abc.MessageableChannel):
return

message = await channel.fetch_message(event.message_id)

Expand Down

0 comments on commit 524726c

Please sign in to comment.