10BC0 prevent cache getting stuck. · Snaacky/chiya@d4daf95 · GitHub
[go: up one dir, main page]

Skip to content

Commit d4daf95

Browse files
committed
prevent cache getting stuck.
1 parent 3294423 commit d4daf95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

chiya/cogs/listeners/joyboard.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,10 @@ async def on_raw_reaction_add(self, payload: discord.RawReactionActionEvent) ->
8282

8383
if (
8484
not self.check_emoji(payload.emoji, payload.guild_id)
85-
or cache_data in self.cache["remove"]
85+
or cache_data in self.cache["add"]
8686
):
8787
return
8888

89-
self.cache["remove"].add(cache_data)
90-
9189
channel = self.bot.get_channel(payload.channel_id)
9290

9391
if (
@@ -96,6 +94,8 @@ async def on_raw_reaction_add(self, payload: discord.RawReactionActionEvent) ->
9694
):
9795
return
9896

97+
self.cache["add"].add(cache_data)
98+
9999
channel = self.bot.get_channel(payload.channel_id)
100100
message = await channel.fetch_message(payload.message_id)
101101
joy_count = await self.get_joy_count(message)

0 commit comments

Comments
 (0)
0