| 9258 | 9258 | helpString: 'Disables instruct mode', |
| 9259 | 9259 | })); |
| 9260 | 9260 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 9261 | + name: 'instruct-state', |
| 9262 | + aliases: ['instruct-toggle'], |
| 9263 | + helpString: 'Gets the current instruct mode state. If an argument is provided, it will set the instruct mode state.', |
| 9264 | + unnamedArgumentList: [ |
| 9265 | + SlashCommandArgument.fromProps({ |
| 9266 | + description: 'instruct mode state', |
| 9267 | + typeList: [ARGUMENT_TYPE.BOOLEAN], |
| 9268 | + enumList: commonEnumProviders.boolean('trueFalse')(), |
| 9269 | + }), |
| 9270 | + ], |
| 9271 | + callback: async (_args, state) => { |
| 9272 | + if (!state || typeof state !== 'string') { |
| 9273 | + return String(power_user.instruct.enabled); |
| 9274 | + } |
| 9275 | + |
| 9276 | + const newState = isTrueBoolean(state); |
| 9277 | + newState ? enableInstructCallback() : disableInstructCallback(); |
| 9278 | + return String(power_user.instruct.enabled); |
| 9279 | + }, |
| 9280 | + })); |
| 9281 | + SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 9261 | 9282 | name: 'context', |
| 9262 | 9283 | callback: selectContextCallback, |
| 9263 | 9284 | returns: 'template name', |