-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
38 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
// default example | ||
// import { readFile } from 'fs/promises'; | ||
// example of config file | ||
import { readFile } from 'fs/promises'; | ||
|
||
// const version = JSON.parse(await readFile(new URL('../package.json', import.meta.url))).version; | ||
// App version | ||
const version = JSON.parse(await readFile(new URL('../package.json', import.meta.url))).version; | ||
|
||
export default { | ||
botConfig: { | ||
botDataDir: process.env.TG_BOT_DIR_INFO || './botData', | ||
apiId: parseInt(process.env.TG_BOT_API_ID), | ||
apiHash: process.env.TG_BOT_API_HASH, | ||
token: process.env.TG_BOT_TOKEN, | ||
deviceModel: process.env.TG_BOT_DEVICE_MODEL || 'Linux BotServer', | ||
appVersion: process.env.TG_BOT_APP_VERSION || '1.0', | ||
systemVersion: process.env.TG_BOT_SYSTEM_VERSION || '1.0', | ||
connectionLangCode: process.env.TG_BOT_CONNECTION_LANG_CODE || 'en', | ||
systemLangCode: process.env.TG_BOT_SYSTEM_LANG_CODE || 'en', | ||
connectionRetries: parseInt(process.env.TG_BOT_CONNECTION_RETRIES) || 5, | ||
useWSS: process.env.TG_BOT_USE_WSS?.toLowerCase() === 'true', | ||
testServers: process.env.TG_BOT_TEST_SERVERS?.toLowerCase() === 'true', | ||
appVersion: process.env.TG_BOT_APP_VERSION || version, | ||
// systemVersion: process.env.TG_BOT_SYSTEM_VERSION || '', | ||
// connectionLangCode: process.env.TG_BOT_CONNECTION_LANG_CODE || 'en', | ||
// systemLangCode: process.env.TG_BOT_SYSTEM_LANG_CODE || 'en', | ||
// connectionRetries: parseInt(process.env.TG_BOT_CONNECTION_RETRIES) || Infinity, | ||
// useWSS: process.env.TG_BOT_USE_WSS?.toLowerCase() === 'true', | ||
// testServers: process.env.TG_BOT_TEST_SERVERS?.toLowerCase() === 'true', | ||
|
||
dcId: parseInt(process.env.TG_BOT_DC_ID) || null, | ||
serverAddress: process.env.TG_BOT_SERVER_ADDRESS || '', | ||
serverPort: parseInt(process.env.TG_BOT_SERVER_PORT) || null, | ||
// dcId: parseInt(process.env.TG_BOT_DC_ID) || null, | ||
// serverAddress: process.env.TG_BOT_SERVER_ADDRESS || '', | ||
// serverPort: parseInt(process.env.TG_BOT_SERVER_PORT) || null, | ||
|
||
// Bot info | ||
profilePhotoUrl: process.env.TG_BOT_PROFILE_PHOTO_URL || null, | ||
name: process.env.TG_BOT_NAME || 'TeleBuilder Bot', | ||
about: process.env.TG_BOT_ABOUT || 'TeleBuilder Bot about', | ||
description: process.env.TG_BOT_DESCRIPTION || 'TeleBuilder Bot description', | ||
botInfoLangCode: process.env.TG_BOT_INFO_LANG_CODE || '', | ||
// profilePhotoUrl: process.env.TG_BOT_PROFILE_PHOTO_URL || null, | ||
// name: process.env.TG_BOT_NAME || 'TeleBuilder Bot', | ||
// about: process.env.TG_BOT_ABOUT || 'TeleBuilder Bot about', | ||
// description: process.env.TG_BOT_DESCRIPTION || 'TeleBuilder Bot description', | ||
// botInfoLangCode: process.env.TG_BOT_INFO_LANG_CODE || '', | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters