-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Installation on a Linux server
Darren edited this page Sep 26, 2021
·
9 revisions
- go to the Discord Developer portal
- create a new application + bot
- create a bot invitelink using it's client id here
- save the bot token for later
- login here and create an application
follow those instructions
- run
git clone https://github.com/SudhanPlayz/Discord-MusicBot.git
- go into the folder with
cd Discord-MusicBot
- edit the botconfig.js with the tokens from earlier
use
host: "lava.link",
port: 80,
pass: "youshallnotpass"
- run
npm install
- start the bot with
node index.js
You can do this in 2 ways, with a custom domain or with your vps/server ip.
Create a new file in /etc/nginx/sites-available
you can use whatever your favorite text editor, but I'll be using vim cause I'm used to it
Do vi /etc/nginx/sites-available/musicbot.conf
Then enter this example config
server
{
listen 80;
listen [::]:80;
server_name yourdomain.cynathans.com;
location / {
proxy_pass http://127.0.0.1:3000;
}
access_log /var/log/nginx/reverse-access.log;
error_log /var/log/nginx/reverse-error.log;
}
Replace
yourdomain.cynathans.com
with your domain
- open port 80, Then edit the
botconfig.js
and change thePort
on line5
, change it to 80,Website
line18
tohttp://yourip.yes.number.only
- Go to the Discord Developer Portal under the OAuth2 tab. Then put your server ip in this format
http://yourip.yes.number.only/api/callback