【发布时间】:2021-02-01 01:09:23
【问题描述】:
我想用角色颜色制作嵌入消息:
@client.command(passContent=True)
async def role(ctx):
role=discord.utils.find(lambda r: r.id == 804318858873536522, ctx.message.guild.roles)
embed=discord.Embed(title=f'{role}', colour={role.color})
await ctx.send(embed=embed)
当我执行命令时,我得到这个:
Command raised an exception: TypeError: Expected discord.Colour, int, or Embed.Empty but received set instead.
【问题讨论】:
标签: python python-3.x discord discord.py