I cant put emojis in buttons.
const appealEmbed = new EmbedBuilder()
.setTitle("Appeal A Moderator Action")
.setDescription("If you received a warning, mute, or ban and wish to appeal, use the buttons below based on your punishment.")
.addFields(
{ name: "โ ๏ธ Warn Appeals", value: "Appeal if you received a warning." },
{ name: "๐ Mute Appeals", value: "Appeal if you were muted." },
{ name: "โ Ban Appeals", value: "Appeal if you were banned." }
);
const warnButton = new ButtonBuilder()
.setCustomId("warnappeal")
.setLabel("Warn Appeals")
.setStyle(ButtonStyle.Secondary)
const muteButton = new ButtonBuilder()
.setCustomId("muteappeal")
.setLabel("Mute Appeals")
.setStyle(ButtonStyle.Secondary)
const banButton = new ButtonBuilder()
.setCustomId("banappeal")
.setLabel("Ban Appeals")
.setStyle(ButtonStyle.Secondary)
const row = new ActionRowBuilder()
.addComponents(warnButton, muteButton, banButton);
Will not work with the following error:
43 Replies
ValidationError: Expected the value to be an object, but received string instead
at _ObjectValidator.handle (/Users/leo/Documents/DiscordBots/AussieArmyAssistant/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1958:25)
at _ObjectValidator.parse (/Users/leo/Documents/DiscordBots/AussieArmyAssistant/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:939:90)
at ButtonBuilder.setEmoji (/Users/leo/Documents/DiscordBots/AussieArmyAssistant/node_modules/@discordjs/builders/dist/index.js:668:38)
at callback (/Users/leo/Documents/DiscordBots/AussieArmyAssistant/commands/appealembed.js:34:8)
at CommandHandler.runCommand (/Users/leo/Documents/DiscordBots/AussieArmyAssistant/node_modules/wokcommands/dist/command-handler/CommandHandler.js:168:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async exports.default (/Users/leo/Documents/DiscordBots/AussieArmyAssistant/node_modules/wokcommands/dist/event-handler/events/interactionCreate/isCommand/slash-commands.js:23:22) {
validator: 's.object(T)',
given: '๐'
}
Node.js v20.10.0
[nodemon] app crashed - waiting for file changes before starting...
- 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 OPdiscord.js@14.14.1
v20.10.0
Also if possible, idk if you can do custom emojis in it.
Unknown Userโข6mo ago
Message Not Public
Sign In & Join Server To View
Ah k let me see
ValidationError: Expected the value to be an object, but received string instead
at _ObjectValidator.handle (/Users/leo/Documents/DiscordBots/AussieArmyAssistant/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1958:25)
at _ObjectValidator.parse (/Users/leo/Documents/DiscordBots/AussieArmyAssistant/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:939:90)
at ButtonBuilder.setEmoji (/Users/leo/Documents/DiscordBots/AussieArmyAssistant/node_modules/@discordjs/builders/dist/index.js:668:38)
at callback (/Users/leo/Documents/DiscordBots/AussieArmyAssistant/commands/appealembed.js:34:8)
at CommandHandler.runCommand (/Users/leo/Documents/DiscordBots/AussieArmyAssistant/node_modules/wokcommands/dist/command-handler/CommandHandler.js:168:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async exports.default (/Users/leo/Documents/DiscordBots/AussieArmyAssistant/node_modules/wokcommands/dist/event-handler/events/interactionCreate/isCommand/slash-commands.js:23:22) {
validator: 's.object(T)',
given: '๐'
}
const muteButton = new ButtonBuilder()
.setCustomId("muteappeal")
.setLabel("Mute Appeals")
.setStyle(ButtonStyle.Secondary)
.setEmoji('๐')
@Jรด ๐๐ฆ
Unknown Userโข6mo ago
Message Not Public
Sign In & Join Server To View
How?
Unknown Userโข6mo ago
Message Not Public
Sign In & Join Server To View
Kinda
Unknown Userโข6mo ago
Message Not Public
Sign In & Join Server To View
AHHHHH
const { CommandType } = require("wokcommands");
const { EmbedBuilder, ButtonStyle } = require("discord.js");
const { ButtonBuilder, ActionRowBuilder } = require("@discordjs/builders");
Unknown Userโข6mo ago
Message Not Public
Sign In & Join Server To View
discord.js includes multiple sub-packages, installing these separately can mess with internal code:
Unknown Userโข6mo ago
Message Not Public
Sign In & Join Server To View
K