mirror of
https://github.com/TotalFreedomMC/TotalFreedomBot.git
synced 2024-12-22 15:44:57 +00:00
Update main.py
This commit is contained in:
parent
e88c1e674e
commit
c573bacc50
1 changed files with 3 additions and 3 deletions
6
main.py
6
main.py
|
@ -73,7 +73,7 @@ async def on_raw_reaction_add(payload):
|
|||
else:
|
||||
for role_id, msg_id, emoji in bot.reaction_roles:
|
||||
if msg_id == payload.message_id and emoji == str(payload.emoji.name.encode('utf-8')):
|
||||
await payload.member.add_roles(bot.get_guild(payload.guild_id).get_role(role_id))
|
||||
await payload.member.add_roles(bot.get_guild(payload.guild_id).get_role(role_id), reason='reaction')
|
||||
|
||||
@bot.event
|
||||
async def on_raw_reaction_remove(payload):
|
||||
|
@ -82,7 +82,7 @@ async def on_raw_reaction_remove(payload):
|
|||
else:
|
||||
for role_id, msg_id, emoji in bot.reaction_roles:
|
||||
if msg_id == payload.message_id and emoji == str(payload.emoji.name.encode('utf-8')):
|
||||
await bot.get_guild(payload.guild_id).get_member(payload.user_id).remove_roles(bot.get_guild(payload.guild_id).get_role(role_id))
|
||||
await bot.get_guild(payload.guild_id).get_member(payload.user_id).remove_roles(bot.get_guild(payload.guild_id).get_role(role_id), reason='reaction')
|
||||
|
||||
@bot.command()
|
||||
@commands.has_permissions(manage_roles=True)
|
||||
|
@ -169,4 +169,4 @@ async def debug(ctx, *, cmd):
|
|||
await ctx.send(f'''```py
|
||||
{result}```''')
|
||||
|
||||
bot.run(botToken)
|
||||
bot.run(botToken)
|
||||
|
|
Loading…
Reference in a new issue