Skip to content

Commit

Permalink
Add Util.baseCommandNames
Browse files Browse the repository at this point in the history
makes it a bit easier to disable all base commands, rather than typing them all out
  • Loading branch information
zajrik committed Jun 8, 2017
1 parent 78820fa commit ba89cec
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/BaseCommandName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* 'eval',
* 'eval:ts',
* 'help',
* 'ping'
* 'ping',
* 'reload',
* 'setprefix',
* 'version'
Expand Down
27 changes: 27 additions & 0 deletions src/util/Util.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,37 @@
import { BaseCommandName } from '../types/BaseCommandName';

/**
* Utility class containing handy static methods that can
* be used anywhere
* @module Util
*/
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
Expand Down

0 comments on commit ba89cec

Please sign in to comment.