add role discord pythpn code example
Example 1: add self role with discord bot python
@async def on_message(message):
if message.content == "give me admin"
role = discord.utils.get(server.roles, name="Admin")
await client.add_roles(message.author.id, role)
Example 2: How to create role discord.py
guild = ctx.guild
await guild.create_role(name="role name")