From 848cea62e0ae7007de0a9ae48146058dfd8250e6 Mon Sep 17 00:00:00 2001 From: Matt Loberg Date: Fri, 13 Aug 2021 23:24:50 -0500 Subject: [PATCH] docs: update README with recent changes --- README.md | 57 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 81b51d7..17c2466 100644 --- a/README.md +++ b/README.md @@ -2,23 +2,18 @@ Dwight is a Discord bot to help dungeon masters with their 5e games. -## Commands - -Here are the commands available from Dwight. - -| Command | Description | -|-------------------------------------------|-------------| -| `?help [command]` | List and get help with a commands | -| `?3.5 ` | Convert 3.5 skills to 5e | -| `?elixir ` | Craft an Alchemist experimental elixir | -| `?event` | Trigger a random event | -| `?item [rarity] [type]` | Get a random magical item | -| `?madness [short\|long\|flaw] <...@user>` | Give a random madness to a user(s) | -| `?spell [level] [class] [school]` | Get a random spell | -| `?table [d100]` | Roll on the magic item tables | -| `?treasure [hoard] [d100]` | Generate treasure for an encounter | -| `?wild magic [barbarian] [d100\|d8]` | Roll on the wild magic table | -| `?portent [d20]` | Manage portent dice for a Divination Wizard | +## Overview + +* `/35`: Convert 3.5 skills to 5e +* `/elixir`: Return a random experimental elixir for Artificers +* `/event`: Return a random event +* `/item`: Return a random magical item +* `/madness`: Roll on the madness table and send it to a user +* `/portent`: Manage portent dice for a Divination Wizard +* `/spell`: Return a random spell +* `/table`: Roll on the magic item tables +* `/treasure`: Generate random treasure from the treasure tables +* `/wildmagic`: Roll on the wild magic table ## Running @@ -26,22 +21,36 @@ To run Dwight, you'll first need to create a Discord bot. Follow the instruction over at [discordjs.guide](https://discordjs.guide/preparations/setting-up-a-bot-application.html#creating-your-bot) to get started. -Once you have a bot created, you can run Dwight via [Docker](#docker) or [manually](#manually). +Once you have a bot created, you can run Dwight via [Docker](#docker) (recommended) +or [manually](#manually). ### Docker The easiest way to run Dwight is via Docker. We host images on [GitHub Container Registry](https://github.com/users/mloberg/packages/container/package/dwight-bot). +First you need to register the application commands. You can either do this globally, +which can take a couple hours to propegate or for a single guild which is instant. + + docker run -e BOT_TOKEN=your-bot-token -e CLIENT_ID=your-client-id ghcr.io/mloberg/dwight-bot [guild] + +Once installed, run the app. + docker run -e BOT_TOKEN=your-bot-token ghcr.io/mloberg/dwight-bot ### Manually To run Dwight without Docker, you'll need NodeJS 16. -Copy `.env.dist` to `.env` and set `BOT_TOKEN`. +First run `npm install` and `npm run build`. + +Then install the commands. + + BOT_TOKEN=your-bot-token CLIENT_ID=your-client-id GUILD_ID=your-guild-id node dist/bin/install.js + +Then run the bot. -Once that's done run `npm install`, `npm run build`, and `npm start`. + BOT_TOKEN=your-bot-token npm start ## Data @@ -54,10 +63,10 @@ can either save it to Redis or to disk as a JSON file. To save in redis, pass ## Development -To rebuild and restart the bot on file changes, run `npm run watch`. To increase -logging, add `LOG_LEVEL=debug` to `.env`. +Copy `.env.dist` to `.env` and fill in the values. Rebuild and restart the bot +on file changes with `npm run dev`. ## Contributing -Make sure tests (`npm run test`) and lint (`npm run lint`) pass before submitting -a Pull Request. +Make sure tests (`npm test`) and lint (`npm run lint`) pass before submitting a +Pull Request.