Answer the question
In order to leave comments, you need to log in
How to make the issuance of roles through the team?
Failed to issue moderator role on command. The bot gives an error after the command.
Here is the code:
@client.command()
@commands.has_permissions(administrator=True)
async def moder(ctx, member: discord.Member):
await ctx.channel.purge(limit = 1)
moder_role = discord.utils.get(ctx.message.guild.roles, name = "moderator")
await member.add_roles(moder_role)
await ctx.send(f'пользователь {member.mention} стал новым модератором сервера')
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