A Discord bot that removes messages containing links in specified channels, except for whitelisted channels and users with specific roles.
This Discord bot is designed to help moderate links posted in Discord channels. It automatically removes messages that contain links unless they are posted in whitelisted channels or by users with specific roles. By using this bot, you can maintain a cleaner chat environment while still allowing links in designated areas.
Initially i created this bot, because i got tired from people posting illegal links and other stuff in general chat, while there is support chat, therefore this bot was created.
It was created for FiveM Security Community
- Automatic removal of messages containing links
- Whitelisting specific channels to allow links
- Ignoring users with specific roles to bypass link removal
To use the Anti-Links Discord Bot, follow these steps:
-
Clone this repository to your local machine:
git clone https://github.com/inhostllc/Anti-Links-Discord-Bot.git
-
Install dependencies:
npm install
-
Set up your environment variables by creating a
.env
file in the root directory of the project and adding the following:DISCORD_TOKEN=your_discord_bot_token WEBHOOK_URL=your_webhook_url_for_logs
-
Configure the bot according to your preferences (see Configuration section below).
-
Run the bot:
npm start
Once the bot is running and added to your Discord server, it will automatically monitor messages in the specified channels and remove any messages containing links, except for whitelisted channels and users with specific roles.
You can configure the behavior of the bot by modifying the following variables in the .env
file:
DISCORD_TOKEN
: Your Discord bot token.WEBHOOK_URL
: The webhook URL where log messages will be sent.
Additionally, you can customize the whitelisted channels and ignored roles directly in the index.js
file.
Join our Discord community for support, feedback, and collaboration:
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.