Pterodactyl Market has been acquired by sourceXchange, a market part-owned by ThatProgrammer.
The creation of new resources and the updating of existing ones is now disabled. You can transfer your licenses here!
No image found

Basic Pterodactyl Discord Bot | A simple discord bot for starting and stopping servers [1.1]


Source code: https://github.com/kevinsnijder/pterodactyl-discord-bot

 

1. Commands


/login [client api key] - Logs you into the pterodactyl panel

/deletelogin [user] - Removes the login from the provided user

/listservers - Lists all servers your user can control. Uses both the clients API key and optionally also the globally set API key.

/startserver [server guid] - Starts the provided server

/stopserver [server guid] - Stops the provided server


Image 1: /listservers (optionally) shows global servers without logging in, but shows more servers after logging in with my own client key


Image 2: /startserver shows starting with timer


Image 3: /stopserver autocompletes with servers that are currently online

2. Features

2.1 Implemented features:

- Auto-updates every start by pulling the newest image

- Automatically assign a role to logged in users and remove the role when deleting logins

- All commands have proper autocompletion functions. 
/startserver only autocompletes offline servers
/stopserver only autocompletes online servers
/deletelogin only autocompletes logged in users

- Ability to set a global client key that every client can use whether they are logged in to the bot or not
Once users are logged they can control both the servers from the global API key and their personal API key

2.2 Features for future releases (WIP):

- Setting a channel where console output of a specified server will be logged (/setconsolechannel [serverid] [allowcommands])
Should also be able to send command from the chat directly to the pterodactyl console

 

3. Setup

3.1. Uploading the egg to pterodactyl

- Go to your pterodactyl panel -> Admin -> Nests
- On the top right press "Import Egg"
- Select the egg from your disk
- Press "Import"

3.2 Creating a discord bot for your server

- Make sure "developer mode" is enabled on your discord account (discord client -> settings -> advanced -> "developer mode")
- Go to the discord developer applications page.
- Press "New application"
- Optional: Set an icon and some basic information about your bot
- Go to the Bot tab
- Disable "Public bot"
- Press "Reset token" and copy the token. You will need it when configuring the server in pterodactyl
- Go to the OAuth2 -> URL Generator tab
- In the "Scopes" panel, select "Bot"
- In the "Bot permissions" panel, select the following:

- Optional: Manage roles (the role you want to add should be a lower role than the one the discord bot uses)
- Send messages
- Send messages in threads

- Open the generated URL in a new browser tab to invite the bot to your server

3.3 Creating the server in pterodactyl

- Create a server as usual and select the egg you imported
- Enter the correct values for the variables

- Required: Pterodactyl panel URL - The URL of your pterodactyl. ex. https://pterodactyl.mydomain.com
Required: Discord bot token - The token you got from the "Bot" tab
- Optional: Pterodactyl global API key - A client API key that can be used by everyone on the server.
You could create a basic user in pterodactyl with some start/stop permissions on some specific servers you would like everyone to be able to control.
When users log in with their own client API key both keys can be used.
- Optional: Discord logged in group ID - The ID of the group logged in users should be added to. Make sure this group is ranked lower than the group of the discord bot.

MisterJVANDAL_QC
MisterJVANDAL_QC

April 10, 2024, 12:08 am

Sadly I am not able to correctly set it up. It's all working but when I send a command it says the application is not working :(

Member
Stephen_A1
Stephen_A1

March 4, 2024, 1:44 pm

Hi, i'm very new to this kind of intergration (newbie) but I really like this bot and would love to use it for our servers, however, I have tried but for some reason it isn't working for me. Would the Author have a YouTube Video showing how to install?

Member
WaverlyCole
WaverlyCole

February 12, 2024, 2:13 am

Uses little to no resources, easy setup! My only requests would be adding a restart command, and maybe an option to make responses public messages instead of private.

Member
kevin_s
kevin_s

January 3, 2024, 11:11 pm

Member
cc3768
cc3768

September 18, 2023, 3:10 pm

Does what i need i wish there was a global message option kinda like how server listservers work just as a global message

Member


INFORMATION


Price:
FREE
Views:
658
Downloads:
192
First Release:
July 11, 2023, 2:29 pm
Last Release:
January 4, 2024, 12:10 am
Ratings:

Kevin Resources


Double Action: Boogaloo Egg

An egg for the source mod Double Action: Boogaloo

Basic Pterodactyl Discord Bot

A simple discord bot for starting and stopping servers