Skip to content

lx-0980/TG-Group-Delete-All-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GROUP DELETE ALL MESSAGE BOT

This is a Telegram moderation bot built using Pyrogram v2.

The bot works together with a userbot session to delete messages from Telegram groups or supergroups.

Main Features:

  • Skips whitelisted users
  • Admin permission checks
  • Auto invite & promote userbot
  • FloodWait safe handling

This bot is useful for:

  • Cleaning spam
  • Removing raid messages
  • Mass cleanup in groups

HOW TO USE


  1. Add the bot to your group.

  2. Make sure the bot is ADMIN and has:

    • Delete messages permission
    • Invite users permission
    • Promote admin permission
  3. Use this command in the group: /delall

  4. The bot will:

    • Invite the userbot automatically
    • Promote userbot with delete permission
    • Start deleting messages
    • Skip whitelisted users
    • Show deleted & skipped count
  5. After completion:

    • if Userbot invited leaves the group automatically

REQUIRED VARIABLES


You must set the following variables before running the bot:

BOT_TOKEN

  • Telegram bot token from @BotFather

USERBOT_STRING

  • Pyrogram session string of your user account

API_ID

  • Telegram API ID from my.telegram.org

API_HASH

  • Telegram API HASH from my.telegram.org

WHITELIST_USERS

  • Telegram user IDs whose messages should NOT be deleted

MSG_ID specific ID of message you don't want to delete

EXAMPLE VARIABLES

Set in config.py file

BOT_TOKEN=123456:ABCDEF
USERBOT_STRING=SESSION_STRING_HERE
API_ID=12345678
API_HASH=your_api_hash_here
WHITELIST_USERS= {
    12345678,
    12345678
} 
MSG_ID=0 # msg id you don't want to delete

IMPORTANT NOTES


  • Do not abuse this bot to avoid FloodWait
  • Telegram does not ban accounts for deletions, but excessive usage may cause temporary limits
  • Always test the bot in a small group first
  • Keep your session string private and secure

AUTHOR

Developer: Lx 0980

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors