Lyricat is a Discord bot that provides querying service for things related to the game Lyrica.
Follow the steps.
- Clone this repo and run
bundle install
. - Use AssetRipper
to extract Lyrica's APK.
Specify the paths to useful files in
config.yml
or copy the useful files to the paths specified inconfig.yml
. - Specify every required environment variables. See environment variables.
- Copy
config.yml
to the dir specified byLYRICAT_DATA_DIR
. - Run
ruby main.rb
.
Name | Description |
---|---|
LYRICAT_DATA_DIR |
The dir containing database and config files. Defaults to ./data . |
LYRICAT_RES_DIR |
The dir containing resource files. The base dir of items in res in config. Defaults to ./res . |
LYRICAT_CONFIG |
The path to config file. Relative to LYRICAT_DATA_DIR . Defaults to config.yml . |
LYRICAT_DAN |
The path to the file specifying dan courses. Relative to LYRICAT_DATA_DIR . Defaults to dan.yml . |
LYRICAT_ALIASES |
The path to the file specifying aliases. Relative to LYRICAT_DATA_DIR . Defaults to aliases.yml . |
LYRICAT_THREAD_COUNT |
The number of threads to use for parallel HTTP requests. Defaults to 8. |
LYRICAT_RETRY_COUNT |
The number of retries when communicating with Lyrica's server. Defaults to 3. |
LYRICAT_STATIC_SESSION_TOKEN |
(Required) The session token used to retrieve leaderboards. |
LYRICAT_DISCORD_TOKEN |
(Required) The Discord bot token. |
LYRICAT_DISCORD_MAINTAINER_ID |
The Discord user ID of the maintainer. |
LYRICAT_SKIP_COMMAND_REGISTRATION |
Skip command registration. Command registration is necessary for a new bot or when there is command update, but it makes startup very slow. Defaults to false. |
- Download
docker-compose.yml.example
and rename it todocker-compose.yml
. - Download
data/config.yml
and put it in thedata
dir (specified in the volume mapping indocker-compose.yml
). - Specify every required environment variables in
docker-compose.yml
. - Use AssetRipper to extract Lyrica's APK, and put the useful files in the
res
dir (specified in the volume mapping indocker-compose.yml
). - Run
docker compose up -d
.
If you want to build the image yourself,
clone this repo and rename docker-compose.yml.example
to docker-compose.yml
.
Change image: ulysseszhan/lyricat:latest
to build: .
.
Run docker compose build
.
Simply run docker compose pull && docker compose up -d
.
Simply copy over data.db
in the data
dir (specified in the volume mapping in docker-compose.yml
).
AGPL-3.0-only.