anti-link-discord
v1.0.4
Published
Use this module to filter out links.
Downloads
149
Maintainers
Readme
Anti-Link-Discord
Add the Anti Link Package in your bot to filter out links. If you need help or have suggestions, please look in our Discord server. CLICK ME TO JOIN ß
Install
npm install anti-link-discord
Usage Example
const antiLink = require("anti-link-discord")
antiLink(client, message, {
staffRole: "ROLEID", // staff/admin/mod role id (will ignore this role)
warnMSG: `<@${message.author.id}> don't send links!`, // warn message
});
Example
const Discord = require('discord.js') // discord.js
const client = new Discord.Client(); // discord client
const antiLink = require("anti-link-discord"); // module
// console log when ready
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`)
})
// Module Setup
client.on('message', async message => {
antiLink(client, message, {
staffRole: "ROLEID", // staff/admin/mod role id (will ignore this role)
warnMSG: `<@${message.author.id}> don't send links!`, // warn message
});
});
// Client Login
client.login('token')
Changelog
1.0.0: Release
Support
Join the support server: CLICK ME