cleaner enum Command Types

This commit is contained in:
Jacob Nguyen
2022-01-30 00:30:55 -06:00
parent 6a704311f2
commit 216a7756d8
2 changed files with 6 additions and 3 deletions

View File

@@ -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 => {

View File

@@ -13,6 +13,6 @@ export type MessagePackage = {
export type delegate = Sern.Module<unknown>["delegate"]
export enum CommandType {
TEXT = 0b00000001 << 0b00000001,
SLASH = 0b00000001 << 0b00000010,
TEXT = 1 << 1,
SLASH = 1 << 2,
}