From beb4ee7ef5d31d81221c98060e1af75ddfada25f Mon Sep 17 00:00:00 2001 From: Marcus Netz Date: Wed, 28 Apr 2021 16:29:40 +0200 Subject: [PATCH] updated README --- README.md | 59 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 52 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 98fcb74..d8cefcc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![CodeQL](https://github.com/TobenderZephyr/dsabot/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/TobenderZephyr/dsabot/actions/workflows/codeql-analysis.yml) + # DSA Discord Bot This Project is a fork of LucaSchwan/dsa-bot. @@ -10,37 +11,44 @@ It can roll dice and even compare results with your characters attributes. # Commands ### !help + Send the user a simple command list with things to do. ## Dice Rolling -### !roll *x* W/D *y* +### !roll _x_ W/D _y_ -This command can be used to roll dice. To use it one has to put in the number of dice to use as the *x* and the number of sides as the *y* in between those Numbers stands W/D which simply means dice(D) or the german word "Würfel" (W). Theoretically it doesn't matter what Letter is in between but for roleplay gamers this should feel natural. +This command can be used to roll dice. To use it one has to put in the number of dice to use as the _x_ and the number of sides as the _y_ in between those Numbers stands W/D which simply means dice(D) or the german word "Würfel" (W). Theoretically it doesn't matter what Letter is in between but for roleplay gamers this should feel natural. ie `!roll 3w20` ### !heads + Throw a coin. Heads or Tails? ## Tracking System + As this Bot should help with tracking your character, simply attach your .tdc file in a private message. ### !ep / !ap [Value] + Probes on your attributes. Rolls 1 die and compares it with the given value. Rolls another, if returned number is 1 or 20. ie `!ep 11` ### !ep / !ap [Attribute or Abbreviation] + Does the same as above. You don't need to remember your stats (if you sent a `tdc`-File, that is.) ie. `!ep Mut` or `!ep KK` ### !skill [skillname] + Returns the current level of the desired skill. ### !attack [weaponname] ([-Disadvantages/+Advantages]) + Rolls an attack by using the weapon based skillset. Calculates your combat technique value and takes into account for `MU` or `FF`. `caution`: It does not yet make use of any benefits or disadvantages your character possesses. @@ -49,19 +57,24 @@ ie. `!attack Waqqif` For a list of weapons to chose from, use `!weapons` ### !talent [skillname] ([-Disadvantages/+Advantages]) + Rolls 3 dice and compares the results of each with your current level of character attributes including your bonus on that particular skill. `caution`: It does not yet make use of any benefits or disadvantages your character has (at the moment). ie. `!talent klettern -2` + ``` @TobenderZephyr, Du würfelst auf das Talent Klettern. Deine Werte für MU, GE, KK sind 12, 13, 12. (Bonus: 6) Das waren deine 🎲: 1, 16, 2. Damit hast du 3/3 Proben bestanden. Dein Bonus: 3/6. ``` + ### !talents + Sends the User a list of talents to use on the `!talent` command. ### !tp [attribute1] [attribute2] [attribute3] ([bonus] [-Disadvantage/+Advantages]) + This command also rolls 3 dice and compares their values with entered arguments. This one is better suited for people, who did not provide a `.tdc`-File or if one of the other numerous Advantages and/or Disadvantages need to be taken into account. @@ -74,9 +87,35 @@ Roll with a set Bonus of 4: Roll with a Benefit given by the GM: `!tp 11 10 11 0 +2` +### !spells [spell] + +This command returns a list of spells known to you. This differs from `!talents` because there would be many more additions to certain +spells through rule books. +If you define a spell by not leaving arguments empty, it will display your current level and checks on your stats. + +### !chants [chant] + +See `!spells`. This uses karma point talents. + +### !cast [spell] ([-Disadvantages/+Advantages]) + +Rolls 3 dice and compares the results of each with your current level of character attributes including your bonus on that particular spell. +`caution`: It does not yet make use of any benefits or disadvantages your character has (at the moment). + +ie. `!cast fulminictus +1` + +### !chant [chant] ([-Disadvantages/+Advantages]) + +See `!cast`. This uses karma point talents. + +ie. `!chant Lautlos +1` + # How to use + To connect the script to a Bot, you need to create a Bot using the Discord Developer Portal. To do this you can follow a guide like [this](https://discordpy.readthedocs.io/en/latest/discord.html). + ## Docker + Just pull the docker image and you are good to go. `docker pull tobenderzephyr/dsabot:latest` @@ -85,12 +124,20 @@ The container needs at least the following Environment variables: `BOT_TOKEN`: The token which you retrieve for your bot Discord Developer Portal `CMDPREFIX`: Instead of using `!` as your prefix, you may want to use your own. -You may run the container with `docker run -rm -v ./data:/usr/src/app/data -e BOT_TOKEN=[token] -e CMDPREFIX=! tobenderzephyr/dsabot:latest` +### Attention + +As of version 1.5, more data is stored into separated json files which reside under the data folder. +To not place an empty directory into the container, please first create an empty file 'dsabot.db' and mount that into the container. +You could also update json files (Spells, Chants, and more to come) on your own. + +You may run the container with `docker run -rm -v ./data/dsabot.db:/usr/src/app/data/dsabot.db -e BOT_TOKEN=[token] -e CMDPREFIX=! tobenderzephyr/dsabot:latest` The database is stored under `./data`, so you are good to just mount this as a volume as seen in the example above. ### docker-compose + You may aswell use a simple `docker-compose.yml` and use docker-compose for easy running the app: + ``` version: "3" services: @@ -102,7 +149,7 @@ services: BOT_TOKEN: CMDPREFIX: ! volumes: - - ./data:/usr/src/app/data + - ./data/dsabot.db:/usr/src/app/data/dsabot.db ``` ## manual setup @@ -114,12 +161,10 @@ Then you need to run the following code inside of a terminal while beeing in the `npm install` Rename `.sample.env` file to `.env` -Enter the token you received on the Discord Developer Portal into the variable BOT_TOKEN inside `.env`. - +Enter the token you received on the Discord Developer Portal into the variable BOT_TOKEN inside `.env`. When you joined your Bot to your desired channel all you need to enter inside the bots directory: `npm start` Then your Bot should run and be working in your channel. -