From 189efda9d25f8d645521c59a84b2eedb75af185a Mon Sep 17 00:00:00 2001 From: jacoobes Date: Fri, 11 Feb 2022 09:04:35 -0600 Subject: [PATCH] add eslint rule, careful of null assertions --- .eslintrc | 4 +++- src/handler/sern.ts | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index 63c1d4b..f3560a0 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,5 +2,7 @@ "parser": "@typescript-eslint/parser", "extends": ["plugin:@typescript-eslint/recommended"], "parserOptions": { "ecmaVersion": "esnext", "sourceType": "" }, - "rules": {} + "rules": { + "@typescript-eslint/no-non-null-assertion": "off" + } } \ No newline at end of file diff --git a/src/handler/sern.ts b/src/handler/sern.ts index 56e3784..8629221 100644 --- a/src/handler/sern.ts +++ b/src/handler/sern.ts @@ -23,6 +23,10 @@ export class Handler { this.client + /** + * On ready, builds command data and registers them all + * from command directory + **/ .on("ready", async () => { Files.buildData(this) .then(this.registerModules); @@ -124,7 +128,7 @@ export class Handler { await this.reloadSlash(cmdName, mod.desc, options) } case "public": { - // creating global commands! + // creating global commands! this.client.application!.commands .create({ name: cmdName,