An HTTP API to help some functionalities of MenheraBot
MenheraBot »
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.
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
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.
If you want to build the image yourself, you can do it by following these steps:
- 🧹 Clone the repository
git clone https://github.com/MenheraBot/MenheraApi.git
- 💻 Building the Image
docker build . --tag api
- 🏃♂️ 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!.
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.
- 📥 Download the image
docker pull ghcr.io/menherabot/api:latest
You need to be logged in
- 🏃♂️ 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 theunless-stopped
policy should handle any kind of error that could kill our API.
You have now a API running in you machine.
@ySnoopyDogy |
@Tsugami |
---|
Distributed under the MIT License. See LICENSE
for more information.
Discord: Luxanna#5757
Twitter: @Luxanna_Dev
MenheraBot was made with ❤️ by Luxanna.