如何在自定义表情符号中做出反应

时间:2020-11-03 01:44:52

标签: javascript discord discord.js

我希望我的机器人以个性化的表情符号做出反应,但我不能

      msg.react('<:info:753347236842438707>').then(r => { //custom emoji
      msg.react('?').then(r => { //emoji working


error: DiscordAPIError: Invalid From Body
emoji_id: Value: "753347236842438707" is not snowflake.

1 个答案:

答案 0 :(得分:1)

首先,您要定义表情符号:

const info = client.emojis.cache.get('753347236842438707');

接下来,对消息作出反应:

const info = client.emojis.cache.get('753347236842438707');
message.channel.send('content').then(msg => {
    await msg.react(info);
    await msg.react('?');
}
相关问题