【发布时间】:2021-06-18 16:53:20
【问题描述】:
我有这个命令叫p!customembed [color] [title] [description]。这基本上就是它听起来的样子。但是,有一个缺陷。我希望我的机器人发送一个蓝色嵌入,标题为“土豆很好”,描述为“测试”。但是,标题是“土豆”,描述是“很好的测试”。我正在考虑用/之类的东西将ctx命令中的标题和描述分开,比如p!customembed [color] [title] / [description]将两者分开,但我不知道该怎么做。任何人都可以帮忙吗?谢谢
@client.command()
async def customembed(ctx, color: discord.Colour, title, *, description):
embed = discord.Embed(title=title, description=description, color=color)
await ctx.send(embed=embed)
【问题讨论】:
标签: python discord discord.py