diff --git a/src/core/command.ts b/src/core/command.ts index 7ba0f02..b5fa826 100644 --- a/src/core/command.ts +++ b/src/core/command.ts @@ -182,12 +182,16 @@ export async function loadCommands(): Promise> { if (cmd.isDirectory()) { if (cmd.name === "subcommands") continue; else $.warn(`You can't have multiple levels of directories! From: "dist/commands/${cmd.name}"`); - } else loadCommand(cmd.name, list, selected.name); + } else if (cmd.name.endsWith(".js")) { + loadCommand(cmd.name, list, selected.name); + } } subdir.close(); categories.set(category, list); - } else loadCommand(selected.name, listMisc); + } else if (selected.name.endsWith(".js")) { + loadCommand(selected.name, listMisc); + } } dir.close(); @@ -236,7 +240,7 @@ export default new Command({ permission: null, aliases: [], async run($: CommonLibrary): Promise { - + }, subcommands: { layer: new Command({ @@ -246,7 +250,7 @@ export default new Command({ permission: null, aliases: [], async run($: CommonLibrary): Promise { - + } }) }, @@ -256,7 +260,7 @@ export default new Command({ usage: '', permission: null, async run($: CommonLibrary): Promise { - + } }), number: new Command({ @@ -265,7 +269,7 @@ export default new Command({ usage: '', permission: null, async run($: CommonLibrary): Promise { - + } }), any: new Command({ @@ -274,7 +278,7 @@ export default new Command({ usage: '', permission: null, async run($: CommonLibrary): Promise { - + } }) });`; diff --git a/tsconfig.json b/tsconfig.json index ba4dd11..34245ef 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "rootDir": "src", "outDir": "dist", - "target": "ES6", + "target": "es2019", "module": "CommonJS", "moduleResolution": "node", "esModuleInterop": true, @@ -11,7 +11,8 @@ "strictNullChecks": true, "strictFunctionTypes": true, "strictPropertyInitialization": true, - "removeComments": true + "removeComments": true, + "sourceMap": true }, "exclude": ["test"] }