1.2.0 • Published 5 years ago
d-antilinks v1.2.0
D-AntiLinks
- This will help you blocking links and words on discord.js.
Installation
npm i d-antilinks --save
Usage
- First of all this just got tested on discord.js v12, I think it works on v11 as well.
const dantilinks = require("d-antilinks")
client.on("message", message => {
if(message.author.bot) return;
if(message.member.hasPermission("ADMINISTRATOR")) return;
//Here you can block any link or word
let links = [
"discord.gg",
"discordapp.com",
"invite.gg"
];
dantilinks.antiLink(message, links, "You can't send links here!")
//In message you need to put your definition of message (This is in the same line as client.on("message", message => { })
//In links you need to put how you defined the links
//The final one is the message that will be sent if someone send a link
//AntiFlood function
dantilinks.antiFlood(message, 1000, "Your message is over 1000 characters!")
//AntiIpLoggers function
dantilinks.antiIpLoggers(message, "Your message contains an IP logger website")
})
This is in beta.
- Yes.
Changelogs
- Version 1.2.0 | Added AntiIpLoggers method
- Version 1.1.0 | Added AntiFlood method and fixed some minor errors
- Version 1.0.2 | Fixed some typos
- Uploaded 28/9/2020