How to Build a Discord Bot – Full JavaScript Chatbot Tutorial




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


47 responses to “How to Build a Discord Bot – Full JavaScript Chatbot Tutorial”

  1. 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

  2. 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

  3. 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

  4. 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

  5. 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?

  6. 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.

Leave a Reply