mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
fullCommandName
This commit is contained in:
parent
dbad537eae
commit
647f7d11d0
@ -33,7 +33,9 @@ function getCommandFromContent(
|
|||||||
const groupName = commandRaw.length === 3 ? commandRaw[1] : undefined;
|
const groupName = commandRaw.length === 3 ? commandRaw[1] : undefined;
|
||||||
const subcommandName = groupName ? commandRaw[2] : commandRaw[1];
|
const subcommandName = groupName ? commandRaw[2] : commandRaw[1];
|
||||||
const parent = self.commands.values.find(x => x.name === parentName);
|
const parent = self.commands.values.find(x => x.name === parentName);
|
||||||
const fullCommandName = `${parentName}${groupName ? ` ${groupName} ${subcommandName}` : ` ${subcommandName ?? ''}`}`;
|
const fullCommandName = `${parentName}${
|
||||||
|
groupName ? ` ${groupName} ${subcommandName}` : `${subcommandName ? ` ${subcommandName}` : ''}`
|
||||||
|
}`;
|
||||||
|
|
||||||
if (!(parent instanceof Command)) return { fullCommandName };
|
if (!(parent instanceof Command)) return { fullCommandName };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user