info.py 文件源码

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

项目:dogbot 作者: slice 项目源码 文件源码
def profile_describe(self, ctx, color: discord.Color, *, description):
        """Sets your profile description and color. Supporter only."""
        if len(description) > 1024:
            return await ctx.send('That description is too long. There is a maximum of 1024 characters.')
        async with ctx.acquire() as conn:
            sql = """INSERT INTO profile_descriptions (id, description, color) VALUES ($1, $2, $3)
                     ON CONFLICT (id) DO UPDATE SET description = $2, color = $3"""
            await conn.execute(sql, ctx.author.id, description, color.value)
        await ctx.send('\N{OK HAND SIGN} Updated your profile!')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号