Skip to content

Commit

Permalink
Add BaseCommandName type
Browse files Browse the repository at this point in the history
  • Loading branch information
zajrik committed Mar 15, 2017
1 parent c199eae commit ffd987e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export { ExpectArgType } from './lib/types/ExpectArgType';
export { Guild } from './lib/types/Guild';
export { Message } from './lib/types/Message';
export { ResolveArgType } from './lib/types/ResolveArgType';
export { BaseCommandName } from './lib/types/BaseCommandName';

export const version: string = require(path.join(__dirname, '..', 'package')).version;

Expand Down
13 changes: 13 additions & 0 deletions src/lib/types/BaseCommandName.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export type BaseCommandName = 'blacklist'
| 'whitelist'
| 'clearlimit'
| 'disablegroup'
| 'enablegroup'
| 'limit'
| 'listgroups'
| 'eval'
| 'help'
| 'ping'
| 'reload'
| 'setprefix'
| 'version';
4 changes: 3 additions & 1 deletion src/lib/types/BotOptions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { BaseCommandName } from './BaseCommandName';

export type BotOptions = {
name: string;
token: string;
Expand All @@ -8,7 +10,7 @@ export type BotOptions = {
selfbot?: boolean;
passive?: boolean;
version?: string;
disableBase?: string[];
disableBase?: BaseCommandName[];
config: any;
};

Expand Down
3 changes: 2 additions & 1 deletion src/lib/types/CommandInfo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { PermissionResolvable } from 'discord.js';
import { BaseCommandName } from './BaseCommandName';
import { ArgOpts } from './ArgOpts';

export type CommandInfo = {
Expand All @@ -14,7 +15,7 @@ export type CommandInfo = {
permissions?: PermissionResolvable[];
roles?: string[];
ownerOnly?: boolean;
overloads?: string;
overloads?: BaseCommandName;
};

/**
Expand Down

0 comments on commit ffd987e

Please sign in to comment.