Unknown Message

const message = await interaction.fetchReply();
const collector = message.createMessageComponentCollector({ componentType: ComponentType.Button, time: 3_600_000 });

collector.on('collect', async i => {
await i.message.edit({ content: "hello"})
});
const message = await interaction.fetchReply();
const collector = message.createMessageComponentCollector({ componentType: ComponentType.Button, time: 3_600_000 });

collector.on('collect', async i => {
await i.message.edit({ content: "hello"})
});
12 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
FateAssassin
FateAssassinOP2y ago
https://pastebin.com/sBWf8iR4 here is the full error
Pastebin
throw new DiscordAPIError(data, "code" in data ? data.code : data....
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
FateAssassin
FateAssassinOP2y ago
or do I have to fetch the message itself first?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
FateAssassin
FateAssassinOP2y ago
module.exports = {
data: new SlashCommandBuilder()
.setName('help')
.setDescription('See all the commands of Ludus-Bot'),
async execute(interaction) {


const utility = new ButtonBuilder()
.setCustomId('utility')
.setLabel('Utility')
.setEmoji('⚒️')
.setStyle(ButtonStyle.Success);
const utilityActive = new ButtonBuilder()
.setCustomId("TESTtes")
.setLabel('Utility')
.setEmoji('⚒️')
.setStyle(ButtonStyle.Success)
.setDisabled(true);

const test = new ButtonBuilder()
.setCustomId("test")
.setStyle(ButtonStyle.Success)
.setLabel("test");
const row = new ActionRowBuilder()
.addComponents(utility)
const response = await interaction.reply({
embeds: [helpMain],
components: [row],
ephemeral: true
});


const message = await interaction.fetchReply();
const collector = message.createMessageComponentCollector({ componentType: ComponentType.Button, time: 3_600_000 });

collector.on('collect', async i => {
await i.message.edit({ content: "hello"})
});

}};
module.exports = {
data: new SlashCommandBuilder()
.setName('help')
.setDescription('See all the commands of Ludus-Bot'),
async execute(interaction) {


const utility = new ButtonBuilder()
.setCustomId('utility')
.setLabel('Utility')
.setEmoji('⚒️')
.setStyle(ButtonStyle.Success);
const utilityActive = new ButtonBuilder()
.setCustomId("TESTtes")
.setLabel('Utility')
.setEmoji('⚒️')
.setStyle(ButtonStyle.Success)
.setDisabled(true);

const test = new ButtonBuilder()
.setCustomId("test")
.setStyle(ButtonStyle.Success)
.setLabel("test");
const row = new ActionRowBuilder()
.addComponents(utility)
const response = await interaction.reply({
embeds: [helpMain],
components: [row],
ephemeral: true
});


const message = await interaction.fetchReply();
const collector = message.createMessageComponentCollector({ componentType: ComponentType.Button, time: 3_600_000 });

collector.on('collect', async i => {
await i.message.edit({ content: "hello"})
});

}};
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
FateAssassin
FateAssassinOP2y ago
and how would I edit that then?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
FateAssassin
FateAssassinOP2y ago
thanks! it finally worked, also, how could I get the button id which was clicked?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
FateAssassin
FateAssassinOP2y ago
thank you very much! how can I close the post?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server