Auto-add - aliases

This commit is contained in:
Dragon Fire
2021-06-06 15:08:13 -04:00
parent 26e2224e20
commit a473d2f51f
+5
View File
@@ -18,6 +18,11 @@ module.exports = class Registry {
} }
registerCommand(command) { 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); this.commands.set(command.name, command);
return this; return this;
} }