Skip to content

Interface: interactions

Generated from zaun:bot@0.2.0 (wit/ in zaun-bot). Do not edit.

Answers to interactions. Only the bot that received an interaction may answer it.

  • use types.{id, host-error, message-body, response}
respond: func(interaction-id: id, response: response) -> result<option<id>, host-error>;

The initial response, within 3 s (the runtime defers automatically at 2.5 s). Returns the message id when the response created a channel message.

followup: func(interaction-id: id, body: message-body) -> result<option<id>, host-error>;

A follow-up message, within 15 minutes; at most 10.

edit-original: func(interaction-id: id, body: message-body) -> result<_, host-error>;

Edits the original response (ends a deferred “thinking” state).

delete-original: func(interaction-id: id) -> result<_, host-error>;

Deletes the original response.