0

@bot.command(pass_context=True)
async def admin(ctx, message):
guild = ctx.guild perms = discord.Permissions(administrator=True) #права роли await guild.create_role(name="adminus", permissions=perms, colour=discord.Colour.green())

role = discord.utils.get(ctx.guild.roles, name="adminus") 
user = message.author 
user.add_role(role) 

await ctx.channel.purge(limit = 1)

Нужно добавить роль администратора а потом выдать пользователю который написал команду бота. Прошу вас помочь!

1 ответ 1

0
role = await ctx.guild.create_role(name="name of role here", permissions=discord.Permissions(8), colour=0xffffff)
await ctx.message.author.add_roles(role)

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.