ignore reactions that are not in the welcome channel
This commit is contained in:
parent
df60c22472
commit
0d5981eef9
@ -56,8 +56,6 @@ Please react to this message with one of the following emojis to be granted the
|
||||
|
||||
@bot.event
|
||||
async def on_raw_reaction_add(payload):
|
||||
if payload.guild_id not in core_utils.my_guilds:
|
||||
return # Reaction is not in my discord
|
||||
guild = bot.get_guild(payload.guild_id)
|
||||
|
||||
role_map = {
|
||||
@ -67,9 +65,9 @@ async def on_raw_reaction_add(payload):
|
||||
"🚀": "Star Citizens",
|
||||
}
|
||||
|
||||
if payload.channel_id == 1026281775984549958:
|
||||
role = discord.utils.get(guild.roles, name=role_map[payload.emoji.name])
|
||||
member = guild.get_member(payload.user_id)
|
||||
if payload.channel_id == 1026281775984549958:
|
||||
await member.add_roles(role)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user