diff --git a/lib/interfaces/telegraf-options.interface.ts b/lib/interfaces/telegraf-options.interface.ts index d9b9c33..8000cc6 100644 --- a/lib/interfaces/telegraf-options.interface.ts +++ b/lib/interfaces/telegraf-options.interface.ts @@ -24,7 +24,7 @@ export interface TelegrafOptionsFactory { export interface TelegrafModuleAsyncOptions extends Pick { - botName?: string; + name?: string; useExisting?: Type; useClass?: Type; useFactory?: ( diff --git a/lib/telegraf-core.module.ts b/lib/telegraf-core.module.ts index 8707c67..eb2e94f 100644 --- a/lib/telegraf-core.module.ts +++ b/lib/telegraf-core.module.ts @@ -14,19 +14,13 @@ import { TelegrafOptionsFactory, } from './interfaces'; import { TELEGRAF_MODULE_OPTIONS } from './telegraf.constants'; -import { - MetadataAccessorService, - ListenersExplorerService, -} from './services'; +import { MetadataAccessorService, ListenersExplorerService } from './services'; import { getBotToken, createBotFactory } from './utils'; @Global() @Module({ imports: [DiscoveryModule], - providers: [ - ListenersExplorerService, - MetadataAccessorService, - ], + providers: [ListenersExplorerService, MetadataAccessorService], }) export class TelegrafCoreModule implements OnApplicationShutdown { constructor( @@ -57,7 +51,7 @@ export class TelegrafCoreModule implements OnApplicationShutdown { public static forRootAsync( options: TelegrafModuleAsyncOptions, ): DynamicModule { - const telegrafBotName = getBotToken(options.botName); + const telegrafBotName = getBotToken(options.name); const telegrafBotProvider: Provider = { provide: telegrafBotName,