mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-09-23 09:49:06 +03:00
feat(): multiple instances support
This commit is contained in:
7
lib/utils/get-bot-token.util.ts
Normal file
7
lib/utils/get-bot-token.util.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { DEFAULT_BOT_NAME } from '../telegraf.constants';
|
||||
|
||||
export function getBotToken(name?: string) {
|
||||
return name && name !== DEFAULT_BOT_NAME
|
||||
? `${name}_BOT_NAME`
|
||||
: DEFAULT_BOT_NAME;
|
||||
}
|
1
lib/utils/index.ts
Normal file
1
lib/utils/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './get-bot-token.util';
|
Reference in New Issue
Block a user