diff --git a/core.lua b/core.lua index 04baaf5..e98e1b6 100644 --- a/core.lua +++ b/core.lua @@ -67,6 +67,10 @@ end function api:_getUpd(lim, offs, ...) local u, ok = self:getUpdates(lim, offs, ...) + if not ok then + -- fallback if very long message + return offs + 1 + end if not ok or not u or (u and type(u) ~= 'table') or not u.result then return end for _, v in pairs(u.result) do offs = v.update_id + 1