Skip to content

Repository files navigation

Chat Guard

Automated Discord Moderation

Configurable content filtering and community protection for Discord servers.

Documentation GitHub

Build Status Licence Node Issues


Overview

Chat Guard is an open-source Discord moderation bot built for communities that need reliable, automated enforcement. It provides configurable protections, escalation policies, whitelisting, and auditable moderation logs.

Features

  • Bad word filtering with customisable word lists and server-specific terms
  • Spam prevention for duplicate messages and rapid posting
  • Mass mention control to prevent @everyone/@here abuse
  • Link and invite blocking for external URLs and Discord invites
  • Character limits to enforce message length constraints
  • Escalation policy from warning to timed mute with configurable duration
  • Granular whitelisting by member, role, or channel
  • Dedicated logging of all moderation actions in real time

Quick Start

Prerequisites

  • Node.js 16.9.0 or later
  • MongoDB instance
  • Discord bot token

Installation

git clone https://github.com/hmddevs/chat-guard.git
cd chat-guard
npm install

Copy .env.example to .env and set your Discord bot token, MongoDB connection URL, and bot owner IDs, then start the bot:

npm start

First Steps

  1. Invite the bot to your Discord server with Administrator permissions.
  2. Set up logging with /logchannel #moderation-logs.
  3. Enable protections: spam, bad words, link blocking via slash commands.
  4. Whitelist trusted roles to exempt moderators and admins from filters.
  5. Review logs and adjust settings as needed.

See the Getting Started Guide and Configuration Reference for details.

Documentation

Full documentation is available at hmddevs.github.io/chat-guard.

Technology

  • Runtime: Node.js (16.9.0+)
  • Framework: discord.js v14
  • Database: MongoDB with Mongoose ODM
  • Architecture: Event-driven command handling
  • Deployment: PM2, Docker, Heroku, or bare Node.js

Contributing

Contributions are welcome. Please review the Contributing Guidelines, Code of Conduct, and Security Policy before opening a pull request.

File bugs or feature requests via GitHub Issues.

Licence

CC BY-NC-SA 4.0 with additional project-specific terms. See LICENSE for full details.

  • Free for non-commercial use
  • Attribution required
  • Derivatives must use the same licence
  • Commercial use requires permission

For commercial licensing enquiries, contact info@hmddevs.org.

Support


Chat Guard is based on work by Klanter.

Built by HMD Developments.

About

Chat Guard · Open-source Discord moderation & server management bot. Feature-complete; in production since 2021.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages