File tree 2 files changed +8
-1
lines changed
packages/client-telegram/src
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,7 @@ HELIUS_API_KEY=
227
227
228
228
# Telegram Configuration
229
229
TELEGRAM_BOT_TOKEN =
230
+ TELEGRAM_API_ROOT =
230
231
231
232
# Together Configuration
232
233
TOGETHER_API_KEY =
Original file line number Diff line number Diff line change @@ -11,11 +11,17 @@ export class TelegramClient {
11
11
private backend ;
12
12
private backendToken ;
13
13
private tgTrader ;
14
+ private options ;
14
15
15
16
constructor ( runtime : IAgentRuntime , botToken : string ) {
16
17
elizaLogger . log ( "📱 Constructing new TelegramClient..." ) ;
18
+ this . options = {
19
+ telegram : {
20
+ apiRoot : runtime . getSetting ( "TELEGRAM_API_ROOT" ) || process . env . TELEGRAM_API_ROOT || "https://api.telegram.org"
21
+ } ,
22
+ } ;
17
23
this . runtime = runtime ;
18
- this . bot = new Telegraf ( botToken ) ;
24
+ this . bot = new Telegraf ( botToken , this . options ) ;
19
25
this . messageManager = new MessageManager ( this . bot , this . runtime ) ;
20
26
this . backend = runtime . getSetting ( "BACKEND_URL" ) ;
21
27
this . backendToken = runtime . getSetting ( "BACKEND_TOKEN" ) ;
You can’t perform that action at this time.
0 commit comments