LinkWatchdog Bot is your vigilant guardian in Telegram group chats. Its mission is to maintain a spam-free and orderly environment, allowing everyone to enjoy meaningful conversations without the clutter of excessive links. LinkWatchdog Bot keeps a watchful eye on link sharing within your group and enforces a fair daily limit of 5 links per user.
Creator: HykeLauncher
-
Link Monitoring: LinkWatchdog Bot tracks and monitors every link shared in your group.
-
Daily Limit: Users are allowed to share up to 5 links per day.
-
Friendly Reminders: If a user exceeds the daily limit, the bot sends a friendly reminder.
-
Automatic Reset: LinkWatchdog Bot resets the link count every 24 hours from the first link posted, ensuring a fair and consistent experience.
-
User-Friendly: The bot enhances group chat quality without causing inconvenience.
These instructions will help you get your LinkWatchdog Bot up and running.
Before you start, you need to have the following in place:
- A Telegram bot token.
- A Firebase database to store user data.
-
Go to the Firebase Console.
-
Click "Add project" and follow the steps to create a new Firebase project.
-
In the project dashboard, click on "Database" in the left menu.
-
Click "Create Database" and choose "Start in test mode" for now.
-
Your Firebase database is now set up. Click on "Project settings" (the gear icon) in the left menu, and you'll find the Firebase database URL. This URL will be used in your environment variables.
In order to authenticate your bot with Firebase, you'll need to obtain a service account key in JSON format. Here's how to do it:
-
In the Firebase Console, select your project.
-
Click on the gear icon (Project settings) in the left menu.
-
Navigate to the "Service accounts" tab.
-
Under "SDK setup and configuration," click on "Generate new private key."
-
A JSON file containing your service account key will be downloaded to your computer. Save this file as
firebase-service-account-key.json
.
- Clone the repository to your local machine.
git clone https://github.com/hykelauncher/linkwatchdog-bot.git
- Install the required Node.js packages using npm.
npm install
- Set up your environment variables. Create a
.env
file and add the following:
BOT_TOKEN=your-telegram-bot-token
FIREBASE_DATABASE_URL=your-firebase-database-url
- Start the bot.
node index.js
Once the bot is running and configured in your Telegram group, LinkWatchdog Bot will automatically monitor and enforce the link-sharing limit.
Contributions are welcome! If you want to improve or extend LinkWatchdog Bot, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE.md file for details.