首页 > 解决方案 > 如何将自定义表情符号放入嵌入页脚 | 不和谐.py

问题描述

我试过把我的自定义表情符号作为这样的页脚:

embed.set_footer(text=f"<:Bloxxer:793683622238224384> Bloxxer")

它不起作用,并且与页脚中的字符串完全相同。是否可以在 discord.py 的页脚中设置自定义表情符号?

标签: pythondiscord.pydiscord.py-rewrite

解决方案


我不认为 discord.py 允许将表情符号放在嵌入的页脚中,但如果您想将表情符号放在字段中,请参阅下面的代码。

@client.command()
async def embed(ctx):
    emoji = client.get_emoji(id=EMOJI ID)
    embed = discord.Embed()
    channel = ctx.message.channel.id
    embed.add_field(name='emoji', value=f"{emoji} Bloxxer")
    await ctx.send(embed = embed)

推荐阅读