Zeppelin Documentation

repository·master·Indexed 19 days ago

https://github.com/zeppelinbot/zeppelin

A high-reliability Discord moderation bot designed for large-scale servers. Features include an automoderator with word filters and spam detection, detailed moderation action tracking (cases), customizable server logs, a web-based configuration dashboard, and specialized tools like starboard and advanced slowmode management.

Tokens
54.7K
Snippets
236
Records
268
Agent score
66%

What's inside Zeppelin

  1. Overview of Zeppelin moderation bot features

    master

    Zeppelin is a Discord moderation bot optimized for large servers and high reliability. Key features include:

    • Automoderator (automod): Word filters, spam detection, and other automated safety tools.
    • Moderation Tracking (cases): Detailed tracking of moderator actions and the ability to add notes to cases.
    • Server Logs: Customizable logging for server events.
    • Customization: Support for tags, custom commands, and reaction roles.
    • Utility: Granular member search and various utility commands.
    • Configuration: Full management via a web dashboard, allowing for overrides on a per-user, per-channel, or per-permission-level basis.
    • Slowmode Management: Automatically switches between Discord's native slowmode (for durations $\le$ 6h) and bot-enforced slowmode (for longer durations).
    • Starboard: Implementation of starboard functionality.
  2. Rebuild services after file changes in production

    master

    The production Docker image build process has changed: files from the bot's folder are now copied into the image rather than being symlinked.

    Important: If you make manual changes to files within the bot's directory, these changes will not be reflected in the running container until you rebuild the services.

  3. Deploy Zeppelin services manually via Docker

    master

    If you need to run specific services or use a platform like Railway, you can use the Zeppelin Dockerfile directly.

    Build the image: docker build --tag 'zeppelin' .

    Run specific services:

    • Bot: docker run zeppelin pnpm run start-bot
    • API: docker run zeppelin pnpm run start-api
    • Dashboard: docker run zeppelin pnpm run start-dashboard

    Platform Integration (e.g., Railway): Point the platform to the Zeppelin repository. Use the commands above (pnpm run start-bot, etc.) as the start command. Important: You must run migrations when updating the bot in manual mode.

    Environment Variables: Always set NODE_ENV=production. You can pass variables using the -e flag or an --env-file.

    # Build the image
    docker build --tag 'zeppelin' .
    
    # Run the bot with environment variables
    docker run -e NODE_ENV=production --env-file .env zeppelin pnpm run start-bot
  4. Set up the Zeppelin development environment using JetBrains Gateway

    master

    To use JetBrains Gateway to connect to the development container:

    1. Install Docker.
    2. Create a .env file by copying .env.example and filling in the required values.
    3. Start the environment using:
      docker compose -f docker-compose.development.yml up
    4. In JetBrains Gateway, choose Connect via SSH and create a new connection:
      • Username: ubuntu
      • Host: 127.0.0.1
      • Port: 3022 (Must match DEVELOPMENT_SSH_PORT in .env).
    5. Enter the password specified in .env as DEVELOPMENT_SSH_PASSWORD.
    6. Select your IDE (WebStorm, PHPStorm, or IntelliJ IDEA) and set the Project directory to /home/ubuntu/zeppelin.
    7. Click Download and Start IDE.
    docker compose -f docker-compose.development.yml up
  5. Re-apply home folder changes and configure SSH

    master

    Changes made to the development environment's home folder (e.g., /home/ubuntu inside the devenv container), such as manually added SSH keys in .ssh, will be lost during the restructuring and must be re-applied.

    Best Practice: Instead of copying key files directly into the container, use SSH agent forwarding. This is automatically handled by tools like VS Code and JetBrains Gateway.

  6. Set up the Zeppelin development environment using VSCode Dev Containers

    master

    Zeppelin's development environment runs entirely within a Docker container. To use VSCode Dev Containers:

    1. Install Docker.
    2. Create a .env file by copying .env.example and filling in the required values.
    3. Install the Dev Containers plugin in VSCode.
    4. Run the command Dev Containers: Open Folder in Container... and select the Zeppelin folder.
    # No specific CLI command, follow VSCode UI steps
  7. Set up the Zeppelin development environment using VSCode Remote SSH

    master

    To use the VSCode Remote - SSH plugin to connect to the Docker-based development environment:

    1. Install Docker.
    2. Create a .env file by copying .env.example and filling in the required values.
    3. Start the environment using:
      docker compose -f docker-compose.development.yml up
    4. Install the Remote - SSH plugin in VSCode.
    5. Run Remote-SSH: Connect to Host... using the following credentials:
      • Address: ubuntu@127.0.0.1:3022 (Ensure 3022 matches the DEVELOPMENT_SSH_PORT in your .env).
      • Password: Use the value defined in .env as DEVELOPMENT_SSH_PASSWORD.
    6. Once connected, click Open folder... and select /home/ubuntu/zeppelin.
    docker compose -f docker-compose.development.yml up
  8. Initial Setup for Zeppelin Management

    master

    Before inviting the bot to a server, you must configure your environment variables to ensure you have administrative control.

    1. Add your user ID to the STAFF list in your .env file.
    2. Define at least one server to be allowed by default using DEFAULT_ALLOWED_SERVERS in your .env file.
    3. Invite the bot to the target server.

    Commands must be run on a server where the bot is present, in a channel the bot can access. In the commands below, @Bot represents a user mention of the bot.