Merge pull request #28 from gabi-simons/fix/sandbox-proxy-agent
fix: use https.globalAgent in grammY Bot for sandbox proxy
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import https from 'https';
|
||||||
import { Api, Bot } from 'grammy';
|
import { Api, Bot } from 'grammy';
|
||||||
|
|
||||||
import { ASSISTANT_NAME, TRIGGER_PATTERN } from '../config.js';
|
import { ASSISTANT_NAME, TRIGGER_PATTERN } from '../config.js';
|
||||||
@@ -53,7 +54,11 @@ export class TelegramChannel implements Channel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async connect(): Promise<void> {
|
async connect(): Promise<void> {
|
||||||
this.bot = new Bot(this.botToken);
|
this.bot = new Bot(this.botToken, {
|
||||||
|
client: {
|
||||||
|
baseFetchConfig: { agent: https.globalAgent, compress: true },
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
// Command to get chat ID (useful for registration)
|
// Command to get chat ID (useful for registration)
|
||||||
this.bot.command('chatid', (ctx) => {
|
this.bot.command('chatid', (ctx) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user