A Discord music bot fully controllable via a website. Search youtube directly and manage your playlist.
Create bot, get token and add to Discord server
Node.js 16.13.0 or newer is required.
Create .env file or set environment variables in commandline and add NODE_ENV=production to disable .env file.
TOKEN=<discord token>
OWNER=<Discord owner User Id>
URL=<url/ip of this server in format http(s)://foo.bar:port>
PORT=<port to start server on, default: 3000>
DEFAULT_VOLUME=<0-150, default: 20>
RADIO_MAX_VIDEO_LENGTH=<length in seconds, 0 for no max length, default: 600, will exclude all songs longer than the duration from the radio.>
AUTO_LEAVE_TIMEOUT=<length in seconds, -1 to disable, Default: 60, will make the bot leave after the given amount of time, if he is alone.>
RESUME_ON_BOT_JOIN=<true/false, default: false, whether the bot resumes music playback when he joins a channel.>
PAUSE_ON_USER_LEAVE<true/false, default: true, whether the bots pauses music playback when he is alone.>
RESUME_ON_USER_JOIN=<true/false, default: true, whether the bots resumes music playback when he is no longer alone.>
Build the server first then the client.
> npm install
> npm run build
client> npm install
client> npm run build:prod
> node ./bin/www
If the client was build without prod flag it will always access the server via localhost:3000 (for development).
Replit is a free and easy way to deploy the bot for yourself.
This project was not designed for replit. The provided configuration is only meant to deploy it.
With the free version you may be limited by the available resources. The client cannot be built because it will run out of ram. Due to this the client will automatically be downloaded from the releases of this git repo.
Or run with Docker:
docker run -d -p 80:80 --restart unless-stopped --name discord-bot-node -e NODE_ENV=production -e PORT=80 -e TOKEN=<discord token> -e OWNER=<discord owner id> -e URL=<url/ip e.g http(s)://foo.bar:port> alexanderwyss/discord-bot-node:latest
Slash commands are a way to interact with the bot through discord. Start typing / to see a list of available commands.
The slash commands must initially be registered with "!RegisterCommands".
The Web UI can be used by multiple users concurrently.
<ctrl> + f
Focus search<enter>
Search<ctrl> + <enter>
Play first result now<ctrl> + <shift> + <enter>
Play first result next<shift> + <enter>
Queue first resultTested with Firefox & Chrome.