Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/derpinou/discord-antiraid
Discord.js extention library for protect discord servers against Raids
https://github.com/derpinou/discord-antiraid
Last synced: 3 months ago
JSON representation
Discord.js extention library for protect discord servers against Raids
- Host: GitHub
- URL: https://github.com/derpinou/discord-antiraid
- Owner: Derpinou
- License: mit
- Created: 2020-12-07T19:30:43.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-08T17:26:49.000Z (over 2 years ago)
- Last Synced: 2024-11-05T17:52:29.265Z (3 months ago)
- Language: JavaScript
- Homepage: https://discord.gg/A7KUtE4hds
- Size: 820 KB
- Stars: 55
- Watchers: 3
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Discord.js extention library for protecting discord servers against Raids
[![downloadsBadge](https://img.shields.io/npm/dt/discord-antiraid?style=for-the-badge)](https://npmjs.com/discord-antiraid)
[![versionBadge](https://img.shields.io/npm/v/discord-antiraid?style=for-the-badge)](https://npmjs.com/discord-antiraid)
[![discord](https://discord.com/api/guilds/848500695506223104/widget.png)](https://discord.gg/ahjFrbk2Nr)
[![GitHub license](https://img.shields.io/github/license/Derpinou/discord-antiraid.svg)](https://github.com/Derpinou/discord-antiraid/blob/master/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](https://github.com/Derpinou/discord-antiraid/blob/main/example/AntiRaid/Event.js))```js
channelCreate
channelDelete
roleCreate
roleDelete
guildBanAdd
guildBanRemove
guildMemberRemovethreadCreate
threadDelete```
Create AntiRaid:
(Example: [here](https://github.com/Derpinou/discord-antiraid/blob/main/example/AntiRaid/sample.js))```js
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](https://www.npmjs.com/package/quick.db)):## - Changelog:
See Changelog [here](https://github.com/Derpinou/discord-antiraid/blob/main/CHANGELOG.md)
## - Special Credits:
Thanks to [Androz](https://github.com/Androz2091) with his repo [discord-giveaways](https://github.com/Androz2091/discord-giveaways) for doc generator and typing exampleThanks to [Sayrix](https://github.com/Sayrix) for making the logo and the banner
## - License:
Licensed under the MIT license.