Skip to main content
Represents a channel/conversation container that holds threads. Extends Postable for message posting capabilities.

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.
string | null
required
Channel name (e.g., “#general”). Null until fetchInfo() is called.
Promise<TState | null>
required
Get the current state. Returns null if no state has been set.

Methods

fetchMetadata()

Fetch channel metadata from the platform

Returns

ChannelInfo

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>

threads()

Iterate threads in this channel, most recently active first. Returns ThreadSummary (lightweight) for efficiency. Empty iterable on threadless platforms.

Returns

ThreadSummary

toJSON()

Serialize the channel to a plain JSON object. Use this to pass channel data to external systems like workflow engines.

Returns

SerializedChannel