@sereneapi/discord-protect

1.1.1 • Public • Published

Discord-Protect

Use Exemple:

const Discord = require("discord.js")
const client = new Discord.Client({intents: 3276799})
const Protect = require("@sereneapi/discord-protect")

client.on("messageCreate", async message => {

    if(message.author.bot) return;
    await Protect.Antibadword(client, ["exemple", "exemple2"], message).then(async result => {

        if(result) {

            message.delete()

        }

    })

    await Protect.Antilink(client, message).then(async result => {

        if(result) {

            message.delete()

        }

    })
    await Protect.Antispam(client, message, 5, 3).then(async result => { // 5 is the cooldown in seconds. 3 is the limit of message.

        if(result) {

            if(message.deletable) {

                message.delete()

            }

        }


    }) 

})

client.on("guildMemberAdd", async (member) => {

    await Protect.Antialt(member, 5).then(async result => { // 5 equal minimal age in month

        if(result) {

            member.kick()

        }

    })
    await Antibot(member).then(async result => {

        if(result) {

            member.kick()

        }

    })

})

client.login("YOUR_TOKEN_HERE")```

Package Sidebar

Install

npm i @sereneapi/discord-protect

Weekly Downloads

4

Version

1.1.1

License

Apache-2.0

Unpacked Size

15.2 kB

Total Files

9

Last publish

Collaborators

  • e-tristan-gpt