A Telegram bot that automatically bans users who leave a connected channel.
- Start Command: Greets users and provides add-to-channel button
- Auto Ban: Automatically bans users who leave the monitored channel
- Admin Checks: Warns if bot lacks proper permissions
- Error Handling: Handles rate limits and permission errors
- Logging: Logs banned users for debugging
- Create a bot with @BotFather
- Get API credentials from my.telegram.org
Set environment variables or edit config.py:
export BOT_TOKEN="your_bot_token_here"
export API_ID="12345678"
export API_HASH="your_api_hash_here"pip install -r requirements.txtpython main.pygit clone https://github.com/saikatwtf/Auto-kicker
cd Auto-kicker
pip install -r requirements.txt
export BOT_TOKEN="your_bot_token"
export API_ID="your_api_id"
export API_HASH="your_api_hash"
python main.py- Fork this repository
- Create new Heroku app
- Connect GitHub repository
- Set config vars:
BOT_TOKEN,API_ID,API_HASH - Deploy
- Fork repository
- Connect to Railway
- Set environment variables
- Deploy
- Fork repository
- Create new Web Service on Render
- Connect repository
- Set environment variables
- Deploy
- Fork repository
- Create new app on Koyeb
- Connect GitHub repository
- Set environment variables
- Deploy
- Add bot to your channel
- Promote bot as admin with "Ban Users" permission
- Bot will automatically ban users who leave the channel
/start- Start the bot and get add-to-channel link/help- Show help information
MIT License
Powered by @AnnihilusOP