mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
Telegram fires an inline query on every keystroke and every prefix of a pasted URL (status/12, status/123, ...) matches the site patterns, so typing used to trigger a full 3-attempt fetch per keystroke. Answer only after the query has been stable for 800ms, dedupe repeats through Telegram's inline cache (explicit cache_time 300), and let a repeat of a query that produced no answer retry the fetch.