Long-polling errors seem to be due to tthe dev server crashes earlier.
This commit is contained in:
Benjamin A. Shelton 2026-10-20 22:36:00 -06:00
commit 216ec90646
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01
2 changed files with 6 additions and 2 deletions

View file

@ -8,6 +8,7 @@ import (
"os"
"os/signal"
"slices"
"time"
"code.destrealm.net/zancarius/justusbot/internal/settings"
"github.com/mymmrac/telego"
@ -227,7 +228,9 @@ func (b *bot) SetPolling(ctx context.Context, conf *settings.Settings) (err erro
}
}
updates, err := b.tgbot.UpdatesViaLongPolling(ctx, nil)
updates, err := b.tgbot.UpdatesViaLongPolling(ctx, &telego.GetUpdatesParams{
Timeout: 300,
}, telego.WithLongPollingUpdateInterval(time.Second*30))
if err != nil {
return
}