{"id":15212985,"url":"https://github.com/coslynx/discord-server-moderation-bot","last_synced_at":"2026-02-22T21:33:12.877Z","repository":{"id":252199048,"uuid":"839725940","full_name":"coslynx/discord-server-moderation-bot","owner":"coslynx","description":"Project: Discord Server Moderation Bot. Created at https://spectra.codes, which is owned by @Drix10","archived":false,"fork":false,"pushed_at":"2024-08-08T07:56:42.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T09:37:38.187Z","etag":null,"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"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coslynx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-08T07:51:07.000Z","updated_at":"2024-08-08T07:56:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"03d47f57-069a-4732-bba1-f624fbb5af4f","html_url":"https://github.com/coslynx/discord-server-moderation-bot","commit_stats":null,"previous_names":["spectra-ai-codegen/discord-server-moderation-bot","coslynx/discord-server-moderation-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coslynx/discord-server-moderation-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2Fdiscord-server-moderation-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2Fdiscord-server-moderation-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2Fdiscord-server-moderation-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2Fdiscord-server-moderation-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coslynx","download_url":"https://codeload.github.com/coslynx/discord-server-moderation-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2Fdiscord-server-moderation-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264502985,"owners_count":23618671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["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"],"created_at":"2024-09-28T09:08:08.848Z","updated_at":"2025-10-29T03:18:35.343Z","avatar_url":"https://github.com/coslynx.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/PKief/vscode-material-icon-theme/ec559a9f6bfd399b82bb44393651661b08aaf7ba/icons/folder-markdown-open.svg\" width=\"100\" /\u003e\n  \u003cbr\u003ediscord-server-moderation-bot\n\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eDiscord moderation bot with advanced features for server management.\u003c/h4\u003e\n\u003ch4 align=\"center\"\u003eDeveloped with the software and tools below.\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Language-TypeScript-blue\" alt=\"Language: TypeScript\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Framework-Discord.js-red\" alt=\"Framework: Discord.js\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Database-MongoDB-blue\" alt=\"Database: MongoDB\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/AI-OpenAI%20API-black\" alt=\"AI: OpenAI API\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/last-commit/spectra-ai-codegen/discord-server-moderation-bot?style=flat-square\u0026color=5D6D7E\" alt=\"git-last-commit\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/commit-activity/m/spectra-ai-codegen/discord-server-moderation-bot?style=flat-square\u0026color=5D6D7E\" alt=\"GitHub commit activity\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/languages/top/spectra-ai-codegen/discord-server-moderation-bot?style=flat-square\u0026color=5D6D7E\" alt=\"GitHub top language\" /\u003e\n\u003c/p\u003e\n\n## 📑 Table of Contents\n- 📍 Overview\n- 📦 Features\n- 📂 Structure\n- 💻 Installation\n- 🏗️ Usage\n- 🌐 Hosting\n- 📄 License\n- 👏 Authors\n\n## 📍 Overview\nThis 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.\n\n## 📦 Features\n|    | Feature            | Description                                                                                                        |\n|----|--------------------|--------------------------------------------------------------------------------------------------------------------|\n| ⚙️ | Architecture   | The codebase follows a modular architecture, separating different functionalities into distinct modules for improved organization and maintainability.     |\n| 📄 | Documentation  | This README provides a comprehensive overview of the bot's features, installation, usage, and development details.  |\n| 🔗 | 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. |\n| 🧩 | Modularity     |  Code is structured into modules for commands, utilities, events, models, and services, promoting code reusability and ease of maintenance. |\n| 🧪 | Testing        |  Unit tests are implemented using Jest to ensure the bot's functionality is correct and reliable.        |\n| ⚡️  | Performance    |  The bot's design prioritizes performance, employing efficient data structures and algorithms for responsiveness. |\n| 🔐 | Security       |  Security measures include input validation, data sanitization, and secure API handling to protect user data and server integrity. |\n| 🔀 | Version Control|  The project uses Git for version control, facilitating collaboration and managing code changes.  |\n| 🔌 | Integrations   | The bot integrates with the Discord API, MongoDB database, and OpenAI API for seamless functionality. |\n| 📶 | Scalability    | The architecture is designed to scale efficiently, allowing for handling a large number of users and messages. |\n\n## 📂 Structure\n\n```\n├── .env\n├── package.json\n├── tsconfig.json\n├── postcss.config.js\n├── tailwind.config.js\n├── Dockerfile\n├── .github\n│   └── workflows\n│       └── main.yml\n└── src\n    ├── index.ts\n    ├── commands\n    │   ├── moderation.ts\n    │   ├── roles.ts\n    │   ├── logging.ts\n    │   └── customRules.ts\n    ├── utils\n    │   ├── config.ts\n    │   ├── database.ts\n    │   ├── nlp.ts\n    │   ├── discord.ts\n    │   └── logger.ts\n    ├── events\n    │   ├── messageCreate.ts\n    │   ├── guildMemberAdd.ts\n    │   └── guildMemberRemove.ts\n    ├── models\n    │   ├── user.ts\n    │   ├── guild.ts\n    │   └── message.ts\n    └── services\n        ├── moderationService.ts\n        ├── roleService.ts\n        ├── loggingService.ts\n        └── customRulesService.ts\n```\n\n## 💻 Installation\n### 🔧 Prerequisites\n- Node.js (v18 or later)\n- npm (or yarn)\n- MongoDB\n\n### 🚀 Setup Instructions\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/spectra-ai-codegen/discord-server-moderation-bot.git\n   ```\n2. Navigate to the project directory:\n   ```bash\n   cd discord-server-moderation-bot\n   ```\n3. Install dependencies:\n   ```bash\n   npm install\n   ```\n4. Set up environment variables:\n   - Create a `.env` file in the root directory.\n   - Add the following environment variables:\n     ```\n     DISCORD_TOKEN=your_discord_bot_token\n     MONGO_URI=mongodb://your_mongodb_host:27017/your_database_name\n     OPENAI_API_KEY=your_openai_api_key\n     ```\n5. Start the bot:\n   ```bash\n   npm start\n   ```\n   \n## 🏗️ Usage\n\nTo use ModerationBot, follow these steps:\n\n1. Invite the bot to your server:\n   - Obtain the bot's invite link from the Discord developer portal (see the [Discord Developer Portal](https://discord.com/developers/applications) for instructions).\n2. Grant permissions:\n   - When inviting the bot, ensure you grant it the necessary permissions for moderation, such as \"Kick Members,\" \"Ban Members,\" \"Manage Channels,\" and \"Manage Roles.\"\n3. Configure settings (optional):\n   - Use the bot's commands or a custom dashboard (if implemented) to set up custom rules, filtering options, and other configurations.\n\n## 🌐 Hosting\n\n### 🚀 Deployment Instructions\n\n1. Build the application:\n   ```bash\n   npm run build\n   ```\n2. Deploy to a cloud platform:\n   - Heroku, AWS, Google Cloud, or any other hosting platform of your choice.  \n3. Set up environment variables on the hosting platform:\n   - Ensure the environment variables `DISCORD_TOKEN`, `MONGO_URI`, and `OPENAI_API_KEY` are correctly set in the hosting environment.\n\n## 📄 License\n\nThis project is licensed under the [MIT License](https://choosealicense.com/licenses/mit/).\n\n## 👏 Authors\n\n- Author Name - [Spectra.codes](https://spectra.codes)\n- Creator Name - [DRIX10](https://github.com/Drix10)\n\n\u003cp align=\"center\"\u003e\n    \u003ch1 align=\"center\"\u003e🌐 Spectra.Codes\u003c/h1\u003e\n  \u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n    \u003cem\u003eWhy only generate Code? When you can generate the whole Repository!\u003c/em\u003e\n  \u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/Developer-Drix10-red\" alt=\"\"\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/Website-Spectra.codes-blue\" alt=\"\"\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/Backed_by-Google,_Microsoft_\u0026_Amazon_for_Startups-red\" alt=\"\"\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/Finalist-Backdrop_Build_v4-black\" alt=\"\"\u003e\n  \u003cp\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoslynx%2Fdiscord-server-moderation-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoslynx%2Fdiscord-server-moderation-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoslynx%2Fdiscord-server-moderation-bot/lists"}