New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

discord-security

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-security

Punish members who abuse admin functions

  • 1.2.7
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

💖 Features

  • Easy to use
  • Anti-Raid System
  • Configurable
  • Works with all DJS versions

✨ How to use

const Discord = require('discord.js'); // Requiring Discord
const intents = new Discord.Intents(); // Intents 
const client = new Discord.Client({ intents: 32767 }); // Bot

const DiscordSecurity = require('discord-security'); // Requiring the module
DiscordSecurity.init({  // Initialize the package
    client: client, // Client (bot)
    interval: 10, // Interval for reset data (in seconds)
    limit: 3, // Max infractions did in the interval (10 seg) to punish
    punishment: 'delete_roles', // Punishment
    whitelist: ['user_id', 'role_id'], // Ignored users
    options: {  // AntiRaid Options
            memberKick: true, // AntiKick System
            memberBan: true, // AntiBan System
            roleUpdate: true, // AntiRoleUpdate System
            roleAdd: true, // AntiRoleAdd System
            roleCreate: true, // AntiRoleCreate System
            roleDelete: true, // AntiRoleDelete System
            channelCreate: true, // AntiChannelCreate System
            channelDelete: true, // AntiChannelDelete System
            guildUpdate: true, // AntiGuildUpdate Sytem
        }
});

client.on('ready', async () => {
    console.log(`Logged in as ${client.user.username}.`)
});

client.login('YOUR TOKEN')

📌 Remove Anti-Raid Data


const Discord = require('discord.js'); // Requiring Discord
const intents = new Discord.Intents(); // Intents 
const client = new Discord.Client({ intents: 32767 }); // Bot

const DiscordSecurity = require('discord-security'); // Requiring the module
DiscordSecurity.removeData()  // Remove AntiRaid Data

Keywords

FAQs

Package last updated on 27 Oct 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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc