This project creates a Discord bot which interacts with PoE Ladder's bot api.
| Command | Description |
|---|---|
| /about | Learn how to contribute to the PoE Ladder bot |
| /help | Get help with using the PoE Ladder bot |
| /ladders | List the monitored PoE Ladder leagues |
| /whois [DiscordHandle] | Lookup a Discord user's PoE Ladder Profile |
The bot runs in
This guide uses Visual Studio Code but there are many alternatives. Install these pre-requisites before you begin:
-
Download & Install Node - This includes npm (node package manager) which is used in the subsequent steps below
-
Open Visual Studio Code
-
Clone this Repository:
- The Welcome screen should include an option to Clone Git Repository.... Click this option
- Paste in this link then hit the Enter key: https://github.com/halfacandan/PoELadderBot.git
-
Open a terminal session in Visual Studio Code by opening the Terminal menu and selecting the New Terminal option
-
Install all required packages by running the following command in the terminal (it may take some time to download them all):
npm install
Follow the steps outlined in this Discord Bot Tutorial: Get your bot up and running in under 5 minutes.
-
Go to the Discord Developer Portal
-
Click the New Application button in the top-right corner of the screen
-
Give your bot a name, accept the T&Cs then click the Create button (as shown below)
-
Add a logo and a description for the application
-
Click the Save Changes button
-
Open the OAuth2 menu
-
Copy the Client ID value and paste it into the CLIENT_ID value in the
.env.localfile in this repository -
Click the Reset Secret button beneath the Client Secret heading to display a secret value
-
Copy the Client Secret value and paste it into the PRIV_KEY value in the
.env.localfile in this repository -
Open the Bot menu
-
Click the Reset Token button
-
Copy the token value and paste it into the BOT_TOKEN value in the
.env.localfile in this repository -
Scroll down the Bot page to the Privileged Gateway Intents section and enable the following options:
- Message Content Intent
- Server Members Intent
-
Click the Save Changes button
-
Open the Installation menu
-
Uncheck the User Install option under the Installation Contexts menu (leave Guild Install checked)
-
Scroll down to the Install Link and copy it.
-
Add "&permissions=2147593280&scope=bot%20applications.commands" to the end of the url e.g.
https://discord.com/oauth2/authorize?client_id=123455667890&permissions=2147593280&scope=bot%20applications.commands -
Open the revised url in a browser
-
Select the Add to Server option
-
Pick which server you'd like to add the bot to then click the Authorize button (as shown below):
NOTE: If you wish to replicate the permissions, you can use the Bot Permissions section on the Bot page and use the following:
- General Permissions:
- View Channels
- Text Permissions:
- Send Messages
- Manage Messages
- Attach Files
- Read Message History
- Add reactions
- Use Slash Commands
We need one last piece of configuration set up before we can run the bot:
-
Open the Discord desktop client
-
Click the cog icon next to your profile (in the bottom-left corner of the screen)
-
Scroll down the left-hand menu and select Advanced (as shown below)
-
Enable Developer Mode
-
You can now right-click on any of the servers which you have joined and use the Copy Server ID option
-
Copy the server id value and paste it into the SERVER_ID value in the
.env.localfile in this repository
Once you have set up an application in Discord, you can host the bot on your computer by doing the following:
-
Open the Discord desktop client
-
Open the server which you have installed the bot on
-
Open Visual Studio Code
-
Open a terminal session in Visual Studio Code by opening the Terminal menu and selecting the New Terminal option
-
Run this command:
npm run dev
-
You should see the message PoE Ladder Bot is online in the terminal
-
The bot will now show as online in your Discord Server
-
Test it with the slash command /about










