mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Add name alias
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user