mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2024-12-24 23:14:39 +03:00
26 lines
637 B
TypeScript
26 lines
637 B
TypeScript
import { Module, DynamicModule } from '@nestjs/common';
|
|
import { TelegrafCoreModule } from './telegraf-core.module';
|
|
import {
|
|
TelegrafModuleOptions,
|
|
TelegrafModuleAsyncOptions,
|
|
} from './interfaces';
|
|
|
|
@Module({})
|
|
export class TelegrafModule {
|
|
public static forRoot(options?: TelegrafModuleOptions): DynamicModule {
|
|
return {
|
|
module: TelegrafModule,
|
|
imports: [TelegrafCoreModule.forRoot(options)],
|
|
};
|
|
}
|
|
|
|
public static forRootAsync(
|
|
options: TelegrafModuleAsyncOptions,
|
|
): DynamicModule {
|
|
return {
|
|
module: TelegrafModule,
|
|
imports: [TelegrafCoreModule.forRootAsync(options)],
|
|
};
|
|
}
|
|
}
|