Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bialu-software/discord-security
Package that ensures simple and fast security for your Discord bot
https://github.com/bialu-software/discord-security
discord discord-js
Last synced: 9 days ago
JSON representation
Package that ensures simple and fast security for your Discord bot
- Host: GitHub
- URL: https://github.com/bialu-software/discord-security
- Owner: Bialu-Software
- Archived: true
- Created: 2021-12-29T14:14:53.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-16T15:07:43.000Z (over 1 year ago)
- Last Synced: 2025-01-08T15:02:06.617Z (23 days ago)
- Topics: discord, discord-js
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/bialu-discord-security
- Size: 62.5 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
![Color=Green](https://user-images.githubusercontent.com/70224036/229851422-02542171-4bb9-475c-bc78-cfd319ab783e.png)
## Lightweight, fast and minimalist security solution for [discord.js](https://discord.js.org/).
```js
//import
const security = require("bialu-discord-security")// use with Discord.js V13
client.on("messageCreate", (message) => {
const security_config = { active: true }
security.antiraid(client, message, security_config)
})
```## Installation
Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally)```bash
$ npm install bialu-discord-security
```## Features
* Fast reaction time
* Great for all types of projects (small, medium, large)
* Ultra lightweight security solution### Security Issues
If you discover a security vulnerability, please contact us on [Github](https://github.com/Bialu-Software/Discord-Security/issues) or on our [Discord server](https://discord.gg/em8meadJ2X)
## Quick Start
```js
const { Client, Intents } = require('discord.js');
const security = require("bialu-discord-security")const client = new Client({
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_MEMBERS,
],
})client.once('ready', () => {
console.log('Ready!');
});client.on("messageCreate", (message) => {
const security_config = {}security.antiraid(client, message, security_config)
})client.login("");
```
## Configuration
For the `security_config` is more options than in examples above.
```js
const security_config = {
active: false, // if you want antiraid to be turned off
log_channel: "926173986751123516", // log channel for ban messages etc...
ban_message: `${message.author.tag} has been banned because..`, // custom message
react_to_bots: false // if you dont want antiraid to react to bots
}
console.log(security.version) // log your current version of package
```## Contributing
[Contributing Guide](https://github.com/Bialu-Software/Discord-Security/blob/main/CONTRIBUTING.md)