(commandData)
| 10 | const COMMAND_COUNT_WARN_THRESHOLD = 90; |
| 11 | |
| 12 | function getSubcommandInfo(commandData) { |
| 13 | const subcommands = []; |
| 14 | |
| 15 | if (commandData.options) { |
| 16 | for (const option of commandData.options) { |
| 17 | if (option.type === 1) { |
| 18 | subcommands.push(option.name); |
| 19 | } else if (option.type === 2) { |
| 20 | if (option.options) { |
| 21 | for (const subOption of option.options) { |
| 22 | if (subOption.type === 1) { |
| 23 | subcommands.push(`${option.name}/${subOption.name}`); |
| 24 | } |
| 25 | } |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | return subcommands; |
| 32 | } |
| 33 | |
| 34 | async function getAllFiles(directory, fileList = []) { |
| 35 | const files = await fs.readdir(directory, { withFileTypes: true }); |
no outgoing calls
no test coverage detected