Introduction
PteroStats is a Discord App/Bot designed to check Pterodactyl or Pelican Panel stats and post it to your Discord server.
Preview
Guide
- Starting the App/Bot
- Changing Env Configuration
- Getting an Panel API key
- Getting a Channel ID
- Using Custom Emoji
- Blacklist Nodes
- Notifier
- Docker
Starting the App/Bot
-
Download this repository:
- Download this repository and extract it.
- Using Git: Run
git clone https://github.com/HirziDevs/PteroStats.gitin the command line.
-
Run
npm installin the root directory of the app/bot files. -
Run
node indexand answer the prompted questions to set up the app/bot.
-
Run
node indexif you want to start the app/bot again, and you're done!
Changing Env Configuration
Tip
You can change other configuration at the
config.ymlfile.
-
Run
node setupin the root directory of the app/bot files. -
Enter
2to change configuration.
-
Answer the provided question to set up the app/bot.
-
Run
node indexif you want to start the app/bot again, and you're done!
Getting Panel API Key
Warning
The use of Application API keys is deprecated; you should use Client API keys.
Tip
Make sure the owner of the Client API key has access to the administrator panel.
-
Go to your
PterodactylorPelicanPanel and navigate to theAccount Page.
-
Click on the
API Credentialsbutton.
-
Fill in the
Descriptionand click theCreatebutton.
-
Copy the API key.
Getting Channel ID
Using Custom Emoji
-
Type
\in the server that has the custom emoji you want.
-
Select the custom emoji you want.
-
Copy the text!
-
Paste the emoji ID into the config.
Blacklist Nodes
-
Select a node from the node list on the admin page.
-
Check the URL and copy the node ID.
-
Paste the ID into the blacklist in the config.
Tip
You can add more than one node to the blacklist.
Links
=======
Notifier
Get a notification on Discord when your panel or specific nodes are currently down.
Enabling Notifier
Open config.yml and set enable at the notifier configuration to true
Getting Discord Webhook URL
-
Go to the channel settings of the channel you want to set for the notifier.
-
Go to integrations and select
View WebhooksorCreate Webhook.
-
Create a new webhook and copy the Webhook URL
-
Paste the Webhook URL on the webhook notifier configuration.
Tip
You can change the webhook icon and username on the webhook settings.
Docker
This is a guide to run the bot using docker (alternative way to run the bot)
Installation
curl -fsSL https://get.docker.com | sh
Docker Compose
Copy the docker-compose.yml file to your server and run docker compose pull
Copy the config.yml file at the same directory as the docker-compose.yml file and configure it
Fill the environment variables in the docker-compose.yml file and run the bot using docker compose up -d
docker compose up -d
docker compose logs -f pterostats
Docker Run
docker run -d --name pterostats -e PanelURL=<PanelURL> -e PanelKEY=<PanelKEY> -e DiscordBotToken=<DISCORD_BOT_TOKEN> -e DiscordChannel=<DISCORD_CHANNEL_ID> -v $(pwd)/config.yml:/app/config.yml ghcr.io/hirzidevs/pterostats:latest
docker logs -f pterostats
Reporting a Bug
Enable log_error in the config.yml file and check the console for the error message. After that, report it to our Discord server at Support Server.

