From 463246e12fe5d43078a1f147d4599c3202a51792 Mon Sep 17 00:00:00 2001 From: Tolfx Date: Tue, 17 Jan 2023 15:56:20 +0100 Subject: [PATCH] feat: added missing opts (#1475) --- src/classes/Commands/CommandHandler.ts | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/classes/Commands/CommandHandler.ts b/src/classes/Commands/CommandHandler.ts index 2cf380071..a2c0578fa 100644 --- a/src/classes/Commands/CommandHandler.ts +++ b/src/classes/Commands/CommandHandler.ts @@ -7,6 +7,7 @@ import CartQueue from '../Carts/CartQueue'; import Cart from '../Carts/Cart'; import { UnknownDictionary } from '../../types/common'; import Inventory from '../Inventory'; +import * as c from './sub-classes/export'; // Import all commands import InformationCommands from './commands/information'; @@ -69,6 +70,24 @@ function hasAliases(command: ICommand): command is ICommand & { aliases: string[ } export default class CommandHandler { + private manager: c.ManagerCommands; + + private message: c.MessageCommand; + + private misc: c.MiscCommands; + + private opt: c.OptionsCommand; + + private pManager: c.PricelistManager; + + private request: c.RequestCommands; + + private review: c.ReviewCommands; + + private status: c.StatusCommands; + + private crafting: c.CraftingCommands; + isDonating = false; adminInventoryReset: NodeJS.Timeout; @@ -82,6 +101,15 @@ export default class CommandHandler { constructor(private readonly bot: Bot, private readonly pricer: IPricer) { this.commands = new Map(); this.commandsPointAliases = new Map(); + this.manager = new c.ManagerCommands(bot); + this.message = new c.MessageCommand(bot); + this.misc = new c.MiscCommands(bot); + this.opt = new c.OptionsCommand(bot); + this.pManager = new c.PricelistManager(bot, pricer); + this.request = new c.RequestCommands(bot, pricer); + this.review = new c.ReviewCommands(bot); + this.status = new c.StatusCommands(bot); + this.crafting = new c.CraftingCommands(bot); } public registerCommands(): void { @@ -211,4 +239,12 @@ export default class CommandHandler { ); } } + + useStatsCommand(steamID: SteamID): void { + void this.status.statsCommand(steamID); + } + + useUpdateOptionsCommand(steamID: SteamID | null, message: string): void { + this.opt.updateOptionsCommand(steamID, message); + } }