From ba89cec016efe252952aa50b7bbaa5f62c7271c4 Mon Sep 17 00:00:00 2001 From: Zack Campbell Date: Thu, 8 Jun 2017 14:26:14 -0500 Subject: [PATCH] Add Util.baseCommandNames makes it a bit easier to disable all base commands, rather than typing them all out --- src/types/BaseCommandName.ts | 2 +- src/util/Util.ts | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/types/BaseCommandName.ts b/src/types/BaseCommandName.ts index ecb470cc..41ac0db9 100644 --- a/src/types/BaseCommandName.ts +++ b/src/types/BaseCommandName.ts @@ -11,7 +11,7 @@ * 'eval', * 'eval:ts', * 'help', - * 'ping' + * 'ping', * 'reload', * 'setprefix', * 'version' diff --git a/src/util/Util.ts b/src/util/Util.ts index f05d279f..8f2d558e 100644 --- a/src/util/Util.ts +++ b/src/util/Util.ts @@ -1,3 +1,5 @@ +import { BaseCommandName } from '../types/BaseCommandName'; + /** * Utility class containing handy static methods that can * be used anywhere @@ -5,6 +7,31 @@ */ export class Util { + + /** + * Tangible representation of all base command names + * @static + * @name baseCommandNames + * @type {BaseCommandName[]} + */ + public static baseCommandNames: BaseCommandName[] = + [ + 'blacklist', + 'whitelist', + 'clearlimit', + 'disablegroup', + 'enablegroup', + 'limit', + 'listgroups', + 'eval', + 'eval:ts', + 'help', + 'ping', + 'reload', + 'setprefix', + 'version' + ]; + /** * Pads the right side of a string with spaces to the given length * @static