python - 如何将自定义表情符号放入嵌入页脚 | 不和谐.py
问题描述
我试过把我的自定义表情符号作为这样的页脚:
embed.set_footer(text=f"<:Bloxxer:793683622238224384> Bloxxer")
它不起作用,并且与页脚中的字符串完全相同。是否可以在 discord.py 的页脚中设置自定义表情符号?
解决方案
我不认为 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)
推荐阅读
- python - 在Django中渲染页面后在后台执行代码
- android - 是否可以通过 Activity 从片段中调用 ViewModel 方法,还是一种不好的做法?
- c++ - 合并两个数组后得到不正确的数组大小
- php - 在 Laravel 中,我的表列被连接覆盖,我该如何解决?
- arrays - 是否可以重新排列具有恒定内存开销的数组?
- mongodb - JEST:Expect() 仅数组中的唯一元素
- java - 如何计算android studio中的admob广告点击并存储在sharedprefernce中?
- javascript - 将两个回调合并为一个返回
- mongodb - mongodb:未指定身份验证机制
- unix - 如果 2 个位置在 unix 中匹配,如何从一个位置切换到另一个位置