'Invaild emoji discord bot
When I try to type the help command the bot doesn't run the command but i get this code in replit
Promise {
<rejected> DiscordAPIError: Invalid Form Body
components[0].components[0].options[0].emoji.name: Invalid emoji
components[0].components[0].options[1].emoji.name: Invalid emoji
at RequestHandler.execute (/home/runner/SwishBot/node_modules/discord.js/src/rest/RequestHandler.js:350:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/home/runner/SwishBot/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
at async TextChannel.send (/home/runner/SwishBot/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:175:15)
at async Object.run (/home/runner/SwishBot/commands/basic/help.js:77:25) {
method: 'post',
path: '/channels/962119920152354827/messages',
code: 50035,
httpStatus: 400,
requestData: { json: [Object], files: [] }
},
[Symbol(async_id_symbol)]: 143,
[Symbol(trigger_async_id_symbol)]: 60,
[Symbol(destroyed)]: { destroyed: false }
}
And this is the code that i have writen
"emojis": {
"developers":"",
"basic":":white_check_mark:"
}
If someone knows how to fix this please help me with it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
