mirror of
https://github.com/TotalFreedomMC/TotalFreedomBot.git
synced 2024-12-22 23:54:58 +00:00
Update main.py
This commit is contained in:
parent
e88c1e674e
commit
c573bacc50
1 changed files with 3 additions and 3 deletions
4
main.py
4
main.py
|
@ -73,7 +73,7 @@ async def on_raw_reaction_add(payload):
|
||||||
else:
|
else:
|
||||||
for role_id, msg_id, emoji in bot.reaction_roles:
|
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')):
|
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
|
@bot.event
|
||||||
async def on_raw_reaction_remove(payload):
|
async def on_raw_reaction_remove(payload):
|
||||||
|
@ -82,7 +82,7 @@ async def on_raw_reaction_remove(payload):
|
||||||
else:
|
else:
|
||||||
for role_id, msg_id, emoji in bot.reaction_roles:
|
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')):
|
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()
|
@bot.command()
|
||||||
@commands.has_permissions(manage_roles=True)
|
@commands.has_permissions(manage_roles=True)
|
||||||
|
|
Loading…
Reference in a new issue