Go to file
Hri7566 b05f7ec8b8 Merge branch 'dev' 2024-10-25 21:28:28 -04:00
build Update Talkomatic client to support API keys 2024-10-25 21:28:07 -04:00
config Add site 2024-10-20 01:41:52 -04:00
images Add sea creature images 2024-10-19 16:52:56 -04:00
prisma
scripts Add sea creature images 2024-10-19 16:52:56 -04:00
site Update site description 2024-10-20 02:14:40 -04:00
src Update Talkomatic client to support API keys 2024-10-25 21:28:07 -04:00
test/api Rework behaviors 2024-10-15 05:01:21 -04:00
.env.template Add talkomatic 2024-10-12 01:21:38 -04:00
.gitignore
.prettierrc
README.md
bun.lockb Attempt to fix Discord.js error related to duplicated commands 2024-10-15 20:08:13 -04:00
fish_icon.png
package.json Update Talkomatic client to support API keys 2024-10-25 21:28:07 -04:00
tsconfig.json Add talkomatic 2024-10-12 01:21:38 -04:00
tsconfig.talko.json Add talkomatic 2024-10-12 01:21:38 -04:00

README.md

Crucian Carp

fishing-api

This is a rewrite of Brandon Lockaby's fishing bot for Multiplayer Piano.

This project is a complete overhaul over the original script.

This project was created using bun init in bun v1.0.25. Bun is a fast all-in-one JavaScript runtime.

Deployment

Firstly, a PostgreSQL database must be ready beforehand to connect to with a URI. This shoud be self-explanatory to setup.

Copy the default .env file:

cp .env.template .env

Edit that file to match your environment. Keep in mind that a connection token is required for all fishing service clients. These clients are for connecting to the actual service (such as Discord or MPP) and bridges the connection to the backend API. This way, the execution related to fishing itself is focused in its own process, instead of travelling between sending messages and processing fishing-related computations.

Next, install the project's dependencies from npm:

bun install
bunx prisma db push

Run both the HTTP API and the clients for various services separately with these commands:

bun . # Main http server
bun src/mpp/index.ts # MPP bot
bun src/discord/index.ts # Discord bot
bun src/cli/index.ts # Command-line client (for debugging)