chat
Table of contents
Classes
Functions
connect
▸ connect(chat
: Chat): Connection
Connect the application to a Chat instance.
see
ConnectionProvider
deprecated
use the channel
parameter to Conversation.execute instead
Parameters:
Name | Type |
---|---|
chat | Chat |
Returns: Connection
createChat
Create a Chat instance to use with an application.
deprecated
Parameters:
Name | Type | Description |
---|---|---|
account? | Account | Dasha account to use. Must be the same as the application's account. If not set, uses the current account. |
Returns: Promise<Chat>
▸ createChat(conversation
: Conversation, options?
: { account?
: Account }): Promise<Chat>
Create a Chat instance to use with a conversation.
Parameters:
Name | Type | Description |
---|---|---|
conversation | Conversation | a conversation to connect to |
options? | object | - |
options.account? | Account | Dasha account to use. Must be the same as the application's account. If not set, uses the current account. |
Returns: Promise<Chat>
createConsoleChat
Create a Chat instance to use with an application.
deprecated
Parameters:
Name | Type | Description |
---|---|---|
account? | Account | Dasha account to use. Must be the same as the application's account. If not set, uses the current account. |
Returns: Promise<Chat>
▸ createConsoleChat(conversation
: Conversation, options?
: { account?
: Account ; syncMode?
: boolean }): Promise<Chat>
Create a Chat instance to use with a conversation.
Parameters:
Name | Type | Description |
---|---|---|
conversation | Conversation | a conversation to connect to |
options? | object | - |
options.account? | Account | Dasha account to use. Must be the same as the application's account. If not set, uses the current account. |
options.syncMode? | boolean | - |
Returns: Promise<Chat>