mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2024-12-28 08:38:09 +03:00
13 lines
358 B
TypeScript
13 lines
358 B
TypeScript
import { Injectable } from '@nestjs/common';
|
|
import { Hears } from '../../lib';
|
|
import { Context } from '../interfaces/context.interface';
|
|
|
|
@Injectable()
|
|
export class GreeterUpdate {
|
|
@Hears(['hi', 'hello', 'hey', 'qq'])
|
|
async onGreetings(ctx: Context): Promise<void> {
|
|
const { first_name } = ctx.from;
|
|
await ctx.reply(`Hey ${first_name}`);
|
|
}
|
|
}
|