Discord.js DiscordAPI Error: Unknown Emoji - Reacting to an Embed

PerplexingParadox

Here's my code:

client.on('message', message => {
    if (message.content.startsWith("!embed")) {
        const embed = new Discord.MessageEmbed()
            .setColor(0xffffff)
            .setFooter(`Page 1`)

        message.channel.send(':rewind::fast_forward:'); //this works

        //but this doesn't
        message.channel.send(embed).then(embedMessage => {
            embedMessage.react(":rewind:");
        });
});

I may have a hidden issue or not provided the correct parameters. I have looked at a similar previously asked question and tried implementing it, but it didn't work, may be outdated.

Instead, I receive an error:

UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Emoji

The emoji I'm using is provided in the standard emoji library, :rewind:

PLASMA chicken

Discord.Js does not handle emojis with the Discord User Side :rewind: stuff. Discord.js is using unicode to send and receive emojis, except for custom emojis, IDs are used there instead.

This means that you should use the following code instead.

embedMessage.react("⏪");

The Unicode emojis can be found by "escaping" the emoji in Discord or using something like: https://getemoji.com/.

The escaping works by using \ in front of the emoji, you might know this from \n. By putting \:rewind: the result will look as follows.

Normal and Escaped Emoji

When copying the Unicode emoji make sure to delete any spaces off of it.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Discord.js DiscordAPI Error: Unknown Emoji - Reacting to an Embed

From Dev

Discord.js embed command

From Dev

Welcome message embed Discord.js

From Dev

Discord js using message id in Embed

From Dev

discord.js paladins bot tracker embed

From Dev

Get the Emoji url from a message in discord.js

From Dev

Get emoji informations from a message in discord.js

From Java

discord.js: Bot is sending the same embed twice

From Java

Is it possible to give certain users a custom embed color in discord.js?

From Dev

Line Separator/Break in Discord.js Embed Message

From Dev

Angular JS Unknown Provider Error

From Dev

Discord Custom Activity Attribute Error, emoji object doesn't have attribute 'get'

From Java

Embed command Discord

From Dev

Angular JS Error: [$injector:unpr] Unknown provider

From Dev

Split string and replace Discord emoji to [name]

From Dev

How can i send a Pagination-embed with a music list discord.js

From Dev

JavaScript: Discord.js Error with !kick command

From Dev

Unknown encoding: iso-8859-1 error in Zombie.js

From Dev

"Error: Unknown provider" trying to implement dependency injection in Angular.JS

From Dev

Unknown protocol error while using request api ( node.js )

From Dev

angular js unknown provider error angular-animate

From Dev

How to troubleshoot Angular JS Unknown Provider error in minified code

From Dev

Error using validate.js on React Native - Unknown validator minimum

From Dev

Discord Python Bot Multiple Value in embed field

From Dev

Creating command say embed on discord.py

From Dev

AttributeError: module 'discord' has no attribute 'Embed'

From Java

Discord.js restart command is not working (returns undefined error)

From Dev

What is the fn.bind Error code for discord.js?

From Dev

Error when Discord.js cannot find an item in an array with mySQL

Related Related

  1. 1

    Discord.js DiscordAPI Error: Unknown Emoji - Reacting to an Embed

  2. 2

    Discord.js embed command

  3. 3

    Welcome message embed Discord.js

  4. 4

    Discord js using message id in Embed

  5. 5

    discord.js paladins bot tracker embed

  6. 6

    Get the Emoji url from a message in discord.js

  7. 7

    Get emoji informations from a message in discord.js

  8. 8

    discord.js: Bot is sending the same embed twice

  9. 9

    Is it possible to give certain users a custom embed color in discord.js?

  10. 10

    Line Separator/Break in Discord.js Embed Message

  11. 11

    Angular JS Unknown Provider Error

  12. 12

    Discord Custom Activity Attribute Error, emoji object doesn't have attribute 'get'

  13. 13

    Embed command Discord

  14. 14

    Angular JS Error: [$injector:unpr] Unknown provider

  15. 15

    Split string and replace Discord emoji to [name]

  16. 16

    How can i send a Pagination-embed with a music list discord.js

  17. 17

    JavaScript: Discord.js Error with !kick command

  18. 18

    Unknown encoding: iso-8859-1 error in Zombie.js

  19. 19

    "Error: Unknown provider" trying to implement dependency injection in Angular.JS

  20. 20

    Unknown protocol error while using request api ( node.js )

  21. 21

    angular js unknown provider error angular-animate

  22. 22

    How to troubleshoot Angular JS Unknown Provider error in minified code

  23. 23

    Error using validate.js on React Native - Unknown validator minimum

  24. 24

    Discord Python Bot Multiple Value in embed field

  25. 25

    Creating command say embed on discord.py

  26. 26

    AttributeError: module 'discord' has no attribute 'Embed'

  27. 27

    Discord.js restart command is not working (returns undefined error)

  28. 28

    What is the fn.bind Error code for discord.js?

  29. 29

    Error when Discord.js cannot find an item in an array with mySQL

HotTag

Archive