mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 14:21:41 +02:00
Command names can include dashes
This commit is contained in:
@@ -33,7 +33,7 @@ module.exports = class UnknownCommandCommand extends Command {
|
|||||||
for (const command of this.client.registry.commands.values()) {
|
for (const command of this.client.registry.commands.values()) {
|
||||||
if (!owner && command.ownerOnly) continue;
|
if (!owner && command.ownerOnly) continue;
|
||||||
if (command.hidden) continue;
|
if (command.hidden) continue;
|
||||||
arr.push(command.name);
|
if (!command.name.includes('-')) arr.push(command.name);
|
||||||
arr.push(...command.aliases.filter(alias => !alias.includes('-')));
|
arr.push(...command.aliases.filter(alias => !alias.includes('-')));
|
||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
|
|||||||
Reference in New Issue
Block a user