aboutsummaryrefslogtreecommitdiff
path: root/src/bot.ts
diff options
context:
space:
mode:
authorMax Isom <[email protected]>2020-03-18 18:57:21 -0500
committerMax Isom <[email protected]>2020-03-18 18:57:21 -0500
commitde1e761623f27c6ed0277d85d824c504c39a1188 (patch)
tree68085a4d354500f44f2f3c74c01d12a4eb4b5bc4 /src/bot.ts
parent8340f9b95a377580871d6e73bf87eb29ed69e6c7 (diff)
downloadmuse-de1e761623f27c6ed0277d85d824c504c39a1188.tar.xz
muse-de1e761623f27c6ed0277d85d824c504c39a1188.zip
Add aliases
Diffstat (limited to 'src/bot.ts')
-rw-r--r--src/bot.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bot.ts b/src/bot.ts
index 485becd..b5bde3f 100644
--- a/src/bot.ts
+++ b/src/bot.ts
@@ -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) => {