nestjs-telegraf/sample/01-complete-app/app.module.ts

26 lines
808 B
TypeScript
Raw Normal View History

2020-12-26 16:23:54 +03:00
import { Module } from '@nestjs/common';
import { TelegrafModule } from '../lib';
2021-01-03 14:26:32 +03:00
import { EchoModule } from './echo/echo.module';
import { GreeterModule } from './greeter/greeter.module';
import { sessionMiddleware } from './middleware/session.middleware';
2021-01-03 14:26:32 +03:00
import { GreeterBotName } from './app.constants';
2020-12-26 16:23:54 +03:00
@Module({
imports: [
TelegrafModule.forRoot({
token: '1417509321:AAEHz8a2QSAP4cTHh4Z6-ulePysFaUx4SjY', // Don't steal >:(
middlewares: [sessionMiddleware],
2021-01-03 14:26:32 +03:00
include: [EchoModule],
}),
TelegrafModule.forRoot({
2021-01-03 14:26:32 +03:00
name: GreeterBotName,
token: '1435922623:AAHmBmnyqroHxDbuK6OKsLV8Y_oB_Lf9E6E', // Don't steal >:(
middlewares: [sessionMiddleware],
2021-01-03 14:26:32 +03:00
include: [GreeterModule],
2020-12-26 16:23:54 +03:00
}),
2021-01-03 14:26:32 +03:00
EchoModule,
GreeterModule,
2020-12-26 16:23:54 +03:00
],
})
export class AppModule {}