Don't see my button on a message

the code is
const { ActionRowBuilder, ButtonBuilder, ButtonStyle, SlashCommandBuilder } = require('discord.js');

module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Replies with Pong!'),
async execute(interaction) {
const sendModpack = new ButtonBuilder()
.setCustomId("sendmodpack")
.setLabel("Send your modpack")
.setStyle(ButtonStyle.Success)

const row = new ActionRowBuilder()
.addComponents(sendModpack)

await interaction.reply({
content: "Button!",
component: [row]
});
},
};
const { ActionRowBuilder, ButtonBuilder, ButtonStyle, SlashCommandBuilder } = require('discord.js');

module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Replies with Pong!'),
async execute(interaction) {
const sendModpack = new ButtonBuilder()
.setCustomId("sendmodpack")
.setLabel("Send your modpack")
.setStyle(ButtonStyle.Success)

const row = new ActionRowBuilder()
.addComponents(sendModpack)

await interaction.reply({
content: "Button!",
component: [row]
});
},
};
and I see my message like this (image) what can be a problem?
No description
3 Replies
d.js toolkit
d.js toolkit11mo 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 staff
Arsham
Arsham11mo ago
just edit component to components
jeany
jeanyOP11mo ago
bruhh it works, thank you. i fricking love these momemnts
Want results from more Discord servers?
Add your server