Working with Emoji's on SelectMenu Options

Hi iam trying to set an emoji to a StringSelectMenu but i doesnt show the emoji itself.
const selectMenu = new StringSelectMenuBuilder();
selectMenu.setCustomId("ticket:guild:select");
selectMenu.setPlaceholder(":arrow~2: Select a server to create a new ticket");
this.container.client.guilds.cache.filter(x => !x.members.cache.get(message.author.id)).forEach(guild => {
selectMenu.addOptions(new StringSelectMenuOptionBuilder()
.setLabel(Resolvers.resolveEmoji(":round_pushpin:") + " " + guild.name)
.setValue(guild.id.toString())
);
});
const selectMenu = new StringSelectMenuBuilder();
selectMenu.setCustomId("ticket:guild:select");
selectMenu.setPlaceholder(":arrow~2: Select a server to create a new ticket");
this.container.client.guilds.cache.filter(x => !x.members.cache.get(message.author.id)).forEach(guild => {
selectMenu.addOptions(new StringSelectMenuOptionBuilder()
.setLabel(Resolvers.resolveEmoji(":round_pushpin:") + " " + guild.name)
.setValue(guild.id.toString())
);
});
No description
Solution:
discord.js
discord.js
discord.js is a powerful Node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
Jump to solution
5 Replies
Solution
Oreo ™
Oreo ™10mo ago
discord.js
discord.js
discord.js is a powerful Node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
f1fty
f1ftyOP10mo ago
Ahh thanks didnt saw that
f1fty
f1ftyOP10mo ago
but can i set an emoji to thhe placeholder? and does it work with custom emojis?
Oreo ™
Oreo ™10mo ago
i dont think so and yes it works with custom emojis
secre
secre10mo ago
For placeholder you probably need to use unicode emojis like this one 😄 Maybe custom emojis will work too if you place them as ID. <:name:id>

Did you find this page helpful?