Skip to content

MenheraBot/MenheraAPI

Repository files navigation


Logo

🔧 Menhera API 🔧

An HTTP API to help some functionalities of MenheraBot
MenheraBot »

📡 | MenheraAPI

Menhera's API is intended to manage:

  • Save command execution;
  • Keep shard statistics updated;
  • Save command info;
  • Serve user statistics.
  • Serve data to its WebSite.

🔀 | Routes

This repository is divided into 2 main routes, which serves different type of data:

This is a private route protected with a secret token. It's used to update user statistics, save command execution.

This route is open to the public. It's used to serve command info and shards info to MenheraBot's Website

🔥 | Running

To run the Api, you need to have Docker in your machine. You have two options of installation, follow the one that applies to you.

🔮 | Building the Image

If you want to build the image yourself, you can do it by following these steps:

  1. 🧹 Clone the repository
git clone https://github.com/MenheraBot/MenheraApi.git
  1. 💻 Building the Image
docker build . --tag api
  1. 🏃‍♂️ Running a Container
docker run --name MenheraApi \
-e "API_TOKEN=" \
-e "PORT=" \
-e "MENHERA_AGENT=" \
-e "DATABASE_URL=" \
--restart unless-stopped \
-p 25156:25156 \
-d -t api

Obs: API_TOKEN and MENHERA_AGENT is just for authentication purposes. Database_url is the url of your postgres database, and port is the exposed port of Dockerfile. Is never good to have your API down, so the unless-stopped policy should handle any kind of error that could kill our API.

The api is on fire right now!.

🎉 | Downloading the Image

If you don't really want all the source code, and just want to execute the bot, you can just donwload the image from the Container Registry.

  1. 📥 Download the image
docker pull ghcr.io/menherabot/api:latest

You need to be logged in

  1. 🏃‍♂️ Running a Container
docker run --name MenheraApi \
-e "API_TOKEN=" \
-e "PORT=25156" \
-e "MENHERA_AGENT=" \
-e "DATABASE_URL=" \
-p 25156:25156
--restart unless-stopped \
-d -t ghcr.io/menherabot/api:latest

Obs: API_TOKEN and MENHERA_AGENT is just for authentication purposes. Database_url is the url of your postgres database, and port is the exposed port of Dockerfile, in this image is 25156. Is never good to have your API down, so the unless-stopped policy should handle any kind of error that could kill our API.

You have now a API running in you machine.

🔨 | Made With

💖 | Contributors


@ySnoopyDogy

@Tsugami

⚖️ | License

Distributed under the MIT License. See LICENSE for more information.

📧 | Contact

Discord: Luxanna#5757

Twitter: @Luxanna_Dev


MenheraBot was made with ❤️ by Luxanna.