Skip to main content

Await messages

The promise resolves with whatever was collected before timeout, not by throwing.

Await a component click

Send files

You can send files from memory:
Or from disk:
V2 modal upload fields surface submitted files through ctx.attachments[fieldId]. That gives you resolved attachment objects rather than only raw IDs.

Worth knowing

  • awaitMessages(...) resolves with the messages collected so far when time runs out
  • awaitComponent(...) resolves to null on timeout, so timeout handling should be explicit
  • AttachmentBuilder works with both disk paths and in-memory buffers
Last modified on June 13, 2026