wait_for_message
Poll a chat for new messages matching criteria like sender, text, or time limit. Commonly used to wait for a bot's reply after sending a command.
Instructions
等待某个对话出现新消息(轮询),常用于发指令给 bot 后等它回复。
Args: chat: 要盯的对话。 after_message_id: 只认 ID 大于它的消息;0 表示以调用时的最新消息为界。 timeout_seconds: 最多等多少秒(1~300)。 from_user: 只等某个发送者的消息。 incoming_only: 只算别人发来的消息,忽略自己发的。 contains: 消息文本必须包含这个子串才算命中。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | Yes | ||
| contains | No | ||
| from_user | No | ||
| incoming_only | No | ||
| timeout_seconds | No | ||
| after_message_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||