From a473d2f51fc93a3ce7b152908e6a869676a33def Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 6 Jun 2021 15:08:13 -0400 Subject: [PATCH] Auto-add - aliases --- framework/Registry.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/Registry.js b/framework/Registry.js index d0ac8ce3..8827c17b 100644 --- a/framework/Registry.js +++ b/framework/Registry.js @@ -18,6 +18,11 @@ module.exports = class Registry { } registerCommand(command) { + for (const alias of command.aliases) { + const replaced = alias.replace(/-/g, ''); + if (replaced === alias) continue; + command.aliases.push(replaced); + } this.commands.set(command.name, command); return this; }