A website and a discord bot for osu! purposes. Its main feature is to authenticate users of a discord server through their osu! and discord accounts. It also provides discord slash commands related to osu!, mapping and more.
- Node.js v16 or higher (Tested on v18.4.0)
- Yarn (Tested on v1.22.19)
- MongoDB v4 or higher (Tested on v5.0.9)
- Discord application with enabled bot account which can be created from here
- osu! OAuth application which can be created from here
- Sudo access
- Clone the repository
git clone https://github.com/osuperu/osu-peru-bot.git && cd osu-peru-bot
- Install the needed dependencies
yarn install
- Copy the configuration template
config.default.json
asconfig.json
.
cp config.default.json config.json
- Edit all values of
config.json
with your favorite text editor.
nano config.json
- Build the client and the server.
yarn run build:client && yarn run build:server
- Finally, you can start the project.
yarn run start
- Create a new service file with your favorite text editor.
sudo nano /etc/systemd/system/osuperubot.service
- Paste the following into that new file.
[Unit]
Description=osu!Peru Bot Service
[Service]
ExecStart=/usr/bin/npm run start --prefix /path/to/the/project
Restart=always
[Install]
WantedBy=multi-user.target
- Finally you can start the service.
sudo systemctl start osuperubot
- Additionally, if you want to start the service in boot, run the following.
sudo systemctl enable osuperubot
- Client:
- assets: Contains all assets such as images, videos or sound files.
- components: Contains all Vue components.
- i18n: Contains all translations as .ts files.
- layouts: Contains all Vue-Layouts that can be set in the vue-router.
- Server:
- discord: Contains everything needed to manage the instance of the discord bot
- commands: Contains all the slash commands.
- models: Contains all models, schemas and interfaces needed to manage the discord bot instance.
- responses: Contains all the slash commands responses.
- models: Contains all models and schemas needed for the business logic.
- router: Contains all the classes that handle routing
- api:
- oauth:
- discord: Contains all the necessary endpoints to link an discord account.
- osu: Contains all the necessary endpoints to link an osu! account.
- user: Contains a endpoint that provide information about a previously fully verified account (osu! account + Discord account).
- oauth:
- api:
- scripts: Contains all scripts as .ts files that will be executed through a Cron every certain predefined time.
- util: Contains classes that provide utility methods
- discord: Contains everything needed to manage the instance of the discord bot