Answer class
Sends many messages, reply to the messages in middlewares
Why do you need to use the Answer class?
Get Answer class and use it
import { GetAnswer, Answer, OnCommand, Controller } from 'nestgram';
import { AppService } from './app.service';
@Controller()
export class AppController {
constructor(private readonly appService?: AppService) {}
@OnCommand('start')
async start(@GetAnswer() answer: Answer): Promise<void> {
await answer.send('First message');
await answer.send('Second message');
}
}More info about the Answer class
Add answer class to context
Last updated