Skip to content
This repository has been archived by the owner on Jun 3, 2023. It is now read-only.

include TEST_SERVER_GUILD_ID in .env.example #18

Merged
merged 1 commit into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

</div>


## 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
Expand All @@ -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) <https://discord.com/api/oauth2/authorize?client_id=CLIENT-ID&permissions=0&scope=bot%20applications.commands>
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?
Expand All @@ -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/)

1 change: 1 addition & 0 deletions config/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
NODE_ENV=production
DISCORD_BOT_TOKEN=
CLIENT_ID=
TEST_SERVER_GUILD_ID=

# CFTools Cloud API & GameLabs
CFTOOLS_API_APPLICATION_ID=
Expand Down