#Emoji button
17 messages · Page 1 of 1 (latest)
Emoji button
Does anyone know why Discord.JS allows me to put emojis as button emojis normally for the bot, but when I put tree it says it's an invalid emoji?
I wanted to put this one but it says not an emoji🌲
The same goes for this 🌳
Whereas, in the other two emojis I used (➡️⬅️), it works normally.
Wait, you cant just : emojiname : (without the spaces) anymore?
or am i losing my mind and that never was a thing
I tested that too, it didn't work
buttonCreator.js:
const { ActionRowBuilder, ButtonBuilder, ButtonStyle } = require("discord.js");
module.exports =
{
buttonsModel: function(buttonID1, buttonLabel1, buttonStyle1, buttonEmoji1, buttonID2, buttonLabel2, buttonStyle2, buttonEmoji2, buttonID3, buttonLabel3, buttonStyle3, buttonEmoji3, buttonID4, buttonLabel4, buttonStyle4, buttonEmoji4, callback)
{
if(buttonID4 == null)
{
if(buttonID3 == null)
{
if(buttonID2 == null)
{
...
} else
{
...
}
} else
{
const button1 = new ButtonBuilder()
.setCustomId(buttonID1)
.setLabel(buttonLabel1)
.setStyle(eval(buttonStyle1))
.setEmoji(buttonEmoji1);
const button2 = new ButtonBuilder()
.setCustomId(buttonID2)
.setLabel(buttonLabel2)
.setStyle(eval(buttonStyle2))
.setEmoji(buttonEmoji2);
const button3 = new ButtonBuilder()
.setCustomId(buttonID3)
.setLabel(buttonLabel3)
.setStyle(eval(buttonStyle3))
.setEmoji(buttonEmoji3);
const row = new ActionRowBuilder()
.addComponents(button1, button2, button3);
callback(row);
}
} else
{
...
}
}
};
I am putting the emojis like "🌲" in the database
the emoji in person
let's say so
emoji in emoji
Sorry for the delay to answer you
It is worth noting that I tested placing each emoji directly by code, already predefined, without using a database, and it worked.