A Simple, Superfast and Serverless Filter Bot Written in Go with Global Filters and Autodelete support. The repository can be hosted on vercel as a serverless application with close to no downsides.
/start - Shows a start message [Group/DM]
/about - Shows an about message [Group/DM]
/help - Shows a help message [Group/DM]
/filter - Create a new filter for a word or phrase [Group/Connected DM]
/stop - Stop an existing filter [Group/Connected DM]
/gstop - Stop an existing global filter [Admin DM]
/filters - View all the filters saved for a chat [Group/Connected DM]
/gfilter - Create a new global filter that will work in all chats [Admin DM]
/gfilters - View all the saved global filters [All]
/filter - Create a new filter for a word or phrase [Group/Connected DM]
/broadcast - Broadcast a message to all bot users [Admin DM]
/concast - Broadcast a message to connected users [Admin DM]
Variables can also be loaded by creating a .env file at the root of the repository. See .env.sample to see the format to use.
-
BOT_TOKEN: Bot token obtained by creating a bot from @BotFather. -
MONGODB_URI: MongoDB URI. Get this value from mongoDB. For more help watch this video. -
ADMINS: Telegram user ids' of bot admins seperated by spaces. -
MULTI_FILTER: Set to True if multiple filters should be processed for a single message (don't add on serverles). -
AUTO_DELETE: Time in minutes after which a filter result should be automatically deleted. for ex: 60 for 1hour (won't work serverless). -
PORT: The port on which the webapp should run (use 10000 on render)
Deploy To Vercel
Follow these instructions to deploy this repo to vercel
- Fork this repository 🍴
- Go to your vercel dashboard and create a Add New > Project
- Fill in the BOT_TOKEN and MONGODB_URI environment variables
- Click Deploy and wait
- Open your app and put in your bot token and click Connect
Deploy To Render
Make sure to have the following options set :
Environment
Go
Build Command
go build .
Start Command
./Go-Filter-Bot
Advanced >> Health Check Path
/
Run Locally/VPS
You must have the latest version of go installed first
git clone https://github.com/Jisin0/Go-Filter-Bot cd Go-Filter-Bot go build . ./Go-Filter-Bot
Ask any doubts or help in our support chat.
Join our telegram channel for more latest news and cool projects
- Thanks To Paul For His Awesome Library And Support
- Thanks To Trojanz for Their Awesome Unlimited Filter Bot
Licensed under GNU GPL 3.0..
Selling The Codes To Other People For Money Is Strictly Prohibited.
This repository is configured to run as a Render Web Service using Telegram webhooks.
- Fork this repo to your GitHub.
- On Render, click New > Web Service, select your fork.
- Render will detect
render.yaml:- Build:
go build -o app . - Start:
./app
- Build:
- Add Environment Variables:
BOT_TOKEN– your Telegram bot tokenADMINS– space-separated admin user IDs (optional)MONGODB_URI– MongoDB connection (optional if you use features needing DB)BASE_URL– your service URL on Render (optional; Render setsRENDER_EXTERNAL_URLautomatically)
- Hit Create Web Service.
The bot runs at /webhook/<last-10-chars-of-token> and automatically sets its webhook to:
RENDER_EXTERNAL_URL + /webhook/<suffix> (or BASE_URL if provided).
