Discordjs Music Bot A simple music bot created with javascript, ffmpeg and discord.js.
npm install
you will need to do this in order to install the required packages.
Also install ffmpeg
, you will need this in order to play music. Using Heroku? Check the tab heroku below!
Don't forget to check the setup below!
Add https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git
to your heroku buildpacks.
Than restart your dyno and you should be able to run your bot.
Don't forget to check the setup below!
You will need to add a .env
file if you want to run your bot on a vps or your own pc, if you want to use heroku, I would recommend using the built-in envoirment variables system.This is located in your app settings. Don't forget to copy the exact names of the enviorment variables, if you don't dont that, you will break the system.
DISCORD_BOT_TOKEN= // your bot token here
DISCORD_DATABASE_TOKEN= // your mongodb url here
DISCORD_BOT_YOUTUBE_API_KEY= // your youtube api key here
DISCORD_BOT_PREFIX= // your prefix here -> default is =
GUILD_ID= // emoji server id here
The bot uses a few custom emojis, make sure to create an emoji server and invite your bot here, than add the following emojis to the server and copy the exact name!
This is an unmaintained project, if you encounter any issues or bugs you have to fix it yourself, I am not updating this repo anymore because its the old stereo. I am giving away this for free for people to get some custom bots to their server.
Step 1: Download or clone the repo to a folder you can find.
Step 2: Open your text editor (I recommend vscode) and make sure you can edit the bots file.
Step 3: Add a .env
file and copy the dotenv example above. Change the values of the variables (check the info after //). Make sure you remove the comments and have no spaces, otherwise your project will crash.
Step 4: Make sure you have nodejs
installed on your pc.
Step 5: Run npm install
in your terminal (open one if you don't, there is an built-in terminal in vscode)
Step 6: Double check if you did everything correct.
Step 7: Yay, you can now run your bot, start it with npm run start
.
You will need to install nodejs
to run this bot, a valid discord bot application and a host.