#interaction weird behaviour

1 messages · Page 1 of 1 (latest)

spare crow
#
collector.on("collect", (interactionButton) => {
            const id = interactionButton.customId;

            if (id === "next") {
                pageNumber++;
                const page = queued.slice(0 + (pageNumber * 10), 10 + (pageNumber * 10));

                const embed = new MessageEmbed()
                    .setTitle("now playing")
                    .setDescription(current)
                    .addFields(
                        {
                            name: "next up",
                            value: page.join("\n\n") || "none"
                        }
                    )
                    .setColor("#8b81a5")
                    .setTimestamp()
                    .setFooter(`${queue.songs.length} songs in queue - ${queue.formattedDuration}`);

                interaction.editReply({ embeds: [embed] });
            }

            if (id === "previous") {
                pageNumber--;
                const page = queued.slice(0 + (pageNumber * 10), 10 + (pageNumber * 10));

                const embed = new MessageEmbed()
                    .setTitle("now playing")
                    .setDescription(current)
                    .addFields(
                        {
                            name: "next up",
                            value: page.join("\n\n") || "none"
                        }
                    )
                    .setColor("#8b81a5")
                    .setTimestamp()
                    .setFooter(`${queue.songs.length} songs in queue - ${queue.formattedDuration}`);

                interaction.editReply({ embeds: [embed] });
            }
        });
#

is inside a command

#

this code snippet is after the event interaction reply

clear bobcat
#

You don’t respond to button interaction, so it will fail

humble matrixBOT
#

<:_:874569335308431382> ButtonInteraction#update()
Updates the original message of the component on which the interaction was received on.

spare crow
#

how would i reply empty?

#

since theres nothing i want to do with the buttons. only read the events

clear bobcat