|
|
|
@ -142,7 +142,7 @@ def SendMsgToModMail(self, msg, author):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Set up the Cog
|
|
|
|
|
class Modmail(commands.Cog):
|
|
|
|
|
class modmail(commands.Cog):
|
|
|
|
|
def __init__(self, bot):
|
|
|
|
|
self.bot = bot
|
|
|
|
|
self.anon = None
|
|
|
|
@ -150,17 +150,10 @@ class Modmail(commands.Cog):
|
|
|
|
|
# Setting up Listener to listen for reactions within the modmail channel created
|
|
|
|
|
@commands.Cog.listener()
|
|
|
|
|
async def on_raw_reaction_add(self, payload):
|
|
|
|
|
self.anon = None
|
|
|
|
|
m = payload.member
|
|
|
|
|
|
|
|
|
|
# A check that makes sure that the reaction is done by the bot
|
|
|
|
|
def check(m):
|
|
|
|
|
return m == self.bot.user
|
|
|
|
|
|
|
|
|
|
# If the member is not a user, do nothing
|
|
|
|
|
if check(m):
|
|
|
|
|
# Don't count reactions that are made by the bot
|
|
|
|
|
if payload.user_id == self.bot.user.id:
|
|
|
|
|
return
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
|
|
# Find a role corresponding to the Emoji name.
|
|
|
|
|
guildid = payload.guild_id
|
|
|
|
|
|
|
|
|
@ -373,4 +366,4 @@ class Modmail(commands.Cog):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def setup(bot):
|
|
|
|
|
bot.add_cog(Modmail(bot))
|
|
|
|
|
bot.add_cog(modmail(bot))
|
|
|
|
|