inspired by lots of other bot
anything welcome- thanks you a lot
stuff to install:
- postgresql for the database
- poetry for venv/dependencies
- tesseract ocr
- java 17 or any LTS version above
some stuff is optional depending how u want to run bot and what cog you have but this is how i do it
type this statements in psql
tool to create the database for the bot:
$ sudo -u postgres pgsql
CREATE USER nanika_bot WITH ENCRYPTED PASSWORD 'nanika';
CREATE DATABASE nanika_bot WITH OWNER nanika_bot;
GRANT ALL PRIVILEGES ON DATABASE nanika_bot TO nanika_bot;
\connect nanika_bot
CREATE EXTENSION pg_trgm;
install tesseract - on debian you can do this with:
apt install tesseract-ocr
for the program itselfapt install tesseract-ocr-jpn
andtesseract-ocr-eng
for the trained language data
download lavalink - you can do this by downloading the appriopate release from the lavalink repo (v4.0+)
$ wget https://github.com/lavalink-devs/Lavalink/releases/download/4.0.0-beta.5/Lavalink.jar
to make the venv with poetry, do this from within same folder as pyproject.toml
:
$ poetry install
add configuration in config.toml
~ spec is outlined in config.toml
.:
now this pair of commands needs to be used to run the bot:
$ java -jar Lavalink.jar
$ poetry run python -O app.py
personally, i run bot by spawning two screen sessions, but you can use whatever