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) {
diff --git a/src/commands/settings/logs/attachment.ts b/src/commands/settings/logs/attachment.ts
index 3ee7675..62abd7e 100644
--- a/src/commands/settings/logs/attachment.ts
+++ b/src/commands/settings/logs/attachment.ts
@@ -18,7 +18,7 @@
const callback = async (interaction: CommandInteraction): Promise<unknown> => {
if (interaction.guild) client.database.premium.hasPremium(interaction.guild.id).finally(() => {});
- await interaction.reply({
+ const m = await interaction.reply({
embeds: LoadingEmbed,
ephemeral: true,
fetchReply: true
@@ -79,7 +79,7 @@
let i: Discord.ButtonInteraction | Discord.SelectMenuInteraction;
try {
- i = (await interaction.channel!.awaitMessageComponent({
+ i = (await m.awaitMessageComponent({
filter: (i: Discord.Interaction) => i.user.id === interaction.user.id,
time: 300000
})) as Discord.ButtonInteraction | Discord.SelectMenuInteraction;
diff --git a/src/commands/settings/logs/events.ts b/src/commands/settings/logs/events.ts
index 4cffab7..1041409 100644
--- a/src/commands/settings/logs/events.ts
+++ b/src/commands/settings/logs/events.ts
@@ -122,7 +122,7 @@
let i: ButtonInteraction | StringSelectMenuInteraction | ChannelSelectMenuInteraction;
try {
i = (await m.awaitMessageComponent({
- filter: (i) => i.user.id === interaction.user.id,
+ filter: (i) => i.user.id === interaction.user.id && i.isMessageComponent() && i.message.id === m.id,
time: 300000
})) as ButtonInteraction | StringSelectMenuInteraction | ChannelSelectMenuInteraction;
} catch (e) {
diff --git a/src/commands/settings/logs/warnings.ts b/src/commands/settings/logs/warnings.ts
index a810560..35be955 100644
--- a/src/commands/settings/logs/warnings.ts
+++ b/src/commands/settings/logs/warnings.ts
@@ -19,7 +19,7 @@
const callback = async (interaction: CommandInteraction): Promise<unknown> => {
if (!interaction.guild) return;
- await interaction.reply({
+ const m = await interaction.reply({
embeds: LoadingEmbed,
ephemeral: true,
fetchReply: true
@@ -67,7 +67,7 @@
let i: Discord.ButtonInteraction | Discord.ChannelSelectMenuInteraction;
try {
i = await interaction.channel!.awaitMessageComponent<ComponentType.Button | ComponentType.ChannelSelect>({
- 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
});
} catch (e) {