Roles.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:Sparcli 作者: 4Kaylum 项目源码 文件源码
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))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号