From 023745dfdc4f138d1211dd976a3a365f707c8418 Mon Sep 17 00:00:00 2001 From: hirzidevs Date: Fri, 13 Sep 2024 16:01:51 +0700 Subject: [PATCH] docs: update README and installer messages --- README.md | 43 ++++++++++++++++++++++++------------------- config.js | 10 +++++----- config.yml | 2 +- index.js | 8 ++++---- package.json | 2 +- 5 files changed, 35 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 5d81078..0222945 100644 --- a/README.md +++ b/README.md @@ -10,39 +10,49 @@ > [!WARNING] > This is a development build! Some features may not work as intended. -PteroStats is a Discord Bot that designed to check Pterodactyl or Pelican Panel stats and post it to your Discord server. +PteroStats is a Discord App/Bot that designed to check Pterodactyl or Pelican Panel stats and post it to your Discord server. ## Preview PteroStats GIF Preview PteroStats Image Preview -## Installation -- [Starting the App](#starting-the-app) +## Guide +- [Starting the App/Bot](#starting-the-app--bot) +- [Changing Env Configuration](#changing-env-configuration) - [Getting an Panel API key](#getting-panel-api-key) - [Getting a Channel ID](#getting-channel-id) - [Using Custom Emoji](#using-custom-emoji) - [Blacklist Nodes](#blacklist-nodes) -- [Reporting a Bug](#reporting-a-bug) -### Starting the App -1. [Create your Discord App](https://discordjs.guide/preparations/adding-your-bot-to-servers.html). -2. [Invite your Discord App to your Discord server](https://discordjs.guide/preparations/adding-your-bot-to-servers.html). -3. [Download the repository](https://github.com/HirziDevs/PteroStats/archive/refs/heads/dev.zip) and extract it. -4. Run `npm install` in the root directory of the app files. -5. Run `node index` and answer the provided questions to set up the app. +### Starting the App/Bot +1. [Create your Discord App/Bot](https://discordjs.guide/preparations/adding-your-bot-to-servers.html). +2. [Invite your Discord App/Bot to your Discord server](https://discordjs.guide/preparations/adding-your-bot-to-servers.html). +3. Download this repository by: + - [Downloading this repository](https://github.com/HirziDevs/PteroStats/archive/refs/heads/dev.zip) and extract it. + - Using Git: Run `git clone - b dev https://github.com/HirziDevs/PteroStats.git .` in the command line. +4. Run `npm install` in the root directory of the app/bot files. +5. Run `node index` and answer the provided questions to set up the app/bot. Installer - [Getting Panel API Key](#getting-panel-api-key) - [Getting a Channel ID](#getting-channel-id) -6. Run `node index` again to start the app, and you're done! +6. Run `node index` if you want to start the app/bot again, and you're done! Console Logging -### Getting Panel API Key +### Changing Env Configuration +1. Run `node config` in the root directory of the app/bot files. +2. Enter `2` to change configuration. + Change Configuration + +3. Answer the provided question to set up the app/bot. +4. Run `node index` if you want ti 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**. @@ -66,7 +76,6 @@ PteroStats is a Discord Bot that designed to check Pterodactyl or Pelican Panel API Key ### Getting Channel ID - 1. Enable Developer Mode in your Discord settings. Discord User Settings @@ -76,7 +85,6 @@ PteroStats is a Discord Bot that designed to check Pterodactyl or Pelican Panel Right Click Channel ### Using Custom Emoji - 1. Type `\` in the server that has the custom emoji you want. Type \ on the chat @@ -94,7 +102,6 @@ PteroStats is a Discord Bot that designed to check Pterodactyl or Pelican Panel Status Config ### Blacklist Nodes - 1. Select a node from the node list on the admin page. Nodes List @@ -112,11 +119,9 @@ You can add more than one node to the blacklist. Blacklist Config ## 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](https://discord.gg/zv6maQRah3). +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](https://discord.znproject.my.id). ## Links - - [Pterodactyl Discord Server](https://discord.gg/pterodactyl) - [Pelican Discord Server](https://discord.gg/pelican-panel) -- [Support Server](https://discord.gg/zv6maQRah3) +- [Support Server](https://discord.znproject.my.id) \ No newline at end of file diff --git a/config.js b/config.js index 1ffbb5a..ee1c62c 100644 --- a/config.js +++ b/config.js @@ -15,20 +15,20 @@ console.log( ); console.log( - ` \nCopyright © 2022 - ${new Date().getFullYear()} HirziDevs & Contributors` + - " \n \nDiscord: https://discord.znproject.my.id" + + ` \nCopyright © 2022 - ${new Date().getFullYear()} HirziDevs & Contributors\n ` + + " \nDiscord: https://discord.znproject.my.id" + " \n Source: https://github.com/HirziDevs/PteroStats" + " \nLicense: https://github.com/Hirzidevs/PteroStats/blob/main/LICENSE" + ` \n \n${package.description}\n ` ); -if (!fs.existsSync(".env")) return require("./handlers/installer.js")() +if (!fs.existsSync(".env")) return require("./handlers/installer.js")(); console.log(cliColor.yellowBright( - "Configuration is already set. Please select one of the following options:\n\n" + + "Configuration is already set. Please select one of the following options:\n \n" + `${cliColor.cyanBright("1")} ${cliColor.blueBright("»")} Start the App\n` + `${cliColor.cyanBright("2")} ${cliColor.blueBright("»")} Change configuration\n ` -)) +)); readline.question('> ', async (answer) => { readline.close(); diff --git a/config.yml b/config.yml index 332b35c..8492f8c 100644 --- a/config.yml +++ b/config.yml @@ -1,5 +1,5 @@ # PteroStats Configuration File -# Need help? Join our Discord server: https://discord.gg/zv6maQRah3 +# Need help? Join our Discord server: https://discord.znproject.my.id version: 6 # Warning: Do not change this unless you know what you are doing! # App Presence Configuration diff --git a/index.js b/index.js index 19b93c0..6a5d066 100644 --- a/index.js +++ b/index.js @@ -11,13 +11,13 @@ console.log( ); console.log( - ` \nCopyright © 2022 - ${new Date().getFullYear()} HirziDevs & Contributors` + - " \n \nDiscord: https://discord.znproject.my.id" + + ` \nCopyright © 2022 - ${new Date().getFullYear()} HirziDevs & Contributors\n ` + + " \nDiscord: https://discord.znproject.my.id" + " \n Source: https://github.com/HirziDevs/PteroStats" + " \nLicense: https://github.com/Hirzidevs/PteroStats/blob/main/LICENSE" + ` \n \n${package.description}\n ` ); -if (!fs.existsSync(".env")) return require("./handlers/installer.js")() +if (!fs.existsSync(".env")) return require("./handlers/installer.js")(); -require("./handlers/app.js")() \ No newline at end of file +require("./handlers/app.js")(); \ No newline at end of file diff --git a/package.json b/package.json index 9de45fc..7419d15 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "pterostats", "version": "4.0.0", - "description": "PteroStats is a Discord App that designed to check Pterodactyl or Pelican Panel stats and post it to your Discord server.", + "description": "PteroStats is a Discord App/Bot that designed to check Pterodactyl or Pelican Panel stats and post it to your Discord server.", "license": "MIT", "repository": "HirziDevs/PteroStats", "homepage": "https://pterostats.znproject.my.id",