Unghosted
Unghosted

Reputation: 55

how to react in a custom emoji

I want my bot to react with a personalized emoji, but I can't

      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.

Upvotes: 0

Views: 150

Answers (1)

Tyler2P
Tyler2P

Reputation: 2370

First, you want to define the emoji:

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

Next, reacting to the message:

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

Upvotes: 1

Related Questions