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!')
评论列表
文章目录