diff options
| author | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2026-07-22 21:31:59 +0100 |
|---|---|---|
| committer | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2026-07-22 21:31:59 +0100 |
| commit | 2d7362b6fc73f4807f09f6f522fd2e1e2b306e04 (patch) | |
| tree | 9e6c98875c9f95e6f76aeffe1b4fe0aff5cb2d42 | |
| parent | b973e896ca975f4339e2d8fdbd5a4417bd91be29 (diff) | |
| download | unnamed-group-2d7362b6fc73f4807f09f6f522fd2e1e2b306e04.tar unnamed-group-2d7362b6fc73f4807f09f6f522fd2e1e2b306e04.tar.gz unnamed-group-2d7362b6fc73f4807f09f6f522fd2e1e2b306e04.tar.bz2 unnamed-group-2d7362b6fc73f4807f09f6f522fd2e1e2b306e04.tar.xz unnamed-group-2d7362b6fc73f4807f09f6f522fd2e1e2b306e04.zip | |
refactor close-ticket command to validate ticket channel by parent name
| -rw-r--r-- | 174bg/discord-bot/source/commands/close-ticket.js | 2 |
1 files changed, 1 insertions, 1 deletions
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, |
