diff --git a/src/Command.ts b/src/Command.ts index 38fb1b6..43b0033 100644 --- a/src/Command.ts +++ b/src/Command.ts @@ -48,9 +48,13 @@ export class Command { */ constructor(options: CommandBuilder) { this.name = options.name.split(" ").join("_"); - this.parameters = options.parameters - ? options.parameters.map((p) => new Parameter(p)) - : [new DefaultParameter()]; + if (options.parameters == "no_input" || !options.parameters) { + this.parameters = []; + } else if (options.parameters == "simple") { + this.parameters = [new DefaultParameter()]; + } else { + this.parameters = options.parameters.map((ps) => new Parameter(ps)); + } this.aliases = Command.processPhrase(options.aliases); this.keywords = Command.processPhrase(options.keywords); this.description = options.description || "No description"; diff --git a/src/types.ts b/src/types.ts index e55219f..6aa9da2 100644 --- a/src/types.ts +++ b/src/types.ts @@ -20,7 +20,7 @@ export type GetMode = "ALL" | "PREFIX" | "NO_PREFIX"; export type PermissionCheckTypes = "ALL" | "ANY"; export interface CommandBuilder { name: string; - parameters?: ParameterSchema[]; + parameters?: ParameterSchema[] | "simple" | "no_input"; aliases?: string[] | string; keywords?: string[] | string; description?: string;