#How to make a Button no time out
1 messages · Page 1 of 1 (latest)
To create an button in discord.js@14.x.x
here is an example give me a moment
const { ButtonBuilder, ButtonStyle, ActionRowBuilder } = require("discord.js");
const btn = new ButtonBuilder().setCustomId("test").setLabel("Test").setStyle(ButtonStyle.Success);
const row = new ActionRowBuilder().addComponents(btn);
message.channel.send({ components: [row] });
client.on("interactionCreate", async (interaction) => {
if (!interaction.isButton()) return;
if (interaction.customId === "test") interaction.reply("Button Clicked");
});