mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-10-01 20:41:27 +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;
|
||||
}
|
Reference in New Issue
Block a user