Add aliases

This commit is contained in:
Max Isom 2020-03-18 18:57:21 -05:00
parent 8340f9b95a
commit de1e761623
15 changed files with 23 additions and 1 deletions

View file

@ -28,7 +28,9 @@ export default class {
public async listen(): Promise<string> {
// Load in commands
container.getAll<Command>(TYPES.Command).forEach(command => {
this.commands.set(command.name, command);
const commandNames = [command.name, ...command.aliases];
commandNames.forEach(commandName => this.commands.set(commandName, command));
});
this.client.on('message', async (msg: Message) => {