From 4420e01d8aca2581432106a42356eab50c782862 Mon Sep 17 00:00:00 2001 From: Morb0 Date: Sun, 3 Jan 2021 16:21:25 +0300 Subject: [PATCH] fix(sample): use update decorator for greeter --- sample/greeter/greeter.update.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sample/greeter/greeter.update.ts b/sample/greeter/greeter.update.ts index cdb0bae..6d387c3 100644 --- a/sample/greeter/greeter.update.ts +++ b/sample/greeter/greeter.update.ts @@ -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 { + await ctx.reply('Say hello to me'); + } + @Hears(['hi', 'hello', 'hey', 'qq']) async onGreetings(ctx: Context): Promise { const { first_name } = ctx.from;