Service messages¶
Telegram writes some events into the chat as notices, for example "Alex joined the group" or "Sam
pinned a message". The bot immediately deletes the notices of the enabled types. It does the same
job as /cleanservice in Rose.
Types¶
| Type | Name in the command | When Telegram writes it | Default in a group |
|---|---|---|---|
| Joined | join |
A member joins, or someone adds a member | On |
| Left | leave |
A member leaves, or someone removes a member | On |
| Pinned | pin |
Someone pins a message (also when the bot pins it) | On |
| Title changed | title |
Someone changes the chat title | On |
| Photo changed | photo |
Someone changes or deletes the chat photo | On |
| Video chat | videochat |
Someone starts, ends or schedules a video chat, or sends an invitation | Off |
| Other | other |
Boost, auto-delete timer, payment and similar events | On |
If you turned off the joined/left cleanup in a group before, the new types also start off. The "Private" profile turns off all types.
Never deleted: forum topic notices (topic created, topic closed, topic renamed). The "Topic created" message is the first message of the topic.
Where to change the settings¶
- Panel: Chats → chat → Service messages. Each type has a switch.
- Bot: for a group, open 🛂 Entry security → 🧹 Service messages. For a channel, tap 🧹 Service messages on the chat screen. Tap a type. The type turns on or off.
- Command in the group: only the Owner or an Admin can use the commands. The bot deletes the command message.
| Command | What it does |
|---|---|
/cleanservice |
Shows the status |
/cleanservice pin title |
Turns on the given types |
/cleanservice pin off |
Turns off the given type |
/nocleanservice pin |
Turns off the given type |
/cleanservice on or off |
Turns all types on or off |
/cleanservicetypes |
Describes the types |
/cleanservice history |
Deletes the notices of the last 48 hours |
Old notices¶
You can also delete the notices that came before you turned on the cleanup:
- Panel: Service messages → Clean the last 48 hours. The bot asks for confirmation.
- Bot: on the 🧹 Service messages screen, tap 🕘 Clean the last 48 hours.
- In the group: send
/cleanservice history.
The bot deletes only the enabled types. Limits:
- Telegram does not let a bot delete a message that is older than 48 hours.
- The bot knows only the notices that it saw. The bot cannot delete notices from before you added it.
- In a very busy account, the bot can remember less than 48 hours of notices.
Channels¶
A channel has no joined or left notices. The other types also work in a channel. In channels, the cleanup starts off. Turn it on in the panel or in the bot.
To delete messages that it did not send, the bot needs the Delete messages permission in the channel. When you use the “Add channel” button in the panel, this permission is already selected. If the bot does not have this permission in a channel that you added before, the panel shows the missing permission. Fix: Channel → Administrators → bot → turn on Delete messages.