sherpaBot/SherpaBot.py
async def on_raw_reaction_remove(self, payload):
        """harder to remove than add a role, to do"""
        if payload.user_id == self.bot.user.id or payload.message_id == self.bot.user.id:  # check if user that reacted is not sherpaBot and that the message isn't from sherpaBot
            return
        if not (payload.guild_id in self.channels.reaction_channel and
                self.channels.reaction_channel[payload.guild_id].id == payload.channel_id):
            return
        if payload.message_id in Constants.GUIDELINES_MSG_ID and payload.emoji == Constants.emoji:
            guild = None
            for guild in self.bot.guilds:
                if guild == payload.guild_id:
                    break
            if guild is None:
                return
            member_ = guild.get_member(payload.user_id)
            role = discord.utils.get(member_.guild.roles, name=Constants.ROLE_TO_VIEW)
            await member_.remove_roles(role)
        return
harder to remove than add a role, to do
harder to remove than add a role, to do
harder to remove than add a role to do
async def on_raw_reaction_remove(self, payload):
        if payload.user_id == self.bot.user.id or payload.message_id == self.bot.user.id:  
            return
        if not (payload.guild_id in self.channels.reaction_channel and
                self.channels.reaction_channel[payload.guild_id].id == payload.channel_id):
            return
        if payload.message_id in Constants.GUIDELINES_MSG_ID and payload.emoji == Constants.emoji:
            guild = None
            for guild in self.bot.guilds:
                if guild == payload.guild_id:
                    break
            if guild is None:
                return
            member_ = guild.get_member(payload.user_id)
            role = discord.utils.get(member_.guild.roles, name=Constants.ROLE_TO_VIEW)
            await member_.remove_roles(role)
        return
async def on_raw_reaction_remove ( self , payload ) : if payload . user_id == self . bot . user . id or payload . message_id == self . bot . user . id : return if not ( payload . guild_id in self . channels . reaction_channel and self . channels . reaction_channel [ payload . guild_id ] . id == payload . channel_id ) : return if payload . message_id in Constants . GUIDELINES_MSG_ID and payload . emoji == Constants . emoji : guild = None for guild in self . bot . guilds : if guild == payload . guild_id : break if guild is None : return member_ = guild . get_member ( payload . user_id ) role = discord . utils . get ( member_ . guild . roles , name = Constants . ROLE_TO_VIEW ) await member_ . remove_roles ( role ) return
harder to remove than add a role, to do
harder to remove than add a role to do
"""harder to remove than add a role, to do""" # check if user that reacted is not sherpaBot and that the message isn't from sherpaBot
self
payload