feat: sync bot keyboards and callbacks
Sync telesrv b96f2dd (feat(bot): complete keyboards callbacks and durable delivery). Skipped private docs and preserved public README files per sync rules; normalized the appearance seed log label for public naming.
This commit is contained in:
parent
0c99ae0a9d
commit
bf965f610c
80 changed files with 7212 additions and 349 deletions
|
|
@ -34,11 +34,24 @@ python .\cmd\bots\ptbecho\echo.py `
|
|||
--send-text "ptbecho is online"
|
||||
```
|
||||
|
||||
发送 reply keyboard 与 inline callback 两条验证消息并保持 polling:
|
||||
|
||||
```powershell
|
||||
python .\cmd\bots\ptbecho\echo.py `
|
||||
--buttons-chat-id 1780243200
|
||||
```
|
||||
|
||||
reply keyboard 与 inline keyboard 都会各显示蓝/绿/红三种语义色;点击 reply
|
||||
button 会按普通文本消息进入 echo 链,点击 inline button 会由 `callback_query` handler 调用
|
||||
`answerCallbackQuery` 并显示 `telesrv inline callback OK`。也可以在私聊中发送
|
||||
`/buttons` 生成同样的两条消息。
|
||||
|
||||
可选参数:
|
||||
|
||||
- `--send-count N`:连续主动发送 N 条。
|
||||
- `--send-interval SEC`:连续发送之间的间隔。
|
||||
- `TELESRV_BOT_DEMO_CHAT_ID` / `TELESRV_BOT_DEMO_SEND_TEXT`:主动发送参数的环境变量形式。
|
||||
- `--buttons-chat-id` / `TELESRV_BOT_DEMO_BUTTONS_CHAT_ID`:发送两类键盘验证消息并监听 callback。
|
||||
|
||||
本地超级群 chat id 使用 Bot API 形式 `-100<channel_id>`;例如 channel id 为
|
||||
`2` 时是 `-1000000000002`。
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue