Constructor
constructor(data, bot)
Parameters
data: ConversationData
Data used to construct the conversation.
bot: Bot
The active Bot instance.
Properties
members: Profile[]
The users that are members in this conversation.
Methods
getMessages(cursor?)
Fetch a list of messages in this conversation. This method returns 100 messages at a time, beginning from the latest message, alongside a cursor to fetch the next 100.
Parameters
cursor?: string
The cursor to begin fetching from.
Returns
Promise<{ cursor: string | undefined; messages: ChatMessage | DeletedChatMessage[]; }>
An array of messages and a cursor for pagination.
sendMessage(payload, options?)
Send a message in the conversation.
Parameters
payload: Omit<ChatMessagePayload, "conversationId">
The message to send.
options?: BotSendMessageOptions
Additional options for sending the message.