Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

discord-antiraid

Derpinou117MIT3.1.3TypeScript support: included

Discord.js extention library for protect discord servers against Raids

discord, antiraid, anti-raid, raid, protect, raidprotect, raid-protect, bot, package, npm, derp

readme

Discord.js extention library for protect discord servers against Raids

downloadsBadge versionBadge


discord GitHub license

- Installation:


npm i discord-antiraid

Supported Events: (If you want to Add your Own Events, Use AntiRaid Class Methods in the documentation or follow Example here)

    channelCreate
    channelDelete

    roleCreate
    roleDelete

    guildBanAdd
    guildBanRemove
    guildMemberRemove

    threadCreate
    threadDelete

Create AntiRaid: (Example: here)

const {AntiRaidManager} = require('discord-antiraid');

const antiraid = new AntiRaidManager(client, {
    enabled: true,
    events: [
        "channelCreate",
        "channelDelete",
        "roleCreate",
        "roleDelete",
        "threadCreate",
        "threadDelete",
    ],
    exemptedRoles: [], // Ignored roles (ex: ['848500766955405332'])
    exemptedUsers: [], // Ignored users (ex: ['555429540613062656'])
    rateLimit: 2, // Number of events before sanction
    time: 30000, // Time in ms before case deletion
    sanction: 'removeAllRoles', // Sanction to apply (ex: 'removeAllRoles' / 'ban' / 'kick')
    reason: 'discord-antiraid' // Audit Log Reason
})

Using Database (Example with quick.db):

- Changelog:

See Changelog here

- Contributors:

- Special Credits:

Thanks to Androz with his repo discord-giveaways for doc generator and typing example

Thanks to Sayrix for making the logo and the banner

- License:

Licensed under the MIT license.

changelog

Change Log

In version 3.0.0

-Add:
  • Discord.js v13.x support
  • Threads and MemberKick events
  • eslint configuration for better code quality
-Remove:
  • Docs
  • Useless things
-Other:
  • Code optimization
  • Requests optimization
  • Rewriting the lib
  • Remade event's handler