Conversational interfaces for grammY
type alias Conversation
import { type Conversation } from "";

This should be the first parameter in your conversation builder function.

This object gives you access to your conversation. You can think of it as a handle which lets you perform basic operations in your conversation, such as waiting for new messages.

Typically, a conversation builder function has this signature:

async function greet(conversation: Conversation<MyContext>, ctx: MyContext) {
  // define your conversation here

It may be helpful to define a type alias.

type MyConversation = Conversation<MyContext>

async function greet(conversation: MyConversation, ctx: MyContext) {
  // define your conversation here

Check out the documentation to learn more about how to create conversations.