๐ง 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:
Data
This is a private route protected with a secret token. It's used to update user statistics, save command execution.
Info
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:
- ๐งน 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!.
๐ | 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.
- ๐ฅ 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.
๐จ | 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.