Skip to main content
Base interface for entities that can receive messages. Both Thread and Channel extend this interface.

Properties

required
The adapter this entity belongs to
The visibility scope of this channel
string
required
Unique ID
boolean
required
Whether this is a direct message conversation
AsyncIterable<Message<TRawMessage>>
required
Type: MessageIterate messages newest first (backward from most recent). Auto-paginates lazily — only fetches pages as consumed.
Promise<TState | null>
required
Get the current state. Returns null if no state has been set.

Methods

mentionUser()

Get a platform-specific mention string for a user.

Parameters

string
required

Returns

string

post()

Post a message.

Parameters

T
required

Returns

Promise<T>

Parameters

Returns

SentMessage

postEphemeral()

Post an ephemeral message visible only to a specific user.

Parameters

string | Author
required
Type: Author

Returns

EphemeralMessage

schedule()

Schedule a message for future delivery. Currently only supported by the Slack adapter. Other adapters will throw NotImplementedError.

Parameters

{ postAt: Date }
required
Scheduling options including the target delivery time

Returns

ScheduledMessage A ScheduledMessage with cancel() capability

setState()

Set the state. Merges with existing state by default.

Parameters

Partial<TState>
required
{ replace: boolean }

Returns

Promise<void>

startTyping()

Show typing indicator

Parameters

string

Returns

Promise<void>