Force command names as lowercase

This commit is contained in:
Jason Durand 2020-03-08 18:18:44 -04:00
parent cb09663742
commit 3bcb88d41c

View File

@ -38,6 +38,7 @@ export class CommandCollection {
} }
export class Command { export class Command {
name : string;
description? : string; description? : string;
args? : string[]; args? : string[];
guildOnly? : boolean; guildOnly? : boolean;
@ -47,7 +48,7 @@ export class Command {
permissions? : string[]; permissions? : string[];
constructor( constructor(
public name : string, name : string,
public execute : (message? : Message, args? : string[], client? : CustomClient) => void, public execute : (message? : Message, args? : string[], client? : CustomClient) => void,
{ {
description = null as string, description = null as string,
@ -59,6 +60,7 @@ export class Command {
permissions = null as string[], permissions = null as string[],
} }
) { ) {
this.name = name.toLowerCase();
this.description = description; this.description = description;
this.args = args; this.args = args;
this.guildOnly = guildOnly; this.guildOnly = guildOnly;