-
Notifications
You must be signed in to change notification settings - Fork 0
How to create your bot
Firstly you will need an discord account, then go to Discord Developer Page and in application go to new application.
In there you can change Name, Avatar, Description and Status after that you can go to bot section and create a new bot.
Here you need to reset token and copy it (Don't give this token to anyone) then scroll down to Message content intent and check it
and now that your bot is created last thing to do is to add it to your server, go to OAuth2 -> URL Generator and for scope select bot and for permissions select administrator and you will be granted a link for adding the bot to your server.
To host your bot you will need a server, i recommend using a vps because they are cheap and will do the job just fine, you should choose some vps with high internet speed i tried contabo and it didn't work so well with 200mb/s and some stutters now and then. Now i am using free orancle vps that has 1 gb/s and i will show you how to host bot on that (you can still follow if you want to do this on any other platform).
First you should sign up in Orancle cloud. After that you should be on a main page, scroll down to the section called Launch Resources and go in to *Create a VM instance
Give it a name you want and tweak the settings to your liking but the most important part is that you scroll down to Image and Shape and click edit in here i will change the image to Ubuntu 20.04 and what you need to do is change shape to Ampere select VM.Standard and select 1 OCPU and 1 GB of ram (Because server will not need more and if you want to add more first read how free instances work)
After that scroll down and download ssh public and private key for logging in your machine after that go to create and wait for it to go online.
After that copy the global ip adress and username then go to your terminal or powershell and type in this command and change following:
ssh -i 'LOCATION_OF_YOUR_PRIVATE_KET_CHANGE_ME' 'USERNAME_CHANGE_ME'@'GLOBAL_IP_CHANGE_ME'
also if you are on linux you need to change permission for private.key to 600 with following command:chmod 600 'LOCATION_OF_THE_PRIVATE_KEY_CHANGE_ME'
and with this you will gain access to your VM machine terminal.
you can also get access to the VM through orancle clound console
To setup this bot on your machine you will need to run following commands in order:
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install git curl -y && curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - && sudo apt-get install -y nodejs
git clone https://github.com/itzpere/lisamp.git
cd lisamp
npm install
sudo npm i pm2 -g
./setup.sh
in here you paste in the bot token and type NO for advanced setup (if you don't want to change default prefix, musicRole...).
and lastly
pm2 start index.js
And after all that your bot is up and running forever, if you want to update your bot to the newer version of this code type in this commands:
pm2 stop index.js
git reset --hard HEAD
git pull
npm install
pm2 start index.js
And that is it your only bot that will not lag or stutter, now if you want to configure this bot more see how this bot works and the docs