Как да създадете роля discord.py
guild = ctx.guild
await guild.create_role(name="role name")
добавяне на роли раздор py
# If you need this in a bot command
@discord.ext.commands.command()
async def online(ctx):
role = discord.utils.get(bot.get_guild(ctx.guild.id).roles, id ="Role ID")
await member.add_roles(role)