From 5972ce9e5b49b30db1d2ce874f8c0e4032ad5943 Mon Sep 17 00:00:00 2001 From: Ali Hammoud Date: Mon, 20 Oct 2025 14:03:54 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=90=9B=20fix:=20include=20the=20curre?= =?UTF-8?q?nt=20channel=20in=20the=20list=20of=20channels=20to=20delete=20?= =?UTF-8?q?messages=20from?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commands/moderation/repel.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/commands/moderation/repel.ts b/src/commands/moderation/repel.ts index 15685bb..b8cadea 100644 --- a/src/commands/moderation/repel.ts +++ b/src/commands/moderation/repel.ts @@ -131,7 +131,10 @@ const getTextChannels = (interaction: ChatInputCommandInteraction) => { return []; } const channels = getPublicChannels(interaction.guild).map((c) => c); - return channels; + return [ + interaction.channel as TextChannel, + ...channels.filter((c) => c.id !== interaction.channelId), + ]; }; const handleDeleteMessages = async ({ From 1d5e5bf6b86670354ba53a2ee8c9ccbd1cdc202c Mon Sep 17 00:00:00 2001 From: Ali Hammoud Date: Mon, 20 Oct 2025 15:05:52 +0300 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=94=A8=20refactor:=20rename=20variabl?= =?UTF-8?q?e=20in=20getTextChannels=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commands/moderation/repel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/moderation/repel.ts b/src/commands/moderation/repel.ts index b8cadea..b92d8f3 100644 --- a/src/commands/moderation/repel.ts +++ b/src/commands/moderation/repel.ts @@ -133,7 +133,7 @@ const getTextChannels = (interaction: ChatInputCommandInteraction) => { const channels = getPublicChannels(interaction.guild).map((c) => c); return [ interaction.channel as TextChannel, - ...channels.filter((c) => c.id !== interaction.channelId), + ...channels.filter((channel) => channel.id !== interaction.channelId), ]; }; From 7df2cdb9110692a2d716c540b3eb76cee483bbb0 Mon Sep 17 00:00:00 2001 From: Ali Hammoud Date: Mon, 20 Oct 2025 15:08:22 +0300 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=94=A8=20refactor:=20replace=20.map()?= =?UTF-8?q?=20with=20.values()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commands/moderation/repel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/moderation/repel.ts b/src/commands/moderation/repel.ts index b92d8f3..a52fe91 100644 --- a/src/commands/moderation/repel.ts +++ b/src/commands/moderation/repel.ts @@ -130,7 +130,7 @@ const getTextChannels = (interaction: ChatInputCommandInteraction) => { console.error('Interaction is not in a guild'); return []; } - const channels = getPublicChannels(interaction.guild).map((c) => c); + const channels = getPublicChannels(interaction.guild).values(); return [ interaction.channel as TextChannel, ...channels.filter((channel) => channel.id !== interaction.channelId),