Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coslynx/discord-server-moderation-bot
Project: Discord Server Moderation Bot. Created at https://spectra.codes, which is owned by @Drix10
https://github.com/coslynx/discord-server-moderation-bot
automated-moderation code-generation code-quality community-management custom-rules developer-tools devops discord-api discord-bot discord-js hugging-face javascript machine-learning mongodb natural-language-processing openai-api server-moderation software-development typescript user-roles
Last synced: about 1 month ago
JSON representation
Project: Discord Server Moderation Bot. Created at https://spectra.codes, which is owned by @Drix10
- Host: GitHub
- URL: https://github.com/coslynx/discord-server-moderation-bot
- Owner: coslynx
- Created: 2024-08-08T07:51:07.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-08T07:56:42.000Z (3 months ago)
- Last Synced: 2024-09-20T04:19:59.245Z (about 2 months ago)
- Topics: automated-moderation, code-generation, code-quality, community-management, custom-rules, developer-tools, devops, discord-api, discord-bot, discord-js, hugging-face, javascript, machine-learning, mongodb, natural-language-processing, openai-api, server-moderation, software-development, typescript, user-roles
- Language: TypeScript
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
discord-server-moderation-botDiscord moderation bot with advanced features for server management.
Developed with the software and tools below.
## ๐ Table of Contents
- ๐ Overview
- ๐ฆ Features
- ๐ Structure
- ๐ป Installation
- ๐๏ธ Usage
- ๐ Hosting
- ๐ License
- ๐ Authors## ๐ Overview
This repository houses "ModerationBot," a Discord bot designed for server moderation and management. It leverages advanced features like automated message filtering, role management, moderation commands, user logging, customizable rules, and more. ModerationBot helps cultivate a positive and organized environment for your Discord communities.## ๐ฆ Features
| | Feature | Description |
|----|--------------------|--------------------------------------------------------------------------------------------------------------------|
| โ๏ธ | Architecture | The codebase follows a modular architecture, separating different functionalities into distinct modules for improved organization and maintainability. |
| ๐ | Documentation | This README provides a comprehensive overview of the bot's features, installation, usage, and development details. |
| ๐ | Dependencies | The bot utilizes essential libraries and packages like Discord.js, Mongoose, OpenAI API, and other tools for handling Discord interactions, database management, and advanced AI functionality. |
| ๐งฉ | Modularity | Code is structured into modules for commands, utilities, events, models, and services, promoting code reusability and ease of maintenance. |
| ๐งช | Testing | Unit tests are implemented using Jest to ensure the bot's functionality is correct and reliable. |
| โก๏ธ | Performance | The bot's design prioritizes performance, employing efficient data structures and algorithms for responsiveness. |
| ๐ | Security | Security measures include input validation, data sanitization, and secure API handling to protect user data and server integrity. |
| ๐ | Version Control| The project uses Git for version control, facilitating collaboration and managing code changes. |
| ๐ | Integrations | The bot integrates with the Discord API, MongoDB database, and OpenAI API for seamless functionality. |
| ๐ถ | Scalability | The architecture is designed to scale efficiently, allowing for handling a large number of users and messages. |## ๐ Structure
```
โโโ .env
โโโ package.json
โโโ tsconfig.json
โโโ postcss.config.js
โโโ tailwind.config.js
โโโ Dockerfile
โโโ .github
โ โโโ workflows
โ โโโ main.yml
โโโ src
โโโ index.ts
โโโ commands
โ โโโ moderation.ts
โ โโโ roles.ts
โ โโโ logging.ts
โ โโโ customRules.ts
โโโ utils
โ โโโ config.ts
โ โโโ database.ts
โ โโโ nlp.ts
โ โโโ discord.ts
โ โโโ logger.ts
โโโ events
โ โโโ messageCreate.ts
โ โโโ guildMemberAdd.ts
โ โโโ guildMemberRemove.ts
โโโ models
โ โโโ user.ts
โ โโโ guild.ts
โ โโโ message.ts
โโโ services
โโโ moderationService.ts
โโโ roleService.ts
โโโ loggingService.ts
โโโ customRulesService.ts
```## ๐ป Installation
### ๐ง Prerequisites
- Node.js (v18 or later)
- npm (or yarn)
- MongoDB### ๐ Setup Instructions
1. Clone the repository:
```bash
git clone https://github.com/spectra-ai-codegen/discord-server-moderation-bot.git
```
2. Navigate to the project directory:
```bash
cd discord-server-moderation-bot
```
3. Install dependencies:
```bash
npm install
```
4. Set up environment variables:
- Create a `.env` file in the root directory.
- Add the following environment variables:
```
DISCORD_TOKEN=your_discord_bot_token
MONGO_URI=mongodb://your_mongodb_host:27017/your_database_name
OPENAI_API_KEY=your_openai_api_key
```
5. Start the bot:
```bash
npm start
```
## ๐๏ธ UsageTo use ModerationBot, follow these steps:
1. Invite the bot to your server:
- Obtain the bot's invite link from the Discord developer portal (see the [Discord Developer Portal](https://discord.com/developers/applications) for instructions).
2. Grant permissions:
- When inviting the bot, ensure you grant it the necessary permissions for moderation, such as "Kick Members," "Ban Members," "Manage Channels," and "Manage Roles."
3. Configure settings (optional):
- Use the bot's commands or a custom dashboard (if implemented) to set up custom rules, filtering options, and other configurations.## ๐ Hosting
### ๐ Deployment Instructions
1. Build the application:
```bash
npm run build
```
2. Deploy to a cloud platform:
- Heroku, AWS, Google Cloud, or any other hosting platform of your choice.
3. Set up environment variables on the hosting platform:
- Ensure the environment variables `DISCORD_TOKEN`, `MONGO_URI`, and `OPENAI_API_KEY` are correctly set in the hosting environment.## ๐ License
This project is licensed under the [MIT License](https://choosealicense.com/licenses/mit/).
## ๐ Authors
- Author Name - [Spectra.codes](https://spectra.codes)
- Creator Name - [DRIX10](https://github.com/Drix10)
๐ Spectra.Codes
Why only generate Code? When you can generate the whole Repository!