def colour(self, ctx, colour : discord.Colour, *, role : discord.Role):
"""Changes the colour of a role.
The colour must be a hexadecimal value, e.g. FF2AEF. Don't prefix it
with a pound (#) as it won't work. Colour names are also not supported.
To use this command you must have the Manage Roles permission or
have the Bot Admin role. The bot must also have Manage Roles permissions.
This command cannot be used in a private message.
"""
try:
await self.bot.edit_role(ctx.message.server, role, colour=colour)
except discord.Forbidden:
await self.bot.say('The bot must have Manage Roles permissions to use this.')
else:
await self.bot.say('\U0001f44c')
#changes the name of the role
#NOTE: Currently CANNOT change default bot role name (BotName=DafaultRoleName)
评论列表
文章目录