diff --git a/meowth/exts/huntr.py b/meowth/exts/huntr.py index cafe0de5d..8db263412 100644 --- a/meowth/exts/huntr.py +++ b/meowth/exts/huntr.py @@ -132,7 +132,7 @@ async def on_raw_reaction_add(self, payload): pokealarm_dict = copy.deepcopy(ctx.bot.guild_dict[channel.guild.id].get('pokealarm_dict', {})) pokehuntr_dict = copy.deepcopy(ctx.bot.guild_dict[channel.guild.id].get('pokehuntr_dict', {})) raid_cog = self.bot.cogs.get('Raid') - if message.id in pokealarm_dict.keys() and not user.bot: + if raid_cog and message.id in pokealarm_dict.keys() and not user.bot: if str(payload.emoji) == self.bot.custom_emoji.get('huntr_report', u'\U00002705'): await self.on_pokealarm(ctx, user) elif str(payload.emoji) == self.bot.custom_emoji.get('raid_maybe', u'\U00002753'): @@ -164,7 +164,7 @@ async def on_raw_reaction_add(self, payload): await ctx.invoke(self.bot.get_command("list pokealarms"), type="pokealarm") await asyncio.sleep(5) await utils.safe_reaction(message, payload.emoji) - elif message.id in pokehuntr_dict.keys() and not user.bot: + elif raid_cog and message.id in pokehuntr_dict.keys() and not user.bot: if str(payload.emoji) == self.bot.custom_emoji.get('huntr_report', u'\U00002705'): await self.on_huntr(ctx, user) elif str(payload.emoji) == self.bot.custom_emoji.get('raid_maybe', u'\U00002753'): diff --git a/meowth/exts/raid.py b/meowth/exts/raid.py index cca5c1e49..304e3f0ed 100644 --- a/meowth/exts/raid.py +++ b/meowth/exts/raid.py @@ -3300,7 +3300,7 @@ def check(reaction, user): if reaction.message.id == question.id and (reaction.emoji == yes_emoji or reaction.emoji == no_emoji): if reaction.emoji == yes_emoji and user in manager_list and user != ctx.guild.me: return True - if reaction.emoji == no_emoji: + if reaction.emoji == no_emoji and user != ctx.guild.me: return True return False question = await ctx.send(f"Meowth! {ctx.author.mention} nominates {member.mention} as a train leader! {manager_str}All others can object with {no_emoji}. If nobody objects with {no_emoji} in 60 seconds, {member.display_name} will be added as a train manager.") @@ -3315,6 +3315,7 @@ def check(reaction, user): if timeout or reaction.emoji == no_emoji: return await ctx.send(f"Meowth! The vote for {member.display_name} has failed.", delete_after=10) else: + self.bot.guild_dict[ctx.guild.id]['raidtrain_dict'][ctx.channel.id]['managers'].append(member.id) await ctx.send(f"Meowth! I added **{member.display_name}** as a manager! {member.mention}, check your DMs for instructions!") return await member.send(embed=manager_embed, delete_after=3600) else: