© 2026 Hedgehog Software, LLC
private async handleComponentInteraction(target: GuildMember, initialInteraction: InitialInteraction, interaction: MessageComponentInteraction) { if (interaction.isButton()) { switch (interaction.customId) { case 'manage-demote': await this.handleDemoteButton(target, interaction); break; default: break; } } } private async handleDemoteButton(target: GuildMember, interaction: MessageComponentInteraction) { // this sends const reply = await interaction.reply({ embeds: [createErrorEmbed('Danger Zone', 'Are you sure you want to demote this user?')], components: [ new ActionRowBuilder<ButtonBuilder>() .addComponents( new ButtonBuilder() .setCustomId('manage-demote-confirm') .setLabel('Yes, demote them') .setStyle(ButtonStyle.Danger), new ButtonBuilder() .setCustomId('manage-demote-cancel') .setLabel('Cancel') .setStyle(ButtonStyle.Secondary), ), ], }); // likewise, I have also tried awaitMessageComponent const collector = reply.createMessageComponentCollector({ filter: (componentInteraction) => componentInteraction.user.id === interaction.user.id, time: 30 * 1000, }); collector.on('collect', async (componentInteraction) => { // ... never fires }); }
Join the Discord to ask follow-up questions and connect with the community
Support server for discord.js, a Node.js module to interact with Discord's apps API.
57,666 Members