KitDevguides

KitDev / Guides / Secret messages

Secret messages

Sends a message that only the person it is addressed to can read, using the assistant bot's inline mode. The text doesn't appear in the chat: a button comes out and, when pressed, the text is shown in a pop-up only to whoever pressed.

How to use it

In any chat type the assistant's username, the recipient and the message:

@your_assistant_bot @user I'll give you the key tomorrow

You can also use the numeric ID instead of the @username. A result "🔒 Secret message for @user" appears: tap it to send it.

In the chat you see a message with two buttons:

  • 👁 View message (blue): the recipient presses it and the text appears in a pop-up. If someone else presses it, they only see a notice that it isn't for them. You can see it too.
  • 🗑 Delete (red): only you. It deletes the secret message and the button stops working.

When the recipient reads it for the first time, the chat message changes to "🔓 @user already read it". They can read it again as many times as they want.

Limits

  • Maximum 190 characters (the limit of Telegram's pop-ups). If you go over, the result tells you how many you have.
  • Messages are stored in the database and deleted automatically after 7 days. At most the last 500 are kept.
  • With @username, the comparison is made with the @username the person has when they press the button; if they change it later, they will no longer be able to read it. With the numeric ID there is no such problem.
  • Only you can create secret messages with your assistant: inline queries from other accounts are ignored.
  • They are included in the backup (.backup), because they live in the same database.