简体   繁体   English

Python Discord 机器人发送文本而不是表情符号

[英]Python Discord bot send text instead of emoji

I'm making a simple code that sends an emoji if the message starts with nails :如果消息以nails开头,我正在制作一个发送表情符号的简单代码:

if message.content.startswith('nails'):
    await message.channel.send('<:nails:843081338818789406>')

However, the bot only responds :nails: , instead of the actual emoji:但是,机器人只响应:nails: ,而不是实际的表情符号:

在此处输入图像描述

if message.content.startswith('nails'):
    emoji = bot.get_emoji(843081338818789406)
    await message.channel.send(emoji)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM