wait_for_reply
Wait for a user's reply via Telegram, capturing text messages or button selections, with adaptive polling to minimize API calls.
Instructions
Wait for a reply from the user via Telegram and return it.
Handles both plain text messages and inline button taps (callback queries).
Smart polling intervals (minimises API calls): 0 – 10 min elapsed → poll every 30 s 10 min – 1 hr → poll every 60 s 1 hr+ → poll every 120 s
LLM guidelines for choosing max_wait_seconds: Simple yes/no or quick question → 300 (5 min) General task approval → 1 800 (30 min) ← default Stock price / alert trigger → 1 800 (30 min) End-of-day review → 7 200 (2 hr) Overnight / long-running job → 86 400 (24 hr) Multi-day wait → any value — no maximum
Args: max_wait_seconds : How long to wait. Default 1800, no upper limit. Pick a value appropriate to how soon a reply is expected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_wait_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |