def changecolour(self, ctx, roleColour: str, *, roleName: str):
'''
Changes the colour of a specified role
'''
# Get the role colour
roleColour = colourFixer(roleColour)
# Get the role itself
role = await getTextRoles(ctx, roleName, speak=True, sparcli=self.sparcli)
if type(role) == int: return
# Change the role colour
colour = Colour(int(roleColour, 16))
await self.sparcli.edit_role(ctx.message.server, role, colour=colour)
await self.sparcli.say('The colour of the role `{0.name}` has been changed to value `{1.value}`.'.format(role, colour))
评论列表
文章目录