The official bot of the DBM German Discord server.
This bot is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
The following explains how to setup and start the bot. Please note that neither a bot token nor client id are provided. Should the used bot not be on the DBM German servers, the IDs in the initialization event have to be adjusted.
- Create a fork of the repository (optional)
- Clone the fork to your local machine
- Make sure Steam and Discord Bot Maker 2.0 (without mods!) are installed
- Steam Client – Download: https://store.steampowered.com/about/
- Discord Bot Maker 2.0 – Steam Website: https://s.team/a/682130 | Steam Client: steam://store/682130
- Run the setup via
npm run setup
- Open the project in DBM
- Set a bot token in the settings
- Start the bot using
npm run start
Nachfolgend wird erklärt, wie man den Bot aufsetzt und startet. Bitte beachte, dass weder Bot-Token noch Client-ID bereitgestellt werden. Sollte der verwendete Bot nicht auf den DBM German Servern sein, müssen die IDs im Initialisierungsevent angepasst werden.
- Erstelle einen Fork von dem Repository (optional)
- Klone den Fork auf deine lokale Maschine
- Stelle sicher, dass Steam und Discord Bot Maker 2.0 (ohne Mods!) installiert sind
- Steam Client – Download: https://store.steampowered.com/about/
- Discord Bot Maker 2.0 – Steam Website: https://s.team/a/682130 | Steam Client: steam://store/682130
- Führe das Setup aus via
npm run setup
- Öffne das Projekt in DBM
- Lege einen Bot-Token in den Einstellungen fest
- Starte den Bot mittels
npm run start
Generally speaking, the bot should only be edited via DBM. Other changes can howevery be made manually in the raw
or res
folder. For synchronization of all changes, there are the following scripts available.
NPM script | Description |
---|---|
to-dbm | Raw data files in the folders raw/commands and raw/events get konverted to DBM files and saved in bot/data . |
to-raw | DBM files in the bot/data folder get konverted to raw data files and saved in raw/commands / raw/events . |
copy-code | Additional code in the raw/code folder gets copied to bot/code . |
copy-res | Resources in the res folder gets copied to bot/resources . |
Grundsätzlich sollte der Bot nur über DBM bearbeitet werden. Sonstige Änderungen können jedoch auch manuell im raw
-
oder res
-Ordner vorgenommen werden. Zur Synchronisation aller Änderungen stehen nachfolgende Skripte zur Verfügung.
NPM-Skript | Beschreibung |
---|---|
to-dbm | Raw Data-Dateien in den Ordnern raw/commands und raw/events werden zu DBM-Dateien konvertiert und in bot/data gespeichert. |
to-raw | DBM-Dateien in dem bot/data -Ordner werden zu Raw Data-Dateien konvertiert und in raw/commands / raw/events gespeichert. |
copy-code | Zusätzlicher Code in dem raw/code -Ordner wird nach bot/code kopiert. |
copy-res | Resourcen in dem res -Ordner werden nach bot/resources kopiert. |
- Build the Docker image via
npm run build
/npm run build-arm
- Create a data directory or Docker volume on your host machine and copy the DBM data files into it
- Open the copied
settings.json
and insert the bot token and client id - Start a container using
docker run
and a mount to the data directory
Example to start the bot with a mount to the sub-folder data
of the current directory:
docker run --name dbm-german-bot --mount type=bind,source="$(pwd)"/data,target=/home/node/app/data dbm-german-bot:3.1.0
Optionally --detach
and --restart always
can be used to run the container in the background
and restart it automatically.
- Baue das Docker-Image via
npm run build
/npm run build-arm
- Erstelle ein Daten-Verzeichnis oder Docker-Volume auf deinem Host-Rechner und kopiere die DBM-Datendateien hinein
- Öffne die kopierte
settings.json
und füge den Bot-Token und die Client-ID ein - Starte den Container mittels
docker run
und einem Mount zum Daten-Verzeichnis
Beispiel zum Starten des Bots mit einem Mount zum Unterordner data
im aktuellen Verzeichnis:
docker run --name dbm-german-bot --mount type=bind,source="$(pwd)"/data,target=/home/node/app/data dbm-german-bot:3.1.0
Optional können --detach
und --restart always
verwendet werden, um den Container im Hintergrund auszuführen
und ihn automatisch neu zu starten.