A Discord bot designed to manage custom games in Heroes Of The Storm.
It operates with a lobby voice channel. Captains can be selected automatically or manually from the lobby channel and they can pick players from the channel.
Make sure to read about the commands before using them. You can also use the /help bot command to view all available commands and learn how to use them.
click here to watch a clip of the bot being used on a twitch live (in portuguese-BR)
this project is based on a simpler bot I had created before: inhousebot
/join
-
Join and register as a player in the inhouse.
-
options:
rank:select your current skill rank. (required)primary_role- select your primary_role. (required)secondary_role- select your secondary_role. (optional)
-
/help
- Display the commands descriptions.
/config
- This command configures the bot. You need to use it only once when you invite the bot to your server.
/list
- List players in the lobby channel who are not captains or already picked.
/captains
- Choose two random captains from lobby channel.
/pick
- A captain can pick a player from the lobby channel who is not a captain or already picked.
/clear
- Clear teams and captains.
/redraft
- Clear teams but keep captains.
/win
- Select winner team.
You earn
15 MMRpoints per win.-
If the team you defeated has 20% or more MMR than you, you receive
17 MMRpoints. -
If the team you defeated has 10% to 20% more MMR than you, you receive
16 MMRpoints.The opposite occurs if you lose. -
If you have
2500 MMRpoints or more, you will receive1 MMRpoint less. -
If you have
2300 MMRpoints or more, you will receive2 MMRpoints less. -
If you have
1800 MMRpoints or less, you will receive1 MMRpoint more. -
If you have
1700 MMRpoints or less, you will receive2 MMRpoints more.
-
/leaderboard
- Shows players leaderboard based on MMR.
/myrank
- Shows your leaderboard position based on MMR.
/achievements
-
List the achievements, or shows achievements of a player.
- options:
player- select a player to show it achievements. (optional)
- options:
/roles
- Display your current roles, or allows you to update your roles by selecting new options:
- If you set only primary_role, it will update the primary_role and erase secondary_role.
- If you set both primary_role and secondary_role, it will update both.
- If you set only secondary_role it will update only secondary_role.
- If you dosnt set any, it will show your currents roles.
-
options:
rank:select your current skill rank. (required)primary_role- select your primary_role. (required)secondary_role- select your secondary_role. (optional)
/map
- Choose a random map to vote on and play!
/teams
- Show current teams.
/spec
- Set or unset yourself as a spectator. A spectator will not be listed when someone uses the /list command, cannot be selected as captain, and cannot be picked.
/swap
- A captain can swap one player for another, either from one team to another or for a player who isn't on a team.
You need to have node.js installed.
Clone the project.
Install required packages into the project:
npm installCopy the .env.example file to .env file to the project:
cp .env.example .envNow, you need to create a bot in the discord developer portal. Click on New Application and give it a cool name. On the General Information tab copy the APPLICATION ID and past on the CLIENT_ID variable on .env file, like this example:
TOKEN=
CLIENT_ID=0123456789876543210Now, on the Bot tab, click on "Reset Token" to generate a new Token.
Copy the token to the .env file:
Remember, it's crucial not to share this token with anyone else.
The .env file should be like this example:
TOKEN=EXAMPLE01234TOKEN
CLIENT_ID=0123456789876543210THIS IS A VERY IMPORTANT STEP:
On the 'OAuth2' tab, under the 'OAuth2 URL Generator' session, select bot and applications.commands. Then, in the 'BOT PERMISSIONS' section, check the Administrator checkbox. This will generate the link to add the bot to a server. Simply paste the generated link into your browser to add the bot to your server.
Now, run the command:
npm startThe bot is now up and running! Head over to your server and enjoy it!
Notice: The bot may take up to 5 minutes to register the commands.
⚠️ This bot cannot operate on multiple servers simultaneously within the same project because the database only works for one discord server. If you use the bot on more than one discord server, the data will be messed up.
Feel free to contact me if you have any questions or need assistance with the setup!