【发布时间】:2021-04-14 23:32:22
【问题描述】:
所以我写了这个代码来发送嵌入消息,如果你写000000它会使嵌入变为黑色,但如果你写ff0000为红色,它就行不通了,你必须写0xff0000为了让它工作,有没有办法让ff0000在没有0x的情况下工作?这是我的代码:
async def embed(ctx, *, content: str):
title, description, color = content.split('|')
embed = discord.Embed(title=title, description=description, color=int(color, 0))
await ctx.send(embed=embed)
任何帮助将不胜感激。
【问题讨论】:
标签: discord discord.py embed discord.py-rewrite