Hard fork of Zeppelin discord bot
Find a file
2021-10-05 22:10:56 +03: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 fix: revert regex batching 2021-10-05 22:10:56 +03:00
dashboard docs: document new thread overrides (#280) 2021-09-25 21:41:49 +03:00
debug Add REST request/429 debugging, temporarily disable message fetch hotfix 2021-08-19 21:15:31 +03:00
presetup-configurator Reformat all files with Prettier 2021-09-11 19:06:51 +03:00
shared Reformat all files with Prettier 2021-09-11 19:06:51 +03:00
.editorconfig Initial commit in new repository 2018-07-01 03:35:51 +03:00
.env.example Encrypt message data at rest 2020-09-16 22:32:43 +03: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
.prettierignore Update .prettierignore, use subproject specific ignore files 2021-09-11 19:06:01 +03: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 to Prettier v2 2021-09-11 19:01:55 +03:00
package.json Update prettier target files, use .prettierignore 2021-09-11 19:04:01 +03:00
process-api.json Update update scripts and process files 2021-09-04 19:57:59 +03:00
process-bot.json Update update scripts and process files 2021-09-04 19:57:59 +03:00
README.md Update README.md 2021-05-26 00:37:38 +05:00
tslint.json Reformat all files with Prettier 2021-09-11 19:06:51 +03:00
update-backend-hotfix.sh Update update scripts and process files 2021-09-04 19:57:59 +03:00
update-backend.sh Update update scripts and process files 2021-09-04 19:57:59 +03:00
update-dashboard.sh Fix dist copy in update-dashboard.sh, return to original dir 2021-09-05 17:38:52 +03:00
update.sh Update update scripts and process files 2021-09-04 19:57:59 +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.

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

Running the bot

  1. cd backend
  2. npm ci
  3. Make a copy of bot.env.example called bot.env, fill in the values
  4. Run the desired start script:
    • npm run build followed by npm run start-bot-dev to run the bot in a development environment
    • npm run build followed by npm run start-bot-prod to run the bot in a production environment
    • npm run watch to watch files and run the bot and api both in a development environment with automatic restart on file changes
  5. When testing, make sure you have your test server in the allowed_guilds table or the guild's config won't be loaded at all

Running the API server

  1. cd backend
  2. npm ci
  3. Make a copy of api.env.example called api.env, fill in the values
  4. Run the desired start script:
    • npm run build followed by npm run start-api-dev to run the api in a development environment
    • npm run build followed by npm run start-api-prod to run the api in a production environment
    • npm run watch to watch files and run the bot and api both in a development environment with automatic restart on file changes

Running the dashboard

  1. cd dashboard
  2. 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 changes

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