From 96d4fc4949dae3d001d98c785587ea089067c840 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Wed, 7 Feb 2018 00:44:23 -0800 Subject: [PATCH] fix: enable aliases --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index a01fa8b4..23dce6c6 100644 --- a/src/config.ts +++ b/src/config.ts @@ -267,7 +267,7 @@ export class Config implements IConfig { findCommand(id: string, opts: {must: true}): Command.Plugin findCommand(id: string, opts?: {must: boolean}): Command.Plugin | undefined findCommand(id: string, opts: {must?: boolean} = {}): Command.Plugin | undefined { - let command = this.commands.find(c => c.id === id) + let command = this.commands.find(c => c.id === id || c.aliases.includes(id)) if (command) return command if (opts.must) error(`command ${id} not found`) }