Answer the question
In order to leave comments, you need to log in
How to make author mention in on_member_update?
Greetings. I made a code that, when issuing a role, takes it, then outputs a message to the channel. I need that when the user gives the role through the plus sign, but I need the bot to mention the user who tried to do this, and not the bot itself. (gid variable) The code is below
async def on_member_update(member,after):
channel = member.guild.get_channel(758688731610742825)
gid = guild.user
bad_role = discord.utils.get(member.guild.roles, id = 761647037417783319 )
for role in after.roles:
if role.id == 761647037417783319:
await member.remove_roles(bad_role)
await channel.send(f"**{gid}Пользователю {member.mention} попытались выдать роль `{bad_role}` ! С него были сняты роли**")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question