From 216a7756d8de32cecf805f45a5359217f21f2b99 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sun, 30 Jan 2022 00:30:55 -0600 Subject: [PATCH] cleaner enum Command Types --- src/handler/sern/sern.ts | 5 ++++- src/types/handler/handler.ts | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/handler/sern/sern.ts b/src/handler/sern/sern.ts index 62124b8..e562919 100644 --- a/src/handler/sern/sern.ts +++ b/src/handler/sern/sern.ts @@ -20,7 +20,10 @@ export namespace Sern { this.wrapper.client .on("ready", async () => { if (this.wrapper.init !== undefined) this.wrapper.init(); - await Files.registerModules(this.wrapper.commands); + Files.registerModules(this.wrapper.commands) + .then( (_ : void)=> { + /// register slash commands + }); }) .on("messageCreate", async message => { diff --git a/src/types/handler/handler.ts b/src/types/handler/handler.ts index bf7d277..d710eb2 100644 --- a/src/types/handler/handler.ts +++ b/src/types/handler/handler.ts @@ -13,6 +13,6 @@ export type MessagePackage = { export type delegate = Sern.Module["delegate"] export enum CommandType { - TEXT = 0b00000001 << 0b00000001, - SLASH = 0b00000001 << 0b00000010, + TEXT = 1 << 1, + SLASH = 1 << 2, } \ No newline at end of file