Not maintained anymore. Likely to not work anymore
Rename .env.example
to .env
Insert Token and a Prefix of your choice
Change Presence to your desire. This will be the "Activity" your bot is doing
https://discord.com/oauth2/authorize?client_id=<your_client_id>&permissions=2205280320&scope=applications.commands%20bot
Replace your_client_id
with your client id from your Discord Application
Spotify Tracks and Playlists are supported
But it really just tries to find the Spotify Song on Youtube
A Track has to be in this format: https://open.spotify.com/track/<anything>
A Playlist has to be in this format: https://open.spotify.com/playlist/<anything>
TOKEN
: Discord Bot TokenPREFIX
: Bot PrefixPRESENCE
: Discord Presence/Activity TextSECRET
: Discord Client SecretWEB
: Hosting Website including Protocol
LOCALE
: Language (ISO-639-1). Available Languages arede
,en
. Defaults toen
LOG
: Log Filename. Defaults tologs.log
PERMS
: Discord Permission Integer. Defaults to2205281600
SCOPES
: Discord OAuth2 Scopes separated with a space. Defaults toidentify guilds applications.commands
CALLBACK
: Discord OAuth2 Callback URL. Defaults to/api/callback
LIVERELOAD
: Enable Livereload. Set totrue
to enable it. (needs browser extension),PRESENCETYPE
: Discord Presence/Activity Type. Can beSTREAMING, WATCHING, PLAYING, LISTENING
. Defaults to 'LISTENING'DISABLE_WEB
: Check hereDIDYOUMEAN
: Check hereGUILDPREFIX
: Check hereGUILDACTIONS
: Check hereUPDATEDIFF
: How often Data should be updated in minutes. Defaults to5
A List of all available commands is available here
Docker Images are available on the Docker Hub
When starting the container provide the Environment Variables
Setup a Docker Volume at /usr/src/app/db
Create New App with Persistent Data
Container HTTP Port: 8080
In App Configs set Environment Variables and a Persistent Directory with the Path in App being /usr/src/app/db
and the Label anything you want
Deployment: Deploy via ImageName: kaaaxcreators/discord-musicbot
App name: Any name you want
Region: Region closest to you
Config Vars: Enter your Variables
Click: Deploy app
💤24/7: Keep Heroku app awake with Kaffeine
On the Sidebar click on the Lock ("Secrets (Environment Variables)")
Enter Environment Variables
Click on "Run
Wait until "[API] Logged in as <your_bot_name>
"
💤24/7: Keep Repl awake with UptimeRobot, HetrixTools, Cronnomy or cron-job.org
Delete .env
Rename .env.example
to .env
Enter Environment Variables
💤24/7: Glitch doesn't support 24/7 in Free Plans
Install NodeJS v14.0.0 or higher
Run npm i
to install required packages
Run npm run deploy
to compile and start the Bot
You'll need 1 Core and 200MB of RAM to run this Bot on multiple servers
Connected to 2 VC playing music draws 100MB of RAM and 25% CPU (3,3 GHz) With Dashboard enabled it uses 150MB of RAM and 30% CPU (3,3 GHz)
You can add and contribute to Languages here
Example
[2021-05-28 16:05:28] info "dist\index.js:95:26" "Laden des Musikbefehls: earrape",
Meaning | Value in Example | Description |
---|---|---|
When | [2021-05-28 16:05:28] | Time in Format YYYY-MM-DD HH:MM:SS |
Type | info | Log Level / Reason |
Where | "dist\index.js:95:26" | Where the Log is comming from |
What | "Laden des Musikbefehls: earrape" | What was logged |
Disable the Express Server and with it the Dashboard
Add Environment Variable DISABLE_WEB
with content true
You still have to set all Required Environment Variables but they can be empty
See MIGRATE for more infos
responds to u if you mistype a command with the nearest possible solution.
Enable it by setting a Env Var DIDYOUMEAN
with content/value true
Uses didyoumean2
Be able to change Prefixes on per Guild basis
Enable it by setting a Env Var GUILDPREFIX
with content/value true
Allow Users to change Settings in the Dashboard (Prefix, Queue, ...)
Enable it by setting a Env Var GUILDACTIONS
with content/value true
🔒 Security Warning: This feature is not fully secure! If somebody gets demoted/removed/etc they can still use dashboard actions for up to 5 minutes
This Bot / Repo is not a fork but heavily inspired from SudhanPlayz/Discord-MusicBot. I didn't like the move to Lavalink which adds an unnecessary dependency, because you need a server which hosts Lavalink and not everyone wants to. Through my approach that the client handles all music, it sometimes hangs or lags shortly but not really noticeable
This project is licensed under the MIT License - see the LICENSE file for details.