mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-01-11 22:51:06 +03:00
fix(sample): use update decorator for greeter
This commit is contained in:
parent
8fcec73afd
commit
4420e01d8a
@ -1,9 +1,13 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Hears } from '../../lib';
|
||||
import { Hears, Start, Update } from '../../lib';
|
||||
import { Context } from '../interfaces/context.interface';
|
||||
|
||||
@Injectable()
|
||||
@Update()
|
||||
export class GreeterUpdate {
|
||||
@Start()
|
||||
async onStart(ctx: Context): Promise<void> {
|
||||
await ctx.reply('Say hello to me');
|
||||
}
|
||||
|
||||
@Hears(['hi', 'hello', 'hey', 'qq'])
|
||||
async onGreetings(ctx: Context): Promise<void> {
|
||||
const { first_name } = ctx.from;
|
||||
|
Loading…
Reference in New Issue
Block a user