fix(sample): add all project files

This commit is contained in:
Morb0
2021-01-03 17:32:58 +03:00
parent 6f44b52fb5
commit 6b89126b43
20 changed files with 11898 additions and 3998 deletions

View File

@@ -0,0 +1,7 @@
import { Module } from '@nestjs/common';
import { GreeterUpdate } from './greeter.update';
@Module({
providers: [GreeterUpdate],
})
export class GreeterModule {}

View File

@@ -0,0 +1,16 @@
import { Hears, Start, Update } from '../../../../lib';
import { Context } from '../interfaces/context.interface';
@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;
await ctx.reply(`Hey ${first_name}`);
}
}