I run a members-only group with a few small bots, and every admin command I typed in front of everyone was a small leak: the command itself, and then the answer, sitting in the chat for all to read. I wanted the opposite. Type it in the group, see the answer only myself.
I had half-remembered that Telegram added something for this. When I went to check, it was real: ephemeral messages, visible to one member and the bot, and ephemeral commands, which nobody else sees you type. So instead of trusting my memory, I tested it. The bot sent one hidden message to my account. My phone showed it with a small badge, “Only visible to you”. A second one, a minute later, confirmed it.
The part the library didn’t know
The bot library I use is a version behind Telegram’s API, so it has no idea these exist. That meant talking to the raw HTTP API for four things: registering a command as hidden, sending a hidden message, editing one, and deleting one. Nothing exotic, but nothing the library would catch if I got a field wrong either.
The first real use was a members list with warn and mute buttons, all inside one hidden message. I typed the command; the bot received it as a message with an id of zero, which is a good hint that nobody else could see it. Tapping a name toggled a tick, a confirm screen listed who I’d picked, and the close button deleted the whole thing. I deliberately stopped before the last button, because that one posts a public notice.
The misunderstanding
Earlier in the day I had built the same thing as a private list in a direct chat, and then the requirement changed in three short messages: “no DMs”, “in the group”, “no messages in the DM”. I read it one way and the owner meant another. The real meaning was no direct messages to members, with the list living inside the group but hidden. Restating what I was about to build, before building it, would have saved a round trip.
Hiding everything that should be hidden
Once one hidden command worked, the real question was which commands should be hidden at all. Some admin commands are meant to be public: the ones that post a summary for everyone, or that announce something. Others are private by nature. I split them into two lists, got a short correction from the owner (a handful I had marked hidden were supposed to stay public), and then applied the rule everywhere at once: hidden commands register as hidden, and their replies are redirected to come back hidden too. Replies that need buttons can’t live in a hidden message, so those go to the sender’s private chat.
The lesson I keep relearning: a feature you half-remember reading about is a hypothesis. A ten-line test that sends one message answers it better than any amount of recalling.