Adding return to make sure the function stops

Making sure that the check is correctly called
pull/8/head
sgoudham 4 years ago
parent f4f57053b9
commit 3e571c5c1f

@ -151,13 +151,14 @@ class Modmail(commands.Cog):
@commands.Cog.listener() @commands.Cog.listener()
async def on_raw_reaction_add(self, payload): async def on_raw_reaction_add(self, payload):
self.anon = None self.anon = None
m = payload.member
# A check that makes sure that the reaction is done by the bot # A check that makes sure that the reaction is done by the bot
def check(m): def check(m):
return m == self.bot.user return m == self.bot.user
# If the member is not a user, do nothing # If the member is not a user, do nothing
if not check: if check(m):
return return
else: else:
# Find a role corresponding to the Emoji name. # Find a role corresponding to the Emoji name.

Loading…
Cancel
Save