ConversationBuilder
ref / conversations / ConversationBuilder
A conversation builder function.
This is the type of function that defines a conversation. Conversation buider functions receive as their first argument an instance of Conversation. This allows them to wait for updates and control the conversation in various other ways.
As a second argument, the first context object is received. This context object contains the update that was used to enter the conversation.
Any additional arguments are the values provided to the enter call. Note that there is no type safety for these parameters.
Type Parameters
OC
ts
OC extends Context
C
ts
C extends Context
Type
ts
(
conversation: Conversation<OC, C>,
ctx: C,
...args: any[],
) => Promise<unknown> | unknown