(commandData, args)
| 29 | } |
| 30 | |
| 31 | export function resolvePrefixAccessKey(commandData, args) { |
| 32 | const options = mapArgumentsToOptions(args, commandData); |
| 33 | const subcommand = options.getSubcommand(); |
| 34 | const subcommandGroup = options.getSubcommandGroup(); |
| 35 | const commandName = getCommandJson(commandData)?.name; |
| 36 | |
| 37 | if (!commandName) { |
| 38 | return null; |
| 39 | } |
| 40 | |
| 41 | if (subcommandGroup && subcommand) { |
| 42 | return `${commandName} ${subcommandGroup} ${subcommand}`; |
| 43 | } |
| 44 | |
| 45 | if (subcommand) { |
| 46 | return `${commandName} ${subcommand}`; |
| 47 | } |
| 48 | |
| 49 | return commandName; |
| 50 | } |
| 51 | |
| 52 | export function createMockInteraction(message, commandData, args) { |
| 53 | const options = mapArgumentsToOptions(args, commandData); |
no test coverage detected