[JS] Create Your Own Discord Bot

  • Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

V21Dangerous_

Super Member
Active Member
Console ID Poster
Sep 22, 2016
254
220
103
Los Angeles
Create Your Own Discord Bot Tutorial [JS]
In this tutorial i will be teaching you how to create your own Discord bot [JS].

Visual Studio (you can use NotePad++ if you want) and NodeJS


Alright once you got all requirements and you're now ready lets start.
Once you got in Discord Dev click on "My Apps" then "New Application".
ezgif-3-004383c351.png

Once you clicked on it now it will look like this.
ezgif-3-793be7c274.png

You can just name the bot others are optional. Now when you named the bot and clicked on "Create App" it will look like this.

ezgif-3-03b0d7e69a.png
Click on "Create a Bot User" then it will say "ADD A BOT TO THIS APP?" click on "Yes, do it!"
ezgif-3-efd4a7d54b.png

Now it's a bot you can make it public if you want to. Now make a new folder name it whatever you want. Now run CMD and type "cd (folder path).
Once you've done it type "npm install Discord.js" now it should download Discord.js and the folder "node_modules" will show up on your main folder that you've created, now you can close CMD.

Now go to Visual Studio/NotePad++ and create new file, now name it "Bot.js".
inside Bot.js file type
Code:
const Discord = require('discord.js');
const client = new Discord.Client();
Now jump 3 lines and type

Code:
client.login('');
Alright now you need to get your discord bot token (do not give it to some one) and copy and paste it inside "client.login('here');".

Now the bot is ready, you can invite him to your server. Copy bots client ID and go to google and type "**************/oauth2/authorize?client_id=YourBotIDHere&scope=bot" and click enter.

ezgif-3-6ec5a22923.png
Now this will pop out and it should have name of your bot and icon.
Now go ahead select your server and click "Authorize"

ezgif-3-b1a048702b.png
Alright now it should say "Authorized" and your bot is now in your server.
Now will have to get the bot online, type
Code:
client.on('ready', () => {
console.log('Bot is online!');

});

Now save the file and create a new file and name it "start_bot.bat".
Inside file type
Code:
node bot.js
PAUSE
Now go to your folder and double click on "start_bot.bat" wait few seconds and it should say "Bot is online!".

So go to Discord and now you can see your bot is online.
Now you can add commands to your bot in file "Bot.js" but make sure the bot is offline.

 
General chit-chat
Help Users
  • @ QM|T_JinX:
    still no online xploit and if this will release it already taking this long for a 11.00 xploit what is the latest ps4 firmware 11.50 or so
  • @ lurch6661:
    yup
  • @ QM|T_JinX:
    mayb if xploit can run dex kernal it will allow us to go online but like i said i know to little about it so i have no idea
  • @ QM|T_JinX:
    lol but even then i havent seen anything about ids on ps4 so if you get banned its pretty mutch over for that ps4
  • @ lurch6661:
    lol
  • @ lurch6661:
    the world has turned and left me here
  • @ lurch6661:
    good song
  • @ QM|T_JinX:
    xd
  • @ lurch6661:
    unlocked a trophy in battlefield
  • @ QM|T_JinX:
    nice
  • @ QM|T_JinX:
    what rank you on there
  • @ lurch6661:
    i think 9
  • @ lurch6661:
    ya no loose in poker then i play battlefield ha
  • @ QM|T_JinX:
    ok haha yea im on mw3
  • @ QM|T_JinX:
    last match 20 and this match 39 kills
  • @ lurch6661:
    dam good job
  • @ QM|T_JinX:
    now i got over 40 this was a good match for sure
  • Chat Bot:
    Laraycoot is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • @ lurch6661:
    zap
  • Chat Bot:
    Dragotx93 is our newest member. Welcome!
  • Chat Bot:
    sapphirestone78 is our newest member. Welcome!
  • Chat Bot:
    Christo has joined the room.
    Chat Bot: Christo has joined the room.