bot: decrease polling timeout

This commit is contained in:
stefanodvx 2025-04-14 17:14:31 +02:00
parent 2e9694689f
commit 386c3991cd
2 changed files with 2 additions and 5 deletions

View file

@ -3,7 +3,6 @@ package core
import ( import (
"context" "context"
"fmt" "fmt"
"log"
"path/filepath" "path/filepath"
"strings" "strings"
@ -230,8 +229,6 @@ func SendErrorMessage(
ctx *ext.Context, ctx *ext.Context,
errorMessage string, errorMessage string,
) { ) {
log.Println(errorMessage)
switch { switch {
case ctx.Update.Message != nil: case ctx.Update.Message != nil:
ctx.EffectiveMessage.Reply( ctx.EffectiveMessage.Reply(

View file

@ -45,9 +45,9 @@ func Start() {
err = updater.StartPolling(b, &ext.PollingOpts{ err = updater.StartPolling(b, &ext.PollingOpts{
DropPendingUpdates: true, DropPendingUpdates: true,
GetUpdatesOpts: &gotgbot.GetUpdatesOpts{ GetUpdatesOpts: &gotgbot.GetUpdatesOpts{
Timeout: 9 * 60, Timeout: 9,
RequestOpts: &gotgbot.RequestOpts{ RequestOpts: &gotgbot.RequestOpts{
Timeout: time.Minute * 10, Timeout: time.Second * 10,
}, },
AllowedUpdates: AllowedUpdates, AllowedUpdates: AllowedUpdates,
}, },