diff --git a/src/interfaces/ICommand.ts b/src/interfaces/ICommand.ts index 432ab70..279551b 100644 --- a/src/interfaces/ICommand.ts +++ b/src/interfaces/ICommand.ts @@ -1,4 +1,4 @@ -export default interface ICommand { +interface BaseCommand { names: string[] | string category: string minArgs?: number @@ -9,10 +9,20 @@ export default interface ICommand { syntax?: string requiredPermissions?: string[] callback?: Function - cooldown?: string - globalCooldown?: string ownerOnly?: boolean hidden?: boolean guildOnly?: boolean testOnly?: boolean } + +interface BaseCommandWithCooldown extends BaseCommand { + cooldown?: string +} + +interface BaseCommandWithCooldown extends BaseCommand { + globalCooldown?: string +} + +type ICommand = BaseCommandWithCooldown | BaseCommandWithGlobalCooldown + +export default ICommand