Message cleanup

Live

Message cleanup

Message cleanup settings: automatic removal of service messages, admin commands and command noise.

Set up in the Mini App

Open Settings in your private chat with @defendy_bot, select the group under My groups and check its name at the top.

  1. Open Message cleanup.
  2. Under service-message cleanup, enable the Telegram message categories you want removed.
  3. Configure cleanup of Defendy commands and other commands separately. These switches save when changed.

Switches and selectors save when changed. In a separate form with a Save button, save before leaving. If a request fails, reopen the section to check its actual values.

Tip: change one option at a time and verify the result in the group so false positives are easy to spot.

In short

Cleanup keeps the chat readable by removing Telegram service messages and selected commands.

How it works

  1. Telegram creates a service message or a bot command appears in chat.
  2. Defendy identifies its category and checks the corresponding cleanup switch.
  3. If enabled and permitted, that message is deleted without changing the member's moderation state.

Every setting explained

Join messages

Default: Off.

Automatically deletes join messages when Telegram creates them in chat.

Leave messages

Default: Off.

Automatically deletes leave messages when Telegram creates them in chat.

Title changes

Default: Off.

Deletes the Telegram notice that the group title changed; it does not undo the title change.

Photo changes

Default: Off.

Deletes the Telegram notice that the group photo changed; it does not remove the photo.

Pin messages

Default: Off.

Deletes the Telegram notice about a new pin, not the pinned message itself.

Boost messages

Default: Off.

Automatically deletes boost messages when Telegram creates them in chat.

Video chat messages

Default: Off.

Deletes Telegram notices about video-chat events, not the video chat itself.

Checklist messages

Default: Off.

Deletes Telegram notices about checklist changes.

Forum topic messages

Default: Off.

Deletes Telegram notices about forum-topic events, not ordinary messages posted in a topic.

Giveaway messages

Default: Off.

Deletes Telegram service notices about giveaways, not the giveaway itself.

Defendy commands

Default: Off.

Deletes messages containing recognized Defendy commands, including commands sent by ordinary members.

All commands

Default: Off.

Deletes command messages, including commands intended for other bots.

Practical example

Delete join, leave and Defendy command messages first. Leave “all commands” off if members use commands for other bots, then verify one message of every selected type.

Recommendations

  • Be careful with all-command cleanup: it may remove commands used by other bots.
  • Tell members and moderators that their Defendy command messages will disappear from the chat.

Troubleshooting

  • Check that Defendy is still an administrator in the group.
  • Refresh the settings panel and make sure you are editing the correct group.
  • If a setting is saved but does not work, check the bot permissions in Telegram.
  • If logging is connected and the relevant category is enabled, check the event record. The log cannot show events that were not recorded.

Need help?

If a setting behaves differently than expected, contact support.@ubotz