AvoidsBot is a Telegram bot designed to help users efficiently report scams. It allows users to submit reports about scammers, which are reviewed by admins before being published in a public channel. This provides a secure and structured method for reporting scam activities, helping communities stay protected from fraudulent activities.
- Create Reports: Users can easily create scam reports by providing details such as the scammer's username, deal amount, a summary of the incident, and proof in the form of a channel URL.
- Report Lookup: Users can look up scam reports associated with a specific username or user ID.
- Admin Approval System: Reports are sent to a private admin channel where they can be approved or rejected.
- Automated Notifications: Users receive notifications regarding the status of their reports.
- Public Reporting: Approved reports are published in a public channel, helping others avoid known scammers.
- Python 3.9+
- MongoDB instance
- Telegram Bot API token
- Pyrogram
-
Clone the repository:
git clone https://github.com/Lettable/avoidsbot.git cd avoidsbot -
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
- Edit the
sample.envfile to add your configuration details. Use a text editor likenano:nano sample.env
- Add the following environment variables to the
sample.envfile:API_ID=<Obtain `API_ID` from creating an application at https://my.telegram.org/> API_HASH=<Obtain `API_HASH` from creating an application at https://my.telegram.org/> BOT_TOKEN=<Your Telegram Bot Token> MONGO_DB_URI=<Your MongoDB Connection URI> IMAGE_URL=<URL of the image to be used in the public channel> AWAIT_ROOM_ID=<ID of the channel where reports will await approval or rejection> CHANNEL_ID=<ID of the public channel for publishing reports> - Rename the
sample.envfile to.env:mv sample.env .env
- Edit the
-
Run the bot:
bash start
Click here to deploy on Heroku
To customize the image used in reports:
-
Download the Template Image:
- Download the template image from this link.
-
Edit the Image:
- Use a tool like Polotno Studio to edit the image with your channel's profile picture or other relevant visuals.
-
Upload the Edited Image:
- Upload the edited image to graph.org or another image hosting service and obtain the image URL.
-
Update the
.envFile:- Replace the placeholder URL in the
IMAGE_URLvariable in your.envfile with the URL of your uploaded image.
- Replace the placeholder URL in the
- /start: Start interacting with the bot and access the main menu.
- /lookup <username|user_id>: Look up scam reports associated with a specific username or user ID.
- /cancel: Cancel the current report creation process.
- Create Report: Begin the process of creating a new scam report.
- Cancel Report: Cancel the ongoing report creation process.
- Approve/Reject: Admins can approve or reject reports from the private admin channel.
-
User Interaction:
- The user initiates the process by clicking "Create Report".
- The bot guides the user through providing details about the scammer and the scam.
-
Admin Review:
- The report is sent to a private admin channel for review.
- Admins can approve or reject the report with a single click.
-
Public Announcement:
- Approved reports are posted in a public channel, including details such as the scammer's display name, username, amount involved, and a summary.
Client: @tradexoxx ID: 7116094114
1. Appeal System Enhancements
- Added comprehensive approval/rejection flow for appeal actions.
- Approved appeals now send proper notifications based on whether the post was deleted or edited:
- Deleted: "Your post has been removed from the channel."
- Tagged: "Your post has been tagged with [edit message]."
2. Detailed Broadcast Feature
- Enhanced the broadcast command to forward messages to both user and group chat IDs instead of just user IDs.
- Better error handling for unreachable users/groups during broadcasts.
3. Welcome Message for Group Additions
- The bot now welcomes groups upon joining and provides instructions for proper scam protection setup.
- Includes a direct link to the official channel.
4. Scammer Ban Notifications
- Enhanced ban notifications with additional context:
- User details (username, ID)
- Amount involved in the scam
- Ban timestamp
- A button linking directly to the post for better moderation visibility.
5. Optimized Event Handlers
- Fixed event issues related to detecting bot joins and group invite events.
- Improved message handling logic for broadcast and report systems.
This update was made possible by the requests and funding from @tradexoxx ID: 7116094114. We appreciate the continued support and collaboration! If you want this update get a approval from @tradexoxx! Thanks for understanding!
Contributions are welcome! To contribute:
- Fork the Project
- Create a Feature Branch (
git checkout -b feature/AmazingFeature) - Commit Your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for more details.
If you have concerns about your source code being leaked or need assistance, please contact me directly:
If you find this project helpful and would like to support its development, you can buy me a coffee through a Bitcoin donation. Your support is greatly appreciated!
LTC Address: LXzdaQcKxFpRQ4jvqh9CBcRMaViutV6bRN
Thank you for your generosity!