XaverStiensmeier / ilarisdiscordbot

A discord bot for the ilaris ttrpg
GNU General Public License v3.0
0 stars 0 forks source link

ilarisdiscordbot

A work in progress discord bot for the ilaris ttrpg.

If you use this dev version, make sure that the bot can only be invited by you. Otherwise, others can view your log and groups without administrator rights.

How to use

Needs to be updated

GeneralCommands

Type !help command for more info on a command (including parameter descriptions). You can also type !help category for more info on a category.

How to host

This guide is not final. It is not very well written, but only for those who really want to hose this bot right now. This guide will only cover linux, but as we are talking about python there won't be great changes... probably.

If you want to host this bot, please be aware that it is work in progress. Bugs will still occur and you alone are responsible for including it in your servers.

Get a bot token

First you need to acquire a bot token.

Clone the repository and install missing dependencies

Clone the repository

git@github.com:XaverStiensmeier/ilarisdiscordbot.git

Create a virtual environment

python3 -m venv ~/.venvs/discordbot

Install dependencies (mainly pyyaml and discord.py)

pip install -r /path/to/requirements.txt

Add missing files/folders

I might be forgetting some. If you encounter issues regarding missing files, open an issue and I will write more about what's needed.

Large Folders

  1. resources/manoeverkarten/ is a folder containing Manöverkarten Gatsu's Manöverkartenplugin
  2. resources/ilaris/ is a folder containing the core rules as image files (ilaris-001.png, ..., ilaris-219.png)
Converting PDFs to images

In order to convert pdfs to images use from

sudo apt install poppler-utils

the command

pdftoppm -png FileIn.pdf outName

Need more info on converting PDFs to images?

Private Data Folders

  1. resources/token is a file containing your token.
  2. resources/groups/groups.yml is a file containing existing groups

Actually hosting

Run

./ilaris_bot.py

As long as ilaris_bot is running, your ilarisdiscordbot instance is up. Enjoy.

Check the discord.log file if anything goes wrong.