yorunoken / osu-rework-calculator-bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to build the bot

To start building, you either need to be on a UNIX operating system (Linux, MacOS, etc.) or you need to use WSL (Windows Subsystem for Linux) to instal Bun

  1. Install Bun using curl

    • curl -fsSL https://bun.sh/install | bash
  2. Install npm.

  3. Clone the repository.

    • git clone https://github.com/yorunoken/rework-calculator-bot
  4. Navigate inside the directory and install the dev, and normal dependencies.

    • cd rework-calculator-bot && npm install -D
  5. Follow this tutorial to install the calculator

  6. Fill out .env.example with your API keys (see below to see how) and delete the .example off of it.

  7. You can use bun start to start the bot and test your code.

Getting the API keys

You need to fill .env with the approriate API keys to make the bot work. Here's how:

  1. DISCORD_BOT_TOKEN (your bot's token):

    • Go to Discord's developer portal and create a new application.

    • Navigate to the Bot tab, seen on the left.

    • Reset its token and get the new one.

    • You should also enable all 3 of the privilaged intents for the bot to function.

  2. OSU_CLIENT_SECRET and OSU_CLIENT_ID (osu! Auth):

    • Go to osu! account settings and scroll until you see OAuth section.

    • Create a new OAuth application, give it a name (you can leave Callback URL part blank) and register it.

    • Edit your newly made application.

    • Copy its Client ID and Client secret and you're good to go.

Downloading and installing the calculator

First of all, you must have dotnet SDK version 6.0. you can download it here.

Run bun setup. It needs two arguments: owner, branch. Here's an example for Xexxar's aimRewriteTap branch:

bun run setup Xexxar aimRewriteTap

If no arguments are provided, it defaults to Xexxar/aimRewriteTap.

To the project, if a new version of the rework is out, run bun update.

If anything goes wrong, you can do it manually by following this tutorial or simply giving me a shout at @yorunoken on Discord.

About

License:Apache License 2.0


Languages

Language:TypeScript 100.0%