randomshizzle.py 文件源码

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

项目:PTSCogs 作者: PlanetTeamSpeakk 项目源码 文件源码
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!")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号