def colorrole(self, ctx, color):
"""Creates a colored role for you!
Example
[p]colorrole #8C5200
Hex pls."""
if not color.startswith("#"):
await send_cmd_help(ctx)
return
colorhex = color[1:]
color_role = await self.bot.create_role(server=ctx.message.server, name=color, colour=discord.Colour(value=int(colorhex, 16)))
await self.bot.add_roles(ctx.message.author, color_role)
await self.bot.say("Done!")
评论列表
文章目录