Answer the question
In order to leave comments, you need to log in
How to change the color of an existing discord role using discord.py?
I have a role. I want to change the color that the user specifies in it. How can I do it?
Code (example):
@commands.command(
aliases=['role']
)
async def edit_role(self, ctx, role, color):
role = discord.utils.get(ctx.message.guild.roles, name = role)
await role.edit(colour=color)
await ctx.send('Успешно!')
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