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

Constructor

Parameters

ChannelImplConfig
required

Returns

ChannelImpl

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<unknown>>
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

[WORKFLOW_DESERIALIZE]()

Parameters

Returns

ChannelImpl

[WORKFLOW_SERIALIZE]()

Parameters

required

Returns

SerializedChannel

fetchMetadata()

Fetch channel metadata from the platform

Returns

ChannelInfo

fromJSON()

Parameters

Adapter<unknown, unknown>
Type: Adapter
ChatSingleton

Returns

ChannelImpl

mentionUser()

Get a platform-specific mention string for a user.

Parameters

string
required

Returns

string

post()

Post a message.

Parameters

Returns

Promise<T> | 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

toJSON()

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

Returns

SerializedChannel