anti-link-discord

1.0.4 • Public • Published

Anti-Link-Discord

npm installnfo

GitHub package.json version npm npm npm

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

Package Sidebar

Install

npm i anti-link-discord

Weekly Downloads

60

Version

1.0.4

License

MIT

Unpacked Size

4.2 kB

Total Files

5

Last publish

Collaborators

  • ookamicodes