From 6c31dc03013e22a3f4fdae27de042e12a7f0e871 Mon Sep 17 00:00:00 2001 From: JustEvil <71156616+EvilG-MC@users.noreply.github.com> Date: Thu, 7 Nov 2024 10:45:10 -0600 Subject: [PATCH] feat: add ignore command logic to shouldUpload method (#292) --- src/commands/handler.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commands/handler.ts b/src/commands/handler.ts index d0f964f..2bb4e43 100644 --- a/src/commands/handler.ts +++ b/src/commands/handler.ts @@ -19,7 +19,7 @@ import { } from '../types'; import { Command, type CommandOption, SubCommand } from './applications/chat'; import { ContextMenuCommand } from './applications/menu'; -import type { UsingClient } from './applications/shared'; +import { IgnoreCommand, type UsingClient } from './applications/shared'; export class CommandHandler extends BaseHandler { values: (Command | ContextMenuCommand)[] = []; @@ -170,7 +170,9 @@ export class CommandHandler extends BaseHandler { async shouldUpload(file: string, guildId?: string) { const values = this.values.filter(x => { + if ('ignore' in x && x.ignore === IgnoreCommand.Slash) return false; if (!guildId) return !x.guildId; + return x.guildId?.includes(guildId); }); if (