3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 16:55:03 +00:00
Zeppelin is a moderation bot for Discord, designed with large servers and reliability in mind.
Find a file
Bluenix c9fa56de2c
Improve documentation around bot setup
Adding comments and suitable defaults to the .env files
2021-08-15 14:22:09 +02:00
.github/workflows Remove PR auto-label action 2021-08-14 16:35:14 +03:00
assets Add Readme Banner! (#190) 2021-05-06 21:41:30 +03:00
backend Improve documentation around bot setup 2021-08-15 14:22:09 +02:00
dashboard Improve documentation around bot setup 2021-08-15 14:22:09 +02:00
presetup-configurator Include Sticker and Emoji events in Logs 2021-07-29 01:02:29 +02:00
shared Update to TS 4.1, use same TS package in all sub-packages 2020-12-13 15:26:33 +02:00
.editorconfig Initial commit in new repository 2018-07-01 03:35:51 +03:00
.env.example Improve documentation around bot setup 2021-08-15 14:22:09 +02:00
.gitignore Finish preliminary rework, ready to test 2021-06-02 04:07:50 +02:00
.nvmrc use node 16 2021-08-12 13:20:09 +01:00
.prettierrc prettier: enable dangling commas 2019-02-09 13:23:35 +02:00
dependabot.yml dependabot: only update direct dependencies 2021-08-14 16:01:30 +03:00
package-lock.json Upgrade Knub to v30.0.0-beta.39 2021-08-14 14:37:49 +03:00
package.json Upgrade Knub to v30.0.0-beta.39 2021-08-14 14:37:49 +03:00
process-api.json Reorganize project. Add folder for shared code between backend/dashboard. Switch from jest to ava for tests. 2019-11-02 22:11:26 +02:00
process-bot.json Reorganize project. Add folder for shared code between backend/dashboard. Switch from jest to ava for tests. 2019-11-02 22:11:26 +02:00
README.md Improve documentation around bot setup 2021-08-15 14:22:09 +02:00
tslint.json Reorganize project. Add folder for shared code between backend/dashboard. Switch from jest to ava for tests. 2019-11-02 22:11:26 +02:00
update.sh Load NVM in update script 2019-05-07 22:27:50 +03:00

Zeppelin Banner

Zeppelin

Zeppelin is a moderation bot for Discord, designed with large servers and reliability in mind.

Main features include:

  • Extensive automoderator features (automod)
    • Word filters, spam detection, etc.
  • Detailed moderator action tracking and notes (cases)
  • Customizable server logs
  • Tags/custom commands
  • Reaction roles
  • Tons of utility commands, including a granular member search
  • Full configuration via a web dashboard
    • Override specific settings and permissions on e.g. a per-user, per-channel, or per-permission-level basis
  • Bot-managed slowmodes
    • Automatically switches between native slowmodes (for 6h or less) and bot-enforced (for longer slowmodes)
  • Starboard
  • And more!

See https://zeppelin.gg/ for more details.

Development

These instructions are intended for bot development only, they are not safe to follow for self-hosting.

👉 No support is guaranteed for self-hosting the bot! 👈

Running the backend

  1. Go into the backend directory: cd backend

  2. Install dependencies: npm ci

  3. Make a copy of bot.env.example and api.env.example (removing the .example suffix), fill in the values. There are defaults for your convenience, feel free to replace these.

  4. Setup the database schema, use npm run migrate-dev.

  5. Run npm run build followed by the desired start script:

    • Recommended is to use npm run watch, this starts both the bot and api server and automatically restarts on save.
    • npm run start-bot-dev to start the bot.
    • start-api-dev to start the api server.
  6. On the first run you need to add your guild to the allowed_guilds table, otherwise the bot leaves on next restart. Use the following queries (replacing the all-caps variables):

INSERT INTO allowed_guilds (id, name, icon, owner_id) VALUES ("SERVER_ID", "SERVER_NAME", null, "OWNER_ID");
INSERT INTO configs (id, `key`, config, is_active, edited_by)
VALUES (1, "global", "{\"prefix\": \"!\", \"owners\": [\"YOUR_ID\"]}", true, "YOUR_ID");

INSERT INTO configs (id, `key`, config, is_active, edited_by)
VALUES (2, "guild-GUILD_ID", "{\"prefix\": \"!\", \"levels\": {\"YOUR_ID\": 100}, \"plugins\": { \"utility\": {}}}", true, "YOUR_ID");

Running the dashboard

  1. Go into the dashboard directory: cd dashboard

  2. Install dependencies for the dashboard: npm ci

  3. Make a copy of .env.example called .env, fill in the values.

  4. Run the desired start script:

    • npm run build compiles the dashboard's static files to dist/ which can then be served with any web server
    • npm run watch runs webpack's dev server that automatically reloads on save

Notes

  • Since we now use shared paths in tsconfig.json, the compiled files in backend/dist/ have longer paths, e.g. backend/dist/backend/src/index.js instead of backend/dist/index.js. This is because the compiled shared files are placed in backend/dist/shared.

  • The backend/register-tsconfig-paths.js module takes care of registering shared paths from tsconfig.json for ava and compiled .js files

  • To run the tests for the files in the shared/ directory, you also need to run npm ci there

Config format example

Configuration is stored in the database in the configs table.

prefix: '!'

# role id: level
levels:
  "12345678": 100 # Example admin
  "98765432": 50 # Example mod

plugins:
  mod_plugin:
    config:
      kick_message: 'You have been kicked'
      can_kick: false
    overrides:
      - level: '>=50'
        config:
          can_kick: true
      - level: '>=100'
        config:
          kick_message: 'You have been kicked by an admin'

  other_plugin:
    config:
      categories:
        mycategory:
          opt: "something"
        othercategory:
          enabled: false
          opt: "hello"
    overrides:
      - level: '>=50'
        config:
          categories:
            mycategory:
              enabled: false
      - channel: '1234'
        config:
          categories:
            othercategory:
              enabled: true