How to install NBABot

Опубликовано: 16 Июнь 2026
на канале: Eliot
283
4

Have any issues or want to ask any questions?
Either use the comment section below, or DM me on Discord at chig#4519.

Links and commands in order of use:

1. Download NBABot's source code:
https://github.com/NBABot-Development-Team...

2. Install NodeJS:
nvm: https://github.com/nvm-sh/nvm
Follow the commands from the GitHub page to install nvm
Once nvm is installed, use

nvm install 16.17.0

(or whatever the current recommended NodeJS version is)

3. Install required packages:

npm install

If node-canvas does not install initially,
Install homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew...)"

(remember to use the initialisation commands)

then install packages listed at: https://github.com/Automattic/node-canvas

brew install pkg-config cairo pango libpng jpeg giflib librsvg pixman

then run again

npm install

4. Create a Discord bot:
http://discord.com/developers

5. Copy config.json.example

6. Rename the copy to config.json

7. Insert the essential details

8. Create a cache folder in the /src directory

9. Insert the today.json file into /src/cache:

wget http://data.nba.net/10s/prod/v2/today.json

Note: if wget is not installed, you can install it with:

brew install wget

10. Run the bot

node bot.js

11. Install pm2 to keep it running in the background

npm install pm2 -g

Chapters:

00:00:00 - Introduction
00:01:29 - Downloading the source code
00:02:00 - Installing NodeJS
00:04:20 - Installing required packages
00:07:20 - Creating a Discord bot
00:08:39 - Inviting your Discord bot
00:09:40 - Adding details to config.json
00:11:40 - Adding cache folder and today.json
00:12:45 - Running NBABot
00:14:40 - Installing pm2
00:16:36 - Contact