From 10d335d76afda67821b1e7edfb348a7016e8f44b Mon Sep 17 00:00:00 2001 From: Mirasaki Date: Wed, 18 May 2022 01:24:38 +0200 Subject: [PATCH] include TEST_SERVER_GUILD_ID in .env.exmaple --- README.md | 40 ++++++++++++++++++++-------------------- config/.env.example | 1 + 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index de011d2..7ebffbc 100644 --- a/README.md +++ b/README.md @@ -4,25 +4,25 @@ [![GitHub issues](https://img.shields.io/github/issues/Mirasaki/dayz-leaderboard-bot?style=flat-square)](https://github.com/Mirasaki/dayz-leaderboard-bot/issues) [![GitHub forks](https://img.shields.io/github/forks/Mirasaki/dayz-leaderboard-bot?style=flat-square)](https://github.com/Mirasaki/dayz-leaderboard-bot/network) [![GitHub stars](https://img.shields.io/github/stars/Mirasaki/dayz-leaderboard-bot?style=flat-square)](https://github.com/Mirasaki/dayz-leaderboard-bot/stargazers) + # DayZ Leaderboard Bot A DayZ bot writting in Javascript to display your leaderboard using the CFTools Cloud API. - ## Demo + Come try the bot yourself in our official [support server](https://discord.gg/jKja5FBnYf)! ![Demo](https://i.imgur.com/vzoS6cq.gif) - ## Technologies Used - - [discord.js-bot-template](https://github.com/Mirasaki/discord.js-bot-template) - - [CFTools Cloud API](https://wiki.cftools.de/display/CFAPI/CFTools+Cloud+API) - +- [discord.js-bot-template](https://github.com/Mirasaki/discord.js-bot-template) +- [CFTools Cloud API](https://wiki.cftools.de/display/CFAPI/CFTools+Cloud+API) ## Prerequisites + - [Node.js](https://nodejs.org/en/download/) 1) Head over to the download page 2) Download the latest LTS available for your OS @@ -36,26 +36,28 @@ Come try the bot yourself in our official [support server](https://discord.gg/jK 6) Click "Rest Token" and copy it to your clipboard, you will need it later ## Installation + 1. Download the latest release [here](https://github.com/Mirasaki/dayz-leaderboard-bot/releases) 2. Extract/unzip the downloaded compressed file into a new folder 3. Open a command prompt in the project root folder/directory - * On Windows you can type `cmd.exe` in the File Explorer path - * Root folder structure: - * commands/ - * local_modules/ - * .env.example - * index.js - * etc... + - On Windows you can type `cmd.exe` in the File Explorer path + - Root folder structure: + - commands/ + - local_modules/ + - .env.example + - index.js + - etc... 4. Run the command `npm install` 5. Copy-paste the `.env.example` file in the same directory and re-name the created file to `.env` 6. Open the `.env` file and fill in your values - * `CLIENT_ID`: Can be grabbed by creating a new application in [your Discord Developer Portal](https://discord.com/developers/applications) - * `DISCORD_BOT_TOKEN`: After creating your bot on the link above, navigate to `Bot` in the left-side menu to reveal your bot-token - * `CFTOOLS_API_APPLICATION_ID`: Application ID from your [CFTools Developer Apps](https://developer.cftools.cloud/applications) - Authorization has to be granted by navigating to the `Grant URL` that's displayed in your app overview - * `CFTOOLS_API_SECRET`: Same as above, click `Reveal Secret` - * `CFTOOLS_SERVER_API_ID`: Click `Manage Server` in your [CF Cloud Panel](https://app.cftools.cloud/dashboard) -7. Add the bot to your server by using the following link: (Replace CLIENT-ID with your CLIENT_ID from before) https://discord.com/api/oauth2/authorize?client_id=CLIENT-ID&permissions=0&scope=bot%20applications.commands + - `CLIENT_ID`: Can be grabbed by creating a new application in [your Discord Developer Portal](https://discord.com/developers/applications) + - `DISCORD_BOT_TOKEN`: After creating your bot on the link above, navigate to `Bot` in the left-side menu to reveal your bot-token + - `CFTOOLS_API_APPLICATION_ID`: Application ID from your [CFTools Developer Apps](https://developer.cftools.cloud/applications) - Authorization has to be granted by navigating to the `Grant URL` that's displayed in your app overview + - `CFTOOLS_API_SECRET`: Same as above, click `Reveal Secret` + - `CFTOOLS_SERVER_API_ID`: Click `Manage Server` in your [CF Cloud Panel](https://app.cftools.cloud/dashboard) +7. Add the bot to your server by using the following link: (Replace CLIENT-ID with your CLIENT_ID from before) 8. Run the command `node .` in the project root folder/directory or `npm run start` if you have [PM2](https://pm2.keymetrics.io/) installed to keep the process alive. + ## FAQ #### How do I create the Discord bot account? @@ -66,8 +68,6 @@ Check out [this video](https://www.youtube.com/watch?v=ibtXXoMxaho) by [The Codi Yes. Your DayZ server has to be connected to the [CFTools Cloud API](https://wiki.cftools.de/display/CFAPI/CFTools+Cloud+API) and needs the [GameLabs integration](https://steamcommunity.com/sharedfiles/filedetails/?id=2464526692) mod. - ## License [MIT](https://choosealicense.com/licenses/mit/) - diff --git a/config/.env.example b/config/.env.example index d1d02dc..dc844d1 100644 --- a/config/.env.example +++ b/config/.env.example @@ -2,6 +2,7 @@ NODE_ENV=production DISCORD_BOT_TOKEN= CLIENT_ID= +TEST_SERVER_GUILD_ID= # CFTools Cloud API & GameLabs CFTOOLS_API_APPLICATION_ID=