(argv: ArgumentsCamelCase<CommandArgs>)
| 35 | |
| 36 | |
| 37 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 38 | const command = await apiCommand(argv) |
| 39 | |
| 40 | const [modeId, locationId] = await chooseMode(command, argv.id, { locationId: argv.location }) |
| 41 | |
| 42 | const mode = await command.client.modes.get(modeId, locationId) |
| 43 | const name = mode.label ?? mode.name ?? 'unnamed mode' |
| 44 | |
| 45 | await command.client.modes.delete(modeId, locationId) |
| 46 | |
| 47 | console.log(`${name} (${mode.id}) deleted`) |
| 48 | } |
| 49 | |
| 50 | const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler } |
| 51 | export default cmd |
nothing calls this directly
no test coverage detected