diff --git a/red_star/client.py b/red_star/client.py index 158efd8..f6259ff 100644 --- a/red_star/client.py +++ b/red_star/client.py @@ -2,6 +2,7 @@ from asyncio import create_task, sleep from datetime import datetime from discord import AutoShardedClient, DMChannel +from discord.object import Object from discord.utils import oauth_url from pathlib import Path from sys import exc_info @@ -109,6 +110,15 @@ async def on_reaction_add(self, reaction, user): return await self.plugin_manager.hook_event("on_reaction_add", reaction, user) + async def on_raw_reaction_add(self, payload): + if payload.channel_id is not None \ + and self.channel_manager.channel_in_category( + Object(payload.guild_id), + "no_read", + Object(payload.channel_id)): + return + await self.plugin_manager.hook_event("on_raw_reaction_add", payload) + async def on_reaction_remove(self, reaction, user): if reaction.message.guild is None: return @@ -116,6 +126,15 @@ async def on_reaction_remove(self, reaction, user): return await self.plugin_manager.hook_event("on_reaction_remove", reaction, user) + async def on_raw_reaction_remove(self, payload): + if payload.channel_id is not None \ + and self.channel_manager.channel_in_category( + Object(payload.guild_id), + "no_read", + Object(payload.channel_id)): + return + await self.plugin_manager.hook_event("on_raw_reaction_remove", payload) + async def on_reaction_clear(self, message, reactions): if message.guild is None: return