This bot deletes messages with scam links using configurable filter and logs everything in blocks.txt
. You can change filter whenever you want, you don't even have to restart the bot to apply changes.
This bot runs on node.js. Recommended version is 16.5.0
- Install node 16.5.0 or newer
- Run
npm install
in the bot directory. - Configure your bot
- Run
npm start
to run your bot.
# development(watch) mode
npm run dev
# format project code
npm run format
Before running your bot, you need to configure it
After downloading bot, open config.json
file and fill it. It should look like this:
{
"token": "put your bot's token here",
"logChannel": "put log channel id here",
"action": "BAN",
"actionReason": "AntiScam (Phishing link) MSG: {MESSAGE}",
"embedOptions": {
"description": "Scam link blocked! User: {MENTION} ({ID}) \nMessage: {MESSAGE}",
"color": "#ff0000"
},
"actionErrorDelete": "Error occured. Message not deleted or not found",
"actionErrorBan": "Error occured. User likely not banned! (Perm error?)"
}
Replace the put your token here
with your bot's token.
Replace the put log channel id here
with the channel id you want to send blocking log to.
Bot will send the log message to the same chat as message with scam link if id is invalid.
Choose the action you want the bot to do when it detects a message with scam link Available values: "DELETE", "BAN", "IGNORE"
The reason used when user gets banned (If you chose "BAN"
in "action"
).
Set it to whatever you want. Default: "AntiScam".
Messages that are sent when an error occurs.
Users or groups can be pinged if added like so:
User: <@!000000000000000000>
Group: <@&000000000000000000>
Your filter is located in filter.json
file. You can easily edit it. Just extend the filter array :)