Follow these steps to get the bot up and running.
npm comes with nodejs, update with the following command:
npm i -g npm@latest
install ffmpeg and add it to the PATH environment variable[^ffmpeg]
[^ffmpeg]: required for playing unsupported audio sources
Clone this repo for the latest changes or download the latest release
Install the required npm packages
Run the following command in a terminal in the repo folder:
npm i
Rename the file .env.example
to .env
in the root directory
BOT_TOKEN="YOURTOKEN"
GOOGLE_API_KEY="YOURKEY"
SPOTIFY_CLIENT_ID="YOURCLIENTID"
SPOTIFY_CLIENT_SECRET="YOURCLIENTSECRET"
PORT=53134
Replace YOURTOKEN
with your Discord Bot Token
(optional) Replace YOURKEY
with your Google API Key for YouTube Data API v3[^googleapi]
[^googleapi]:required for playlist search; free for up to 10,000 searches per day
(optional) Replace YOURCLIENTID
and YOURCLIENTSECRET
with your Spotify API Credentials[^spotifyapi]
[^spotifyapi]:required to search for spotify content; free of charge for appropriate, rate limited use
(optional) Change the PORT
for the webserver as desired
Add the bot to your server via the OAuth2 > URL Generator. Select bot
as scope and insert the permissions integer in the GENERATED URL
Minimum permissions integer:[^permissions]
294242221120
[^permissions]: required for full bot functionality
Run the start.bat
file to start the bot in a terminal
run the following command in a terminal:
npm start
Enter your Discord client id as hostUserId
in the config.json
file.
To find your client id:
Discord Settings > Advanced > Enable Developer Mode
. Then right-click yourself and chooseCopy ID
.
Guild slash commands are only available in the guild in which they were deployed, but are available immediately.
Send the following messages in a guild text channel.
Deploy slash commands to guild:
>deploy
Delete slash commands from guild:
>clearcommands
Application slash commands are available in all guilds. It may take some time until the commands are available.
Run the following commands in a terminal to deploy or delete:
npm run deploy
npm run clear
Have a look at the Project or Milestones.
Suggestions for extensions or improvements are very welcome.
Pull requests are also welcome. For major changes, please open an issue first to discuss what you would like to change.