/discord-bot

Primary LanguageJavaScript

Discord-bot Link

JavaScript

Requirements

Install nodejs

      >> sudo mkdir -p /usr/local/lib/nodejs
      >> DISTRO=linux-x64
      >> VERSION=v14.13.1
      >> sudo tar -xJvf node-$VERSION-$DISTRO.tar.xz -C /usr/local/lib/nodejs
  • Add these lines in your ~/.profile
      # Nodejs
      VERSION=v14.13.1
      DISTRO=linux-x64
      export PATH=/usr/local/lib/nodejs/node-$VERSION-$DISTRO/bin:$PATH

Install ffmpeg

  >> sudo apt install ffmpeg

Create Project File

  >>  mkdir discord-greeter-bot/
  >>  cd discord-greeter-bot/
  >>  npm init -y
  >>  npm install --save discord.js dotenv ytdl yt-search
  >>  touch .env bot.js

Put your bot Token in the .env file like this

  DISCORD_TOKEN=Your_Token

After that put your code in the bot.js then:

  >> node bot.js

Python

Requirements

Install Packeges

  pip3 install -U discord.py
  pip3 install python-dotenv