From 2d7362b6fc73f4807f09f6f522fd2e1e2b306e04 Mon Sep 17 00:00:00 2001 From: "Alex Pooley (@zuedev)" Date: Wed, 22 Jul 2026 21:31:59 +0100 Subject: refactor close-ticket command to validate ticket channel by parent name --- 174bg/discord-bot/source/commands/close-ticket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '174bg/discord-bot/source/commands/close-ticket.js') diff --git a/174bg/discord-bot/source/commands/close-ticket.js b/174bg/discord-bot/source/commands/close-ticket.js index ca3040e..a4207f9 100644 --- a/174bg/discord-bot/source/commands/close-ticket.js +++ b/174bg/discord-bot/source/commands/close-ticket.js @@ -10,7 +10,7 @@ export default { execute: async (interaction) => { const channel = interaction.channel; - if (!channel || !channel.name.startsWith("ticket-")) { + if (!channel || !channel.parent || channel.parent.name.toLowerCase() !== "tickets") { return await interaction.reply({ content: "This command can only be used in a ticket channel.", ephemeral: true, -- cgit v1.2.3