Handling other updates
Handle other updates
How to handle other updates
import { OnCommand, Controller } from 'nestgram';
import { AppService } from './app.service';
@Controller()
export class AppController {
constructor(private readonly appService?: AppService) {}
@OnCommand('start')
async start(): Promise<string> {
return 'Hello, world!';
}
}import { OnPost, Controller, Message, IMessage } from 'nestgram';
import { AppService } from './app.service';
@Controller()
export class AppController {
constructor(private readonly appService?: AppService) {}
@OnPost()
async post(@Message() message: IMessage): Promise<any> {
console.log(message);
}
}Allowed updates
Decorator
Description
Params
Last updated