mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-31 14:15:25 +00:00
Enable handlerTimeout
Hopfully works around https://github.com/telegraf/telegraf/issues/735 #118
This commit is contained in:
10
bot/index.js
10
bot/index.js
@@ -1,12 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
const Telegraf = require('telegraf');
|
||||
const ms = require('millisecond');
|
||||
const { Telegraf } = require('telegraf');
|
||||
const { config } = require('../utils/config');
|
||||
|
||||
/** @typedef { import('../typings/context').ExtendedContext } ExtendedContext */
|
||||
|
||||
/** @type { import('telegraf/typings').Telegraf<ExtendedContext> } */
|
||||
const bot = new Telegraf(config.token);
|
||||
/** @type { Telegraf<ExtendedContext> } */
|
||||
const bot = new Telegraf(config.token, {
|
||||
handlerTimeout: ms('5s'),
|
||||
telegram: { webhookReply: false },
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
bot.polling.offset = -1;
|
||||
|
Reference in New Issue
Block a user