1.0.4 • Published 3 years ago

anti-link-discord v1.0.4

Weekly downloads
53
License
MIT
Repository
-
Last release
3 years ago

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