Skip to content

Commit

Permalink
Fix potential issue with joyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapppa authored and qLunar committed Sep 29, 2023
1 parent 0150b5a commit bc262e9
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions chiya/cogs/listeners/joyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,6 @@ async def on_raw_reaction_add(self, payload: discord.RawReactionActionEvent) ->
):
return

channel = self.bot.get_channel(payload.channel_id)

if (
channel.is_nsfw()
or payload.channel_id in config["channels"]["joyboard"]["blacklisted"]
):
return

self.cache["add"].add(cache_data)

channel = self.bot.get_channel(payload.channel_id)
message = await channel.fetch_message(payload.message_id)
joy_count = await self.get_joy_count(message)
Expand All @@ -108,6 +98,8 @@ async def on_raw_reaction_add(self, payload: discord.RawReactionActionEvent) ->
):
return

self.cache["add"].add(cache_data)

joyboard_channel = discord.utils.get(
message.guild.channels,
id=config["channels"]["joyboard"]["channel_id"]
Expand Down

0 comments on commit bc262e9

Please sign in to comment.