larkx
larkx
DIAdiscord.js - Imagine an app
Created by larkx on 9/13/2023 in #djs-questions
docs not working
9 replies
DIAdiscord.js - Imagine an app
Created by larkx on 8/24/2022 in #djs-questions
Struggling with awaitMessageComponent
I've got two awaitMessageComponent for a button, and then a select menu. I'm not really sure what is happening but when I click the button, everything is fine. THEN, when the select menu appears, I try to select an item, it immediately says int failed, I choose again and it works....
13 replies
DIAdiscord.js - Imagine an app
Created by larkx on 8/24/2022 in #djs-questions
Select Menu Collector
I'm struggling with collecting the response from my select menu. I don't get any errors in the terminal, I only get the "Interaction has failed" message on Discord after selecting a value. This is the code:
const selectResponseMsg = await interaction.editReply({ embeds: [embed], components: [row], fetchReply: true, ephemeral: true })
const collector = selectResponseMsg.createMessageComponentCollector({ componentType: 'SELECTMENU', time: 60000 });

collector.on('collect', i => {
if (i.user.id === interaction.user.id) {
i.reply(`${i.user.id} chose ${i.customId}`);
} else {
i.reply({ content: `No.`, ephemeral: true });
}
});

collector.on('end', collected => {
console.log(`Collected ${collected.size} interactions.`);
});
const selectResponseMsg = await interaction.editReply({ embeds: [embed], components: [row], fetchReply: true, ephemeral: true })
const collector = selectResponseMsg.createMessageComponentCollector({ componentType: 'SELECTMENU', time: 60000 });

collector.on('collect', i => {
if (i.user.id === interaction.user.id) {
i.reply(`${i.user.id} chose ${i.customId}`);
} else {
i.reply({ content: `No.`, ephemeral: true });
}
});

collector.on('end', collected => {
console.log(`Collected ${collected.size} interactions.`);
});
7 replies
DIAdiscord.js - Imagine an app
Created by larkx on 8/22/2022 in #djs-questions
Issue with Modals
21 replies
DIAdiscord.js - Imagine an app
Created by larkx on 8/21/2022 in #djs-questions
Slash Command Permissions
How do I do role based permissions with slash commands?
26 replies