Add name alias

This commit is contained in:
Dragon Fire
2021-06-06 15:11:16 -04:00
parent a473d2f51f
commit e47eef505f
+2
View File
@@ -18,6 +18,8 @@ module.exports = class Registry {
}
registerCommand(command) {
const nameReplaced = command.name.replace(/-/g, '');
if (nameReplaced !== command.name) command.aliases.push(nameReplaced);
for (const alias of command.aliases) {
const replaced = alias.replace(/-/g, '');
if (replaced === alias) continue;