Postable
Properties
Type:
MessageAsync iterator for all messages in the thread.
Messages are yielded in chronological order (oldest first).
Automatically handles pagination.Type:
ChannelGet the Channel containing this threadType:
MessageIterate messages newest first (backward from most recent).
Auto-paginates lazily — only fetches pages as consumed.Type:
MessageRecently fetched messages (cached)Aborted when the platform or application stops the active turn.Pass this to AI/model APIs so cancellation stops upstream generation, not
only message delivery.
Methods
createSentMessageFromMessage()
Parameters
Type:
MessageReturns
SentMessage
getParticipants()
Returns
Author
Array of unique non-bot authors
isSubscribed()
Returns
Promise<boolean>
Promise resolving to true if subscribed, false otherwise
markAsRead()
Message or a message ID to target one explicitly;
a Message must belong to this thread.
Platforms may treat the receipt as a watermark and mark earlier messages
read along with the target.
Parameters
Type:
MessageMessage or message ID to acknowledge; defaults to the current messageReturns
Promise<void>
mentionUser()
Parameters
Returns
string
post()
Parameters
Type: one of
T-
PostableRawPostableMarkdownPostableAstPostableCardCardElementTextElementImageElementDividerElementActionsElementSectionElementFieldsElementLinkElementTableElementChartElementModalElementCardJSXElementCardJSXPropsButtonElementLinkButtonElementFieldElementTextInputElementDateInputElementNumberInputElementSelectElementExternalSelectElementSelectOptionElementRadioSelectElementStreamChunkStreamEventPostableObject
Returns
Promise<T> | SentMessage
A SentMessage with methods to edit, delete, or add reactions
postEphemeral()
- Slack: Native ephemeral (session-dependent, disappears on reload)
- Google Chat: Native private message (persists, only target user sees it)
- Teams: Native targeted message (public preview)
- Discord: No native support - requires fallbackToDM: true
Parameters
Type:
AuthorUser ID string or Author object (from message.author or event.user)Type:
PostableRawPostableMarkdownPostableAstPostableCardCardElementTextElementImageElementDividerElementActionsElementSectionElementFieldsElementLinkElementTableElementChartElementModalElementCardJSXElementCardJSXPropsButtonElementLinkButtonElementFieldElementTextInputElementDateInputElementNumberInputElementSelectElementExternalSelectElementSelectOptionElementRadioSelectElementMessage content (string, markdown, card, etc.). Streaming is not supported.Returns
EphemeralMessage
EphemeralMessage with usedFallback: true if DM was used, or null
if native ephemeral not supported and fallbackToDM is false
refresh()
recentMessages from the API.
Fetches the latest 50 messages and updates recentMessages.
Returns
Promise<void>
reply()
NotImplementedError on adapters without native reply support.
Parameters
Type:
MessageThe message to reply to, or its id. Prefer passing the
Message: it is checked against this thread, and it is carried through
to SentMessage.replyTo and cached thread history. A raw id is resolved
only if it matches a message this thread already holds (recentMessages
or the message being handled); otherwise the reply is still sent, but
replyTo is left undefined and no cross-thread check happens.Type:
PostableRawPostableMarkdownPostableAstPostableCardCardElementTextElementImageElementDividerElementActionsElementSectionElementFieldsElementLinkElementTableElementChartElementStreamChunkStreamEventModalElementCardJSXElementCardJSXPropsButtonElementLinkButtonElementFieldElementTextInputElementDateInputElementNumberInputElementSelectElementExternalSelectElementSelectOptionElementRadioSelectElementReply content. Streams are buffered and posted as one
message rather than streamed edit-by-edit.Returns
SentMessage
schedule()
Parameters
Type:
PostableRawPostableMarkdownPostableAstPostableCardCardElementTextElementImageElementDividerElementActionsElementSectionElementFieldsElementLinkElementTableElementChartElementModalElementCardJSXElementCardJSXPropsButtonElementLinkButtonElementFieldElementTextInputElementDateInputElementNumberInputElementSelectElementExternalSelectElementSelectOptionElementRadioSelectElementThe message content (streaming not supported)Returns
ScheduledMessage
A ScheduledMessage with cancel() capability
setState()
Parameters
Returns
Promise<void>
startTyping()
Parameters
Returns
Promise<void>
subscribe()
onSubscribedMessage
handlers. DM threads route to onDirectMessage first when a direct
message handler is registered.
The initial message that triggered subscription will NOT fire the handler.
Returns
Promise<void>
toJSON()
Returns
SerializedThread
unsubscribe()
onSubscribedMessage handlers.
Returns
Promise<void>