Socket
Book a DemoInstallSign in
Socket

discord-antilinks

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

discord-antilinks

Simple antilink system for discord.js!

11.0.0
unpublished
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

Installation

npm install dsc-antilinks --save

Usage

const { Intents, Client } = require("discord.js")
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES]})
const antilink = require("discord-antilinks")

antilink(client, {
    muteCount: 5,
    kickCount: 6,
    banCount: 7,
    ignoredChannels: [], //Put the channel ID's in a array. Example ( ['ChannelId', 'ChannelId'] )
    ignoredRoles: [], //Put the role ID's in a array. Example ( ['RoleId', 'RoleId'] )
    ignoredUsers: [] //Put the user ID's in a array. Example ( ['UserId', 'UserId'] )
})

client.on("LinkSent", (message, user) => {

  /*
  user : GuildMember ( User is added to kick or ban the user for example: user.kick() or user.ban() )
  message: MessageObject ( Message is used to send a message to the channel. )
  LinkSent: Event ( LinkSent is the event that triggers when a user sends a link. )
  */


})

client.on("countReached", (msg, user) => {

    /*
    user : GuildMember ( User is added to kick or ban the user for example: user.kick() or user.ban() )
    message: MessageObject ( Message is used to send a message to the channel. )
    countReached: Event ( countReached is the event that triggers when a user hits the limit of the mute/kick/ban count. )
    */


})
client.login(token)

Precoded stuff

const { Intents, Client } = require("discord.js")
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES]})
const antilink = require("dsc-antilinks")

antilink(client, {
    muteCount: 5,
    kickCount: 6,
    banCount: 7,
    ignoredChannels: [], // Put the channel ID's in a array. Example ( ['ChannelId', 'ChannelId'] )
    ignoredRoles: [], // Put the role ID's in a array. Example ( ['RoleId', 'RoleId'] )
    ignoredUsers: [] // Put the user ID's in a array. Example ( ['UserId', 'UserId'] )
})

client.on("LinkSent", (message, user) => {

  /*
  user : GuildMember ( User is added to kick or ban the user for example: user.kick() or user.ban() )
  message : MessageObject ( Message is used to send a message to the channel. )
  LinkSent : Event ( LinkSent is the event that triggers when a user sends a link. )
  */

  message.channel.send(`<@${user.id}>, You can't send an link!`)

})

client.on("countReached", (msg, user) => {

    /*
    user : GuildMember ( User is added to kick or ban the user for example: user.kick() or user.ban() )
    message : MessageObject ( Message is used to send a message to the channel. )
    countReached : Event ( countReached is the event that triggers when a user hits the limit of the mute/kick/ban count. )
    */

    if(type == 'Mute' || type == 'Kick' || type == 'Ban'){
    var channel = message.guild.channels.cache.get("Channel id")
    channel.send(`<@${user.id}>, Just hit the maximum number of links sent. ${type}`)
    }


})
client.login(token)

Want to help with the package?

Join the discord and send a message in #💻│discord-antilinks channel

Keywords

discord

FAQs

Package last updated on 05 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.