the-guard-bot
the-guard-bot copied to clipboard
Mark old updates with ctx.oldUpdate
- Hits Telegram's
getMe
endpoint on bot start, beforebot.launch()
- Stores the date header of
getMe
's response - Marks any update older than the stored date with
ctx.oldUpdate = true
, otherwisefalse
Useful for plugins that don't want to retroactively act on old updates if bot was down