Unknown Emoji Error when trying to react with unicode emojis

Hi, i am trying to react with a standard discord emoji, and based on the docs I am using the unicode emoji. I copied the exact emoji shown in the example (other unicode emojis don't work either) and tried to react, but I am getting the Unknown Emoji Error. My same code used to work earlier this year. This is the code I used to test it:
const { Client, GatewayIntentBits, Events, version } = require('discord.js');

void (async () => {
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent
]
});

await client.login(require('./env.json').dev.keys.token);
console.log(`Logged in with discord.js ${version}`);

client.on(Events.MessageCreate, async message => {
if (message.content.startsWith('react')) {
const response = await message.reply({ content: 'You can react with Unicode emojis!', fetchReply: true }); // this works
await response.react('😄'); // this does not
}
});
})();
const { Client, GatewayIntentBits, Events, version } = require('discord.js');

void (async () => {
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent
]
});

await client.login(require('./env.json').dev.keys.token);
console.log(`Logged in with discord.js ${version}`);

client.on(Events.MessageCreate, async message => {
if (message.content.startsWith('react')) {
const response = await message.reply({ content: 'You can react with Unicode emojis!', fetchReply: true }); // this works
await response.react('😄'); // this does not
}
});
})();
This is the output: https://pastebin.com/FiJnfqRn
Pastebin
discord.js error - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
10 Replies
d.js toolkit
d.js toolkit4d ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
Mephisto
MephistoOP4d ago
node v22.12.0, discord.js v14.16.3 Well I am on Windows, so I wouldn't think so. I tried the windows emoji picker (win+.) as well as just copy-pasting the emoji from the docs. And the code I sent is the exact one run, so I don't know where there could be something wrong
Mephisto
MephistoOP4d ago
If it is intended to be possible to use the unicode itself, then that doesn't work either
No description
d.js docs
d.js docs4d ago
- Custom emojis: \:name:<a:name:id> - Twemojis: \:name: ➞ unicode representation - Emoji picker: WIN + . / CMD + CTRL + SPACE / CTRL + . - Right-clicking any emoji will not copy its id!
Mephisto
MephistoOP4d ago
I tried that, as I said. but it doesn't work. with white_check_mark as ✅ it gives the same error
await response.react('✅');
await response.react('✅');
Logged in with discord.js 14.16.3 node:events:502 throw er; // Unhandled 'error' event ^ DiscordAPIError[10014]: Unknown Emoji at handleErrors (c:\Users\Mephisto\Documents\Teufelsbot\Teufelsbot\node_modules@discordjs\rest\dist\index.js:727:13) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async SequentialHandler.runRequest (c:\Users\Mephisto\Documents\Teufelsbot\Teufelsbot\node_modules@discordjs\rest\dist\index.js:1128:23) at async SequentialHandler.queueRequest (c:\Users\Mephisto\Documents\Teufelsbot\Teufelsbot\node_modules@discordjs\rest\dist\index.js:959:14) at async _REST.request (c:\Users\Mephisto\Documents\Teufelsbot\Teufelsbot\node_modules@discordjs\rest\dist\index.js:1272:22) at async GuildMessageManager.react (c:\Users\Mephisto\Documents\Teufelsbot\Teufelsbot\node_modules\discord.js\src\managers\MessageManager.js:255:5) at async Message.react (c:\Users\Mephisto\Documents\Teufelsbot\Teufelsbot\node_modules\discord.js\src\structures\Message.js:872:5) at async Client.<anonymous> (c:\Users\Mephisto\Documents\Teufelsbot\Teufelsbot\test.js:19:7) Emitted 'error' event on Client instance at: at emitUnhandledRejectionOrErr (node:events:407:10) at process.processTicksAndRejections (node:internal/process/task_queues:92:21) { requestBody: { files: undefined, json: undefined }, rawError: { message: 'Unknown Emoji', code: 10014 }, code: 10014, status: 400, method: 'PUT', url: 'https://discord.com/api/v10/channels/1183014623507656745/messages/1317524471929638984/reactions/%25E2%259C%2585/@me' } Node.js v22.12.0
Mephisto
MephistoOP4d ago
that's probably discord showing it as their version again, here is the screenshot
No description
Mephisto
MephistoOP4d ago
✅ this, right? that is what I have in my code yes, it does (admin)
Mephisto
MephistoOP4d ago
No description
d.js docs
d.js docs4d ago
discord.js includes multiple sub-packages, installing these separately can mess with internal code:
npm uninstall discord-api-types @discordjs/rest @discordjs/builders
yarn remove discord-api-types @discordjs/rest @discordjs/builders
pnpm remove discord-api-types @discordjs/rest @discordjs/builders
npm uninstall discord-api-types @discordjs/rest @discordjs/builders
yarn remove discord-api-types @discordjs/rest @discordjs/builders
pnpm remove discord-api-types @discordjs/rest @discordjs/builders
Mephisto
MephistoOP4d ago
oof, yea that was the issue ._. Thank you for your help ^^
Want results from more Discord servers?
Add your server