use sendMessageDraft for native streaming output, fallback to editMessageText

Telegram Bot API 9.3+ sendMessageDraft provides smooth streaming text
rendering without the flickering of repeated edits. Falls back to
editMessageText automatically if the API is unavailable (e.g. older
clients or group chats). Also reduces edit interval from 5s to 3s and
uses 1s interval for draft mode.
This commit is contained in:
Fam Zheng
2026-04-09 09:35:55 +01:00
parent 765ff2c51d
commit eba7d89006
3 changed files with 492 additions and 70 deletions

View File

@@ -10,6 +10,7 @@ dptree = "0.3"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.9"
reqwest = { version = "0.12", features = ["json"] }
teloxide = { version = "0.12", features = ["macros"] }
tokio = { version = "1", features = ["full"] }
uuid = { version = "1", features = ["v5"] }