feat(): multiple instances support

This commit is contained in:
Alexander Bukhalo
2021-01-02 01:27:01 +03:00
parent b1a6e50f8f
commit ccb2db0106
14 changed files with 263 additions and 122 deletions

View 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
View File

@@ -0,0 +1 @@
export * from './get-bot-token.util';