anti-swear-words-packages-discord

2.0.0 • Public • Published

Anti Swear Words Package

npm installnfo

GitHub package.json version npm npm npm

Add the Anti Swear Word Module in your bot to filter every swear word out. If you need help or have suggestions, please look in our Discord server. CLICK ME TO JOIN

Install

npm install anti-swear-words-packages-discord

Usage Example

const antiSwearWords = require("anti-swear-words-packages-discord")

        antiSwearWords(client, message, {
            warnMSG: `<@${message.author.id}> , why are you writing this?`, 
            // warn message option || when not then = `<@${message.author.id}> dont use swear words.` 
            // Behind the warnMSG will be an Warn Count
            ignoreWord: ["ignoreThis", "andIgnoreThis", "alsoIgnoreThis"],
            customWord: ["aCustomWord", "anOtherCustomWord"],
            muteRole: "ROLE NAME",  // Name of the Role
            muteCount: 10,        // Number when the user get muted
            kickCount: 20,        // Number when the user get kicked
            banCount: 30,         // Number when the user get banned
        });
                             

Example

const Discord = require('discord.js')                               //discord.js
const client = new Discord.Client();                                //discord client
const antiSwearWords = require("anti-swear-words-packages-discord") //my module

// console log when ready
client.on('ready', () => {
    console.log(`Logged in as ${client.user.tag}!`)                  
})

// Module Setup
client.on('message', async message => {
        antiSwearWords(client, message, {
            warnMSG: `<@${message.author.id}> , why are you writing this?`, 
            // warn message option || when not then = `<@${message.author.id}> dont use swear words.` 
            // Behind the warnMSG will be an Warn Count
            ignoreWord: ["ignoreThis", "andIgnoreThis", "alsoIgnoreThis"],
            customWord: ["aCustomWord", "anOtherCustomWord"],
            muteRole: "ROLE NAME",  // Name of the Role
            muteCount: 10,        // Number when the user get muted
            kickCount: 20,        // Number when the user get kicked
            banCount: 30,         // Number when the user get banned
        });                       
});

// Client Login
client.login('token')                                               

Warn Count System

We use quick.db as a better-sqlite3 database where the warning count can store easier. Ookamicodes Development arent the creators of this module. If the warning system isnt working, you need to install quick.db first. npm i quick.db

Docs: https://quickdb.js.org

Changelog

  • 2.0.0 Big Update
  • 1.2.42 Local DB Fix
  • 1.2.40 Warn count fix
  • 1.2.37 'Null' DB Fix
  • 1.2.34 - .36 Some little fixes
  • 1.2.33: Readme updated
  • 1.2.32: No action to admin
  • 1.2.31: Fix
  • 1.2.30: Warn System

Support

Join the support server: CLICK ME

Package Sidebar

Install

npm i anti-swear-words-packages-discord

Weekly Downloads

4

Version

2.0.0

License

MIT

Unpacked Size

13.7 kB

Total Files

4

Last publish

Collaborators

  • ookamicodes