为什么我的嵌入看起来像Discord.py上的代码?

2024-06-02 05:17:08 发布

您现在位置:Python中文网/ 问答频道 /正文

所以我试图为我正在开发的机器人制作一个帮助嵌入页面。然而,不是嵌入它,而是显示出这种胡言乱语

As you see it doesn't even reply.

async def help(ctx):
    print("ctx.message.author.avatar_url")
    embed=discord.Embed(title="Commands", description="Help Page", color=0xad1f1f)
    embed.set_author(name=ctx.message.author.name + "#" + ctx.message.author.discriminator, icon_url=ctx.message.author.avatar_url)
    embed.add_field(name=".help", value="Shows this page. Do .help [Page] for more help pages", inline=False)
    embed.add_field(name=".say", value="Says what you input and removes your message. (Administrator Exclusive)", inline=False)
    embed.add_field(name=".avatar", value="Sends your avatar. Or the avatar of anyone mentioned or replied to.", inline=False)
    embed.set_footer(text="Page (1/1)")
    await ctx.message.reply(embed=embed)

我使用的代码

我什么都试过了。我在谷歌上搜索过,打印了所有的变量,以防阿凡达url出现问题。我现在已经厌倦了。也许是语法错误,我真的很笨,我希望不是这样

请帮帮我


Tags: nameaddfalseurlfieldmessagevaluepage