A Discord Bot connected to your Pterodactyl API.
at main 45 lines 1.9 kB view raw view rendered
1# PteroBot - 🪶 A Discord Bot connected to your Pterodactyl API 2This Discord Bot is a mission gived by `MrJuju0319#5801` to connect his Pterodactyl Panel to a Bot. 3 4We decide to use only the Client part of the API to avoid potential big mistake like delete a server. 5This bot can only control server instances but not delete or manage them. 6 7## Bot Features 8It can currently: 9- [x] `/servers` - Show informations about servers 10- [x] `/server {identifier}` - Show informations about a specific server 11- [x] `/power {identifier} {state}` - Provide a way to change server state (start, stop, kill, restart) 12- [x] `/send {identifier} {command}` - Send a command to a server 13- [ ] `/safemode` 👑 - Stop, Kill and backups servers from lists 14- [x] `/backups {identifier}` - Show all backups for a server 15- [x] `/create-backup {identifier}` - Create a new backup for a server 16- [x] `/help` - Show information about all available commands 17- [ ] `/add-key` - Add your api key to access your server information (only in bot private messages) 18 19<small>👑: only for admins</small> 20 21## How to Install and Run the Project 22In a first time you need to duplicate and rename `.env.example`to `.env` and complete necessary variables. 23 24In a second time: 25```bash 26# Install dependencies 27$ yarn install 28 29# Launch bot in development mode 30# - I used nodemon to automatically relaunch server after file changes 31$ yarn dev 32 33# Launch bot in production mode 34$ yarn start 35 36# Deploy commands 37$ yarn command:deploy 38``` 39 40## Contribute 41The project respect the [conventional commits](https://www.conventionalcommits.org/fr/v1.0.0/), so follow the rules carefully. 42 43In other hand, eslint check all code you write here, remember to check what you are doing with `yarn lint` and if you have some errors / warnings, it can be resolved with the `yarn lint:fix` command to simplify your life. 44 45Happy coding everyone and see you on discord. 👋