From c87d00eeefaceba46d67971396f6ad545df9c6c0 Mon Sep 17 00:00:00 2001 From: Evorp <3vorpgaming@gmail.com> Date: Wed, 6 Dec 2023 17:06:01 -0800 Subject: [PATCH] remove submission channel lacklist you can just turn off slash commands in that channel lol --- lang/en-US/commands.json | 4 ---- src/events/slashCommandUsed.ts | 21 +-------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/lang/en-US/commands.json b/lang/en-US/commands.json index 3f3f547a..bd1b4361 100644 --- a/lang/en-US/commands.json +++ b/lang/en-US/commands.json @@ -19,10 +19,6 @@ "description": "You cannot botban yourself, a developer, or someone with administrator permissions." } }, - "in_submission": { - "title": "You cannot run slash commands in a submission channel!", - "description": "Please use the appropriate bot command channel instead." - }, "images": { "too_big": "This image is too big to %ACTION%!", "actions": { diff --git a/src/events/slashCommandUsed.ts b/src/events/slashCommandUsed.ts index f542660b..61900af4 100644 --- a/src/events/slashCommandUsed.ts +++ b/src/events/slashCommandUsed.ts @@ -1,31 +1,12 @@ import { SlashCommandI } from "@interfaces/commands"; -import { Submissions } from "@interfaces/firestorm"; import { Collection } from "discord.js"; import { Event } from "@interfaces/events"; -import { Client, ChatInputCommandInteraction, EmbedBuilder } from "@client"; -import { colors } from "@utility/colors"; -import axios from "axios"; +import { Client, ChatInputCommandInteraction } from "@client"; export default { name: "slashCommandUsed", async execute(client: Client, interaction: ChatInputCommandInteraction) { client.storeAction("slashCommand", interaction); - const packs: Submissions = (await axios.get(`${client.tokens.apiUrl}settings/submission.packs`)) - .data; - - const submissionChannels = Object.values(packs).map((pack) => pack.channels.submit); - - // disable commands - if (submissionChannels.includes(interaction.channel.id)) - return interaction.reply({ - embeds: [ - new EmbedBuilder() - .setTitle(interaction.strings().command.in_submission.title) - .setDescription(interaction.strings().command.in_submission.description) - .setColor(colors.red), - ], - ephemeral: true, - }); // get command name const { commandName } = interaction;