Skip to content

@pumpkin-plugins/apple-skin-pumpkin API / plugin / CommandError

Type Alias: CommandError ​

CommandError = PumpkinCommandError

Defined in: tools/pumpkin-api/src/core.ts:43

Error value a command handler throws to fail a command.

Pumpkin's handle-command export returns result<s32, command-error>, and the runtime turns a thrown value of this type into the err case. Throw { tag: 'command-failed', val } with a text component to show that text to the sender.

pumpkin-plugins documentation