-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f548e8c
commit 610a35b
Showing
17 changed files
with
173 additions
and
23 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
authors: | ||
- parker02311 | ||
--- | ||
|
||
This guide is the next part after [setting up the database](database.md). If you have not setup the database yet please do so before continuing. | ||
|
||
## Creating the JSON File | ||
The bot uses a mix of both a `config.json` and a `.env` file for configuration. The `config.json` file is used for configuration that is not sensitive and can be shared publicly. The `.env` file is used for sensitive information such as tokens and database connection strings. To create the `config.json` file we will copy the `example.config.json` file and rename it to `config.json`. We can do this with the following. | ||
<video width="1920" height="1080" controls> | ||
<source src="/assets/create_pterodactyl_config.mp4" type="video/mp4"> | ||
</video> | ||
|
||
## Configuration Explained | ||
Now that we have our `config.json` file we can start configuring it. Below is a list of all the options and what they do. | ||
```json | ||
{ | ||
"Bot": { | ||
"Prefix": ".", | ||
"Guilds": [ | ||
1234567890 | ||
], | ||
"Owners": [ | ||
1234567890 | ||
], | ||
"Activity": { | ||
"Presence": "watching {users:,} costumers • Version {version}", | ||
"Status": "online" | ||
} | ||
}, | ||
"Logging": { | ||
"PurchasesChannel": 1234567890, | ||
"GlobalCustomerRole": 1234567890 | ||
}, | ||
"Data": { | ||
"Database": "mysql|postgresql|mongodb|" | ||
}, | ||
"API": { | ||
"IP": "0.0.0.0", | ||
"Port": 5000, | ||
"Key": "CHANGEME" | ||
} | ||
} | ||
``` | ||
|
||
- Bot: | ||
- Prefix: ~~The prefix the bot will use for commands.~~ **(Unused)** | ||
- Guilds: A list of guilds the slash commands will be in.[^1] | ||
- Owners: A list of user IDs that will be able to use owner commands. | ||
- Activity: | ||
- Presence: The presence the bot will use. Supports the following variables: | ||
- `{users:,}`: The number of users in the database. | ||
- `{guilds:,}`: The number of guilds the bot is in. | ||
- `{version}`: The version of the bot. | ||
- `{prefix}`: ~~The prefix of the bot.~~ **(Unused)** | ||
- Status: The status the bot will use. [Learn More](https://discordpy.readthedocs.io/en/stable/api.html#discord.Status "discord.Status") | ||
- Logging: | ||
- PurchasesChannel: The channel ID of the channel the bot will log purchases in. | ||
- GlobalCustomerRole: The role ID of the role the bot will give to customers of all products. | ||
- Data: | ||
- Database: The type of database being used. If you are using MariaDB make sure to use `mysql`. | ||
- API: | ||
- IP: The IP the API will listen on. (Best left as `"0.0.0.0"`) | ||
- Port: The port the API will listen on. (This port must be open to the internet) | ||
- Key: The key the API will use for authentication. (This key must be kept secret) | ||
|
||
|
||
## Finishing the .env file | ||
|
||
Now that we have our `config.json` file we can finish our `.env` file. To do this we will add the following to the `.env` file. Replace the values with your own. | ||
|
||
```bash | ||
token=this_is_your_bot_token | ||
``` | ||
|
||
[Next: Starting the Bot](running.md){ .md-button .md-button--primary } | ||
|
||
[^1]: The first guild in this list will also be the guild the bot will use for customer roles and the purchase channel. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
authors: | ||
- parker02311 | ||
--- | ||
|
||
This guide is the next part after [installing the system](setup.md). If you have not installed the system yet please do so before continuing. | ||
|
||
!!! warning | ||
|
||
The Pterodactyl egg is designed for MySQL (MariaDB) only. If you are using a different database the hosting provider will need to modify your egg. | ||
|
||
### Connection String | ||
After you have choosen the database type you are going to use, make the connector string and save it for later. You will need it in the next step. [Get help with connection strings](https://www.prisma.io/docs/reference/database-reference/connection-urls) | ||
|
||
??? example | ||
|
||
``` | ||
mysql://USER:PASSWORD@HOST:PORT/DATABASE | ||
``` | ||
|
||
## Setting Up ENV Variables | ||
Now that we have our database setup we need to configure the bot to use it. To do this we will use a .env file. This file will contain all of our environment variables that the bot will use. To create the .env file we can do the following. | ||
<video width="1920" height="1080" controls> | ||
<source src="/assets/create_pterodactyl_env.mp4" type="video/mp4"> | ||
</video> | ||
|
||
Replace the values with your own. | ||
|
||
## Using Prisma | ||
We use [Prisma](https://www.prisma.io/) to manage our database. To setup Prisma we will do the following. | ||
|
||
1. Click the "Startup" tab. | ||
2. Enable "DB Push". | ||
|
||
[Next: Configuration](configuration.md){ .md-button .md-button--primary } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
authors: | ||
- parker02311 | ||
--- | ||
|
||
This guide is the next part after [configuration](configuration.md). If you have not configured the bot yet please do so before continuing. | ||
|
||
## Running the Bot | ||
The easiest part of this entire guide, running the bot. To run the bot we will do the following: | ||
|
||
1. Click the "Console" tab. | ||
2. Click "Start" to start the bot. | ||
3. After the bot has started go back to the "Startup" tab. | ||
4. Disable "DB Push". | ||
|
||
## Next Steps | ||
Now that you have the bot running you can start using it. If you need help with commands see [commands guide](../../../guide/commands.md) to get a list of commands. If you need help with anything else you can ask in our [Discord](https://discord.gg/Eb384Xw) server. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
authors: | ||
- parker02311 | ||
--- | ||
|
||
Before we get to setting up our database and configuring the bot we must first install the system. This is different depending on each hosting provider but the process will generally be the same. | ||
|
||
1. You need to purchase a Redon Hub server from your hosting provider, every provider does this in a different way. | ||
2. Once you have purchased a Redon Hub server you need to login and familiarize yourself with the panel. | ||
3. Next you will need to setup a database, this is also dependent on your provider, consult their documentation. | ||
|
||
[Next: Database Setup](database.md){ .md-button .md-button--primary } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters