【发布时间】:2020-12-31 15:09:47
【问题描述】:
我使用以下方法通过嵌入发送几乎所有机器人输出:
async def show_message_embed(self, ctx: commands.Context, message, title=None):
if title is None:
title = f"Command Output"
em = discord.Embed(title=title, description="```\n" + message + "\n```", colour=0xBD362F)
#em.set_footer("ChatNote (c) 2020 Erisia")
em.timestamp = datetime.utcnow()
await ctx.send(embed=em)
#em.set_footer 行已被注释掉,因为如果我取消注释,我会收到以下错误消息:
TypeError: set_footer() takes 1 positional argument but 2 were given
对我来说,很明显,我只传递了 1 个位置参数——唯一的参数,那么这里有什么问题?
【问题讨论】:
标签: python discord bots discord.py chatbot