Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Get the Guild object in any way
Get the list of roles in hierarchical order and give the user the highest role.
author = message.author # получаем автора сообщения
guild = self.get_guild(id) #id получаешь программно или вписываешь статический если бот только на 1 сервере
role = guild.roles[0] # получаем высшую роль
await author.add_roles(role) # выдаем автору роль
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question