mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2026-08-17 22:56:15 +00:00
Add Bot API 10.2 Ephemeral Messages support example
New EphemeralMessagesBot demonstrating the 36.0.0 ephemeral-message API: - sendTextMessage with receiverUserId + callbackQueryId to send a message visible only to one user in a group, in response to a callback query - PossiblyEphemeralMessage detection of ephemeral messages - editEphemeralMessageText / deleteEphemeralMessage addressed by chatId + receiverUserId + ephemeralMessageId - reply() smart-branch replying ephemerally to an ephemeral message, and the explicit replyToEphemeral form - BotCommand.isEphemeral flag Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
13
EphemeralMessagesBot/README.md
Normal file
13
EphemeralMessagesBot/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# EphemeralMessagesBot
|
||||
|
||||
Demonstrates Ephemeral Messages support introduced in Telegram Bot API 10.2.
|
||||
|
||||
Add the bot to a group and send `/ephemeral`. Tapping the button makes the bot send a message that only
|
||||
you can see (an ephemeral message), then edit and delete it. The bot also detects incoming ephemeral
|
||||
messages and replies to them ephemerally.
|
||||
|
||||
## Launch
|
||||
|
||||
```bash
|
||||
../gradlew :EphemeralMessagesBot:run --args="BOT_TOKEN"
|
||||
```
|
||||
Reference in New Issue
Block a user