• Tuesday , 25 February 2020

How to Build a Discord Bot – Full JavaScript Chatbot Tutorial

Code Canyon



Learn to code a Discord bot with JavaScript using Node.js.

🔗 Written Tutorial – https://www.devdungeon.com/content/javascript-discord-bot-tutorial
🔗 Unicode Emojis – https://unicode.org/emoji/charts/full-emoji-list.html
🔗 Official Documentation – https://discord.js.org

Tutorial by Dev Dungeon. Check out their YouTube channel: https://www.youtube.com/channel/UCgkG68BiCngkoV7I2BLtAVg

Learn to code for free and get a developer job: https://www.freecodecamp.org

Read hundreds of articles on programming: https://medium.freecodecamp.org

And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp

Original source

3d Ocean

Related Posts

47 Comments

  1. DevDungeon
    December 4, 2019 at 07:27

    Thanks, freeCodeCamp.org, for sharing this with your audience! I hope it is fun and interesting for everyone. Check out https://www.devdungeon.com for more tutorials.

  2. Regeneration
    December 4, 2019 at 07:27

    And how do i turn that god damned thing off?

  3. LucasPro 2534
    December 4, 2019 at 07:27

    I can't see 1:cmd in the Terminal, I see only 1: powershell it is problem?

  4. davianlols6
    December 4, 2019 at 07:27

    Those who did the "npm install discord.js" command and encountered an error, try opening cmd and type in "npm init -y" and then restart visual studio code and "npm install discord.js" should work

  5. Soul Flight
    December 4, 2019 at 07:27

    When I did, "npm install discord.js" is came back with
    "Invalid version: "npm install discord.js"

  6. Ob1cloney1234
    December 4, 2019 at 07:27

    NO WAYS IT ACTUALLY WORKED

  7. Pug
    December 4, 2019 at 07:27

    Can someone tell me what the best programming language is for making discord bots? I cant find any info on it :/

  8. TFC- FOXY
    December 4, 2019 at 07:27

    how to get a devloper code

  9. ThePieMan0817 Playz
    December 4, 2019 at 07:27

    I entered "node my_bot.js" it replied "node is not recognized as an interval or external command, operable program or batch file." How do I fix this issue?

  10. Landon Bishop
    December 4, 2019 at 07:27

    love it it works!

  11. The LoneWanderer
    December 4, 2019 at 07:27

    When ever I try to add the bot to my server it just says "Bot requires code Grant" And I don't understand what it means.

  12. Magma Creeper
    December 4, 2019 at 07:27

    " 'npm' is not recognized as an internal or external command,
    operable program or batch file."

  13. Team Aiden
    December 4, 2019 at 07:27

    When u run node my_bot.js and doesnt work, save the file. I think some people have autosave on

  14. iseeflowers
    December 4, 2019 at 07:27

    What is a discord bot?

  15. Braiden G.
    December 4, 2019 at 07:27

    When I do node my_bot.js my nose is yellow

  16. Braiden G.
    December 4, 2019 at 07:27

    word for word i have and dont work

  17. Hirsuitteam
    December 4, 2019 at 07:27

    node my_bot.js not working, my bot in not going online.

  18. Ekozaak
    December 4, 2019 at 07:27

    Thank's, very useful tutorial 🙂

  19. GenericList Okay
    December 4, 2019 at 07:27

    Hi, after i attempt to connect to the bot nothing happens. I don't get any errors, it just doesn't print anything, and the bot is still offline. I've made sure i've copied your code exactly.

  20. T-Posing Kermit
    December 4, 2019 at 07:27

    'npm' is not recognized as an internal or external command,

    operable program or batch file.

  21. flosset
    December 4, 2019 at 07:27

    its telling me split isnt a command here is my code: let commandSplit = fullCommand.split("")

  22. RealSn9ke
    December 4, 2019 at 07:27

    Well when I used node (my bot) it didnt mention that it connected nor went online in my server

  23. Paul Taylor
    December 4, 2019 at 07:27

    Finally it's explained how to make a discord bot. Thank you

  24. Point
    December 4, 2019 at 07:27

    The screen cannot be set to the number of lines and columns specified.

    after type npm install discord.js

  25. Nur mu
    December 4, 2019 at 07:27

    can somebody help me pls?
    (function (exports, require, module, __filename, __dirname) { const Discord = require(discord.js)
    ^

    ReferenceError: discord is not defined
    at Object.<anonymous> (/home/cedrichoelper/Schreibtisch/Chatbot/chat.js:1:87)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3

  26. Unicornboy776
    December 4, 2019 at 07:27

    so easy with 2 monitors watching the video on one and code on the other

  27. Orang3 Ju1c3
    December 4, 2019 at 07:27

    I DONT UNDERSTAND ANYTHING
    4:10 WHAT DO YOU MEAN? D;

  28. Stalros The Green Mage
    December 4, 2019 at 07:27

    I don't quite understand making commands. I'm trying to make an "!add" command, using nearly the exact same coding as the multiply command, but it keeps telling me addCommand is not defined

  29. Levitational
    December 4, 2019 at 07:27

    When I try to do npm install discord.js. It won't let me.

  30. ZealousAmbition
    December 4, 2019 at 07:27

    I did everything right but node my_bot.js is not working for me. I even tried making sure to capitalize it (my file is capitalized). Can you help me?

  31. De_Struction
    December 4, 2019 at 07:27

    '"node"' is not recognized as an internal or external command,

    operable program or batch file.

    '"node"' is not recognized as an internal or external command,

    operable program or batch file.

  32. Xenima D
    December 4, 2019 at 07:27

    when i type:
    node xxxx.js
    to the terminal it says:
    Error: cannot find model user/xxx/(the place that i placed the archive)

    What happened? it worked out before but not now, i throught it was npm reader problem so i reinstalled discord.js
    Didn't work so i reinstalled node , but also didn't work i installed
    npm @types/node but also didn't work i am totally loose now

  33. YEET_fumio
    December 4, 2019 at 07:27

    I want to create a discord bot that sends people alts. So you do !alt and get an alt. Can you possibly help me? My Discord name is Wulfix # 6381

  34. Michael McDaniel
    December 4, 2019 at 07:27

    the "npm install discord.js" commands judt comes up with a bunch of errors

  35. AngelCnderDreamer
    December 4, 2019 at 07:27

    Finally someone made this! Discord's tutorial they had on their site, was confusing!

  36. Yosharu
    December 4, 2019 at 07:27

    Neato burrito

  37. GodlyBuTcheR
    December 4, 2019 at 07:27

    I wrote a bot in python and it has some functinos. But now I wonder how I can run a loop that checks every 10 seconds for smt, while keeping all the other features available.

  38. Mörtl se Törtl
    December 4, 2019 at 07:27

    Did anyone figure out how to display the current Bitcoin Chart?

  39. 9 Year Old Soldier
    December 4, 2019 at 07:27

    Welp, after following your intructions to a tee, I am unable to get the bot online and get the message at 7:58

  40. GDogGaming
    December 4, 2019 at 07:27

    Could I make a actual chatbot… where you talk to it.. & it says things back? I have the code that I want to use… but I am wondering if it will work or not. & I need help making it happen. It deals with import js, import js field, & ect… I like the code. I just wish if it will work on discord

  41. Divit Kumar
    December 4, 2019 at 07:27

    Hey can anyone help me please.
    I want to become a web developer. There are a lot a resources and tutorials to learn the stuff but I don't know where to start. Can you please tell me what path should I follow as in what all should I learn to become a web developer? Like I know we have to learn Html, CSS and Javascript. After that what all must be learnt?

  42. Spiritual Awakening
    December 4, 2019 at 07:27

    Your channel is fucking amazing!

  43. jimkats1
    December 4, 2019 at 07:27

    Nice tutorial, good job.
    I already started making a Discord bot with Python, but from I see and from I hear from others, the NodeJS version is easier for the development.
    But I don't know which of the two is more efficient in terms of latency and resources consumption.

  44. Юрий Лаврухин
    December 4, 2019 at 07:27

    Amazing.

  45. Because It's Philip
    December 4, 2019 at 07:27

    Discord a great platform for any gamer!

  46. Muhammad Quanit
    December 4, 2019 at 07:27

    This channel is blessing for js devs.

  47. Muhammad Tahir Khan
    December 4, 2019 at 07:27

    That was awesome. Loved it. I had my very first bot ready. Playing with documentation now for further customization.

Leave A Comment

You must be logged in to post a comment.