Skip to content

Latest commit

 

History

History
30 lines (30 loc) · 870 Bytes

File metadata and controls

30 lines (30 loc) · 870 Bytes

Javascript DisCord bot

  1. You need to install node and npm first. If you don't know what is node or npm, watch the following documentations.
    node: https://nodejs.org/en/docs/
    npm: https://docs.npmjs.com/
    music bot ref: https://b-l-u-e-b-e-r-r-y.github.io/post/DiscordBot01/
$ sudo apt-get update
$ sudo apt-get install npm
$ curl -s https://deb.nodesource.com/setup_16.x | sudo bash
$ sudo apt install nodejs -y
  1. Install the needed node packages
$ npm init
$ npm install discord.js@12.5.3 //Recommended version
$ npm install ffmpeg-static
$ npm install @discordjs/opus
$ npm install ytdl-core
  1. Set your dc token in the token.json file (create it by yourself)
{
    "token": <your discord token>
}
  1. Start your dc bot
$ node response_bot.js // for response bot
$ node music_bot.js // for music bot