fixed format (needs json fix) & component bugs
diff --git a/src/commands/settings/autopublish.ts b/src/commands/settings/autopublish.ts
index afc4e7d..d389e2d 100644
--- a/src/commands/settings/autopublish.ts
+++ b/src/commands/settings/autopublish.ts
@@ -20,7 +20,7 @@
.setDescription("Automatically publish messages posted in announcement channels");
export const callback = async (interaction: CommandInteraction): Promise<void> => {
- await interaction.reply({
+ const m = await interaction.reply({
embeds: LoadingEmbed,
ephemeral: true,
fetchReply: true
@@ -70,7 +70,7 @@
let i: Discord.ButtonInteraction | Discord.ChannelSelectMenuInteraction;
try {
i = (await interaction.channel!.awaitMessageComponent({
- filter: (i: Discord.Interaction) => i.user.id === interaction.user.id,
+ filter: (i: Discord.Interaction) => i.user.id === interaction.user.id && i.isMessageComponent() && i.message.id === m.id,
time: 300000
})) as Discord.ButtonInteraction | Discord.ChannelSelectMenuInteraction;
} catch (e) {