How to make a Discord Bot for Beginners (Discord.js v14)

Sdílet
Vložit
  • čas přidán 11. 12. 2022
  • How to make a Discord Bot for Beginners (Discord.js v14)
    🌐 Important links:
    Discord Developer Portal: / discord
    Discord.js official website: discord.js.org
    Discord Intents List: discord.com/developers/docs/t...
    Patreon: / underctrl
    Buy me a coffee (one-time donation): buymeacoffee.com/underctrl
    🎵 Music Credits:
    Track Name: "Blue Boi"
    Music By: LAKEY INSPIRED @ / lakeyinspired
    Original upload HERE - • LAKEY INSPIRED - Blue Boi
    Official "LAKEY INSPIRED" CZcams Channel HERE - / @lakeyinspired
    License for commercial use: Creative Commons Attribution 3.0 Unported "Share Alike" (CC BY-SA 3.0) License.
    Full License HERE - creativecommons.org/licenses/...
    Music promoted by NCM / @chillcopyrightfreemusic

Komentáře • 749

  • @UnderCtrl
    @UnderCtrl  Před rokem +28

    Want me to make you a custom bot? Email me at: avraj@underctrl.io or DM me on Discord: avrajs (PAID WORK)
    Source code: github.com/notunderctrl/discordjs-v14-series
    Discord server: discord.gg/T4faJeH84A

  • @MoistMosquito9000
    @MoistMosquito9000 Před 11 měsíci +54

    If anyone is having the problem of "Error: Used disallowed intents", the solution I used is to scroll down untill you see "Privileged Gateway Intents", then just select all of them.

    • @ezricez
      @ezricez Před 5 měsíci +2

      Ty

    • @flashgaming6447
      @flashgaming6447 Před 5 měsíci +2

      elaborate?

    • @bkkpro1980
      @bkkpro1980 Před 4 měsíci

      thanks

    • @DINOxANAS
      @DINOxANAS Před 2 měsíci

      tysm

    • @nathanbotes5868
      @nathanbotes5868 Před měsícem +3

      The "privileged gateway intent" boxes that you tick is on the discord website, under the bot folder, tick PRESENCE INTENT, SERVER MEMBERS INTENT, and, MESSAGE CONTENT INTENT. This took me a lot longer to figure out than I am willing to admit.

  • @anonieme_beer9200
    @anonieme_beer9200 Před rokem +34

    This playlist of video's are some of the best programming video's i've ever seen. Currently working on a discord bot, and everything you do is so clear and straight to the point, I saves so much time compared to other programming video's. Thank you so much for the effort of creating these video's!!!

    • @determineddecision5789
      @determineddecision5789 Před 6 měsíci

      bu yorumu yaptığın için teşekkürler. sadece beğene basarak üste çıkarabiliyorum :)

  • @iSpaRky_01
    @iSpaRky_01 Před rokem +101

    10/10 tutorial guys literally spent the whole afternoon checking out tutorials and this one is the only one that worked because of the V14 update. You deserve way more views 🙌

  • @Misfit5395
    @Misfit5395 Před 11 měsíci +4

    Thank you for this, I’m a complete newbie to discord bot.. and programming as a whole. I had been following guides for days with no luck.. didn’t know I was using old code. Followed this step by step and the bot was online within the hour.

  • @xcalibur3198
    @xcalibur3198 Před 6 měsíci +10

    WOW just WOW. This is unbelievable that I literally set up my first discord bot successfully like literally just following along. I cant thank you enough. The way you explained every detail in depth and in such beginner friendly way was just awesome. Thank you so much!!

  • @bladedaxe77
    @bladedaxe77 Před rokem +4

    Thank you, very straightforward compared to many other tutorials out there. Keep it up! 👍

  • @Nick12_45
    @Nick12_45 Před 3 měsíci +3

    out of all the tutorials i've watched, this one is definetely the best! Tysm!!

  • @being.saksham
    @being.saksham Před 9 měsíci +3

    The series is so awesome, everything is explained very well. Thank you for creating such videos!!
    🤩

  • @garrydawnerdot
    @garrydawnerdot Před rokem +2

    I remember spending hours and hours to debug just because of intents haha, finally someone who could relate to it! I really appreciate your effort, please keep up with the tutorials!

  • @silentM000N
    @silentM000N Před 4 měsíci

    Solid video, can't wait to follow along with the rest of the series. Apprecaite you taking the time to explain even the little things.

  • @1x1y8o
    @1x1y8o Před rokem +12

    This tutorial is *amazing!* The documentation is enough of 8 stars! Better than the entire Discord's documentation. The creator gives answers quickly and the Discord server is helpful! *10/10* overall!

    • @1x1y8o
      @1x1y8o Před rokem

      @Storm Debater Lmao

  • @RHOCHR
    @RHOCHR Před 10 měsíci +2

    This is the kind of tutorial we need! Great explanation!👍 I liked and subscribed

  • @boostedrobloxdevelopment3374

    Thank you for such amazing tutorials, they are really useful and simple to understand!

  • @min_808
    @min_808 Před 10 měsíci +1

    I love how you included the .env portion in this tutorial :)

  • @bxnny6657
    @bxnny6657 Před 11 měsíci

    Thank you so so much, ive not been making bots since discord js v12 which is 2 years ago, and now i've started again, i tried following the discord js v14 guide but theres many mistakes and non necessary type things in the guide, so following you was much better. Thank you for getting me back into this!(:

  • @Das_08
    @Das_08 Před rokem +1

    Same happened with me too I didn’t put the proper valid intents in my bot I spent a whole day debugging the code and asked many people in the discord about it but it didn’t help me lot , so started finding proper tutorial in CZcams I saw ur Video and rest is history ! Now I can continue my bot making program ( I was near to give on coding but ur video saved me THANKS A LOT)

  • @markgorbe
    @markgorbe Před rokem +3

    keep up the good work. literally the best and most understandable tutorial. thank you

  • @al-ft1ng
    @al-ft1ng Před 11 měsíci

    appreciate the tutorial man, really really useful to get the basics done.

  • @popmango
    @popmango Před 10 měsíci

    Very straight forward and simple tutorial bro. Thank you so much!

  • @enkhboldnymdorj2790
    @enkhboldnymdorj2790 Před rokem

    Your explanation goes right into my head. Nice one

  • @medul8039
    @medul8039 Před rokem

    yoo it took me forever to get anything working today and this is the only video that actually helped thx alot
    also the only video that actually helped me understand things like guilds, intents ect.

  • @gillisagorastos
    @gillisagorastos Před rokem

    Great Video! Had some problems in the start but it worked out super good! cant wait to learn more from you!

  • @avsm4832
    @avsm4832 Před rokem +1

    Epic Tutorials, just trying to explain everything, and I even understood, you just earned a subscriber

  • @user-nh7ik4zz8j
    @user-nh7ik4zz8j Před 2 měsíci

    I got stuck with other posters' videos, but thanks to your video I was able to successfully create the bot. thanks so much.
    Many of the other posters omitted the part of generating the package.json, but you explained it, which was helpful. Also, you explained the meaning of each movement. It was amazing.

  • @evanilsonp.8183
    @evanilsonp.8183 Před rokem

    Hey man. I'd like to tell you that it was nice to watch this tutorial. Good video. Keep up the good work.

  • @mkoi228
    @mkoi228 Před rokem

    10/10, First guide that explains why the other 7 guides that I've tried didn't work.

  • @V9Void
    @V9Void Před 6 měsíci

    I DID IT TYSM! I STRUGGLED SO MUCH FOR THE PAST 2 YEARS AND I *F I N A L L Y* DID IT! You got yourself a sub bro, keep up the good work!

  • @DucksAreEpic
    @DucksAreEpic Před rokem +38

    If you get an error saying "cannot be loaded because running scripts is disabled on this system." while trying to "nodemon", I found a solution for that.
    This is for windows btw.
    I searched this online, and it seems you have to allow "untrusted" scripts to run on your computer.
    To do that, you have to open PowerShell as an administrator.
    If you type in "Get-ExecutionPolicy", you probably should get "Restricted".
    We want to change that.
    So, you should type in "Set-ExecutionPolicy RemoteSigned" and then press "y".
    To confirm the change, type again "Get-ExecutionPolicy". It should say "RemoteSigned" now.
    That should solve the problem :)

    • @Not_Mood
      @Not_Mood Před rokem +2

      Not Working for me😥😥.Any suggestions please

    • @elmix5318
      @elmix5318 Před rokem +1

      Thanksss!!!!!

    • @sniper_agent4656
      @sniper_agent4656 Před rokem +1

      ohhhhhhhhhhhhhhhh! thanks

    • @jijiandme
      @jijiandme Před rokem

      @@Not_Mood try typing in "Set-ExecutionPolicy RemoteSigned -Scope CurrentUser" and then press "Y"

    • @freshdews
      @freshdews Před rokem +1

      thanks!

  • @_Jiwan_
    @_Jiwan_ Před 13 dny

    Thank you! Your tutorial is so easy to understand & follow

  • @PluTiper
    @PluTiper Před rokem

    This video was extremely helpful, thank you! 👍

  • @EsteriaASMR
    @EsteriaASMR Před rokem +11

    4:20 I put in the code but it's popping up with bash: npm: command not found. I have no idea what I'm doing wrong :/

    • @LunarMoonWasHere
      @LunarMoonWasHere Před 3 měsíci

      Same

    • @Zyex2244
      @Zyex2244 Před 3 měsíci

      Same. I think its cause we are on a different OS or something.

  • @simeonerasmus
    @simeonerasmus Před rokem +2

    Very well put tutorial. Thank you very much my man you really teached me alot today.

  • @ApAileron9
    @ApAileron9 Před 2 měsíci

    This is the best tutorial series out there. Very easy to understand and replicate. Make sure you have the syntax right in you are not experienced in JS. Would recommend writing down terminal commands. 10/10

  • @elouanm4732
    @elouanm4732 Před měsícem

    This video is so well done! Everything is explained and easy to understand. Seriously you've done a really good tutorial.

  • @DOTPIE
    @DOTPIE Před 3 měsíci

    Thanks a lot for these tutorials, they were immensely helpful. I wanted to do a simple discord bot for fun and you are super clear and to the point, while also explaining things in appropriate detail! Cheers :)

  • @MioNozomi
    @MioNozomi Před 9 měsíci

    Thank you so much! I'm using this as my first ever coding project and im so excited. Wanted to share a dumb mistake i spent way too long fixing. I'm dyslexic, and apperently i typed client twice in the first line and then nodemon wouldnt work. and it took me til just now to figure out the problem haha

  • @Tendity
    @Tendity Před 5 měsíci

    OMG I CANT THANK YOU ENOGH!
    your tutorials are the best of the best (new sub)

  • @al-mamluk
    @al-mamluk Před měsícem

    Your tutorials have been very helpful. Thank you for taking the time and effort to make these videos.

  • @isseyyy69
    @isseyyy69 Před rokem

    this is first video which helped me. thank you!

  • @m4rfs
    @m4rfs Před 8 měsíci

    I love u so much, you explain things so well! thank you for this tutorial ♥

  • @omni444
    @omni444 Před rokem

    one of the best tutorials i've watched. thank you!

  • @dalfydalfy9318
    @dalfydalfy9318 Před rokem +13

    Hey, I'm just at the 5th video but for now it's really interesting, complete and easy to understand even though I'm not english nativ ! You care to explain a lot more than other tutorials and it seems you're going through all main topics in your playlist. Rythme is nice, finding a nice, complete and up to date guide on discord bots is hard these days :D
    Thanks a lot for your work ! You'll get my thumbs up, no doubts !

    • @akshitrajputhere
      @akshitrajputhere Před rokem +1

      You speak great english

    • @RHOCHR
      @RHOCHR Před 10 měsíci

      I am also not english nativ and also find it super cool!

  • @instamac6496
    @instamac6496 Před 8 měsíci

    love this tutorial! Thank you so much

  • @anocre
    @anocre Před 9 měsíci

    Wow Awesome explanation. Subscribed you in 1st video.

  • @thebestol0ch483
    @thebestol0ch483 Před rokem

    10/10, the best guide i've ever seen!

  • @martialassault8341
    @martialassault8341 Před 2 měsíci

    Your way of teaching is wonderful! I am a Next JS dev, but very rusty at the time! I couldn't understand the "fancy words" in the documentation, but with your guidance I can progress way faster! Hopefully things haven't got depreciated since it's been a while haha. Much love ❤

  • @alex_turing
    @alex_turing Před 8 měsíci

    The best video on the topic I was able to find

  • @21jpmm
    @21jpmm Před 8 měsíci

    excellent guide, good way to explain the basics

  • @ausiman
    @ausiman Před 6 měsíci +7

    Great tutorial! For those of you that received a MODULE_NOT_FOUND error after doing *"npm install dotenv"*, do the *"npm install discord.js"* command again and it should work. If this doesn't work, read through the error that you are getting and look for the module that it can't find. For example, my error was:
    [nodemon] starting `node src/index.js`
    node:internal/modules/cjs/loader:1051
    throw err;
    Error: Cannot find module 'discord.js'
    Require stack:
    That's why you would have to do the *"npm install discord.js"* command because for some reason it got removed when I did the *"npm install dotenv"* command.

    • @UnderCtrl
      @UnderCtrl  Před 6 měsíci +1

      Reason for this in most cases, is people usually edit their package.json while installing packages. This tends to lead to an outdated package.json. The fix you mentioned is correct. Just reinstalling should fix it!

    • @mr0mooz368
      @mr0mooz368 Před 6 měsíci

      Man i've been looking for a way to solve it for hours. God bless you

    • @mr0mooz368
      @mr0mooz368 Před 6 měsíci

      ❤❤❤

    • @ausiman
      @ausiman Před 6 měsíci

      @mr0mooz368 Glad to hear this worked for you and good luck in your learning!

    • @haggarduser
      @haggarduser Před 5 měsíci

      Thanks so much for this!

  • @linh8708
    @linh8708 Před měsícem

    thank you! this is so useful and clear!

  • @realnarwhal
    @realnarwhal Před 10 měsíci

    I'm planning on making a bot for the friend that can notify discord members when he uploads, hopefully I'm starting at the right place to do it, thanks for the tutorial!

  • @bettercallguts
    @bettercallguts Před rokem

    thanks bro, very helpful!

  • @bushibushirino6566
    @bushibushirino6566 Před rokem

    Thank you very much, i have been trying since 3 years, you did the proper and best tutorial!

  • @regis5507
    @regis5507 Před 3 měsíci

    thank you for the video, amazing way to teach :)

  • @youngun550
    @youngun550 Před 5 měsíci

    Great video. Thank you!

  • @KarolinaRGameDesign
    @KarolinaRGameDesign Před 3 měsíci

    100/10 Ive watched other tutorials and couldnt figure it out how to set it up properly, Im new to coding but your video is so easy to understand that I managed to do it :D woohoo

  • @Janelle-zs9jh
    @Janelle-zs9jh Před 19 dny

    Thanks! Super helpful

  • @MRHD-so5es
    @MRHD-so5es Před rokem

    your video is very useful i hope to complete the course and don't stop uploading videos
    thx for help

  • @WildBearHW
    @WildBearHW Před 11 měsíci +6

    I restarted the process 3 times and followed along side you in x0.75 speed. I keep getting this when i use command nodemon in the terminal
    nodemon : The term 'nodemon' is not recognized as the name of a cmdlet, function, script file, or
    operable program. Check the spelling of the name, or if a path was included, verify that the path is
    correct and try again.
    At line:1 char:1
    + nodemon
    + ~~~~~~~
    + CategoryInfo : ObjectNotFound: (nodemon:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

  • @user-jw7jw6iu8v
    @user-jw7jw6iu8v Před 4 měsíci

    Wow! Your content is amazing! You have some proper teaching skills! You are the 🐐my friend! Respect!

  • @sean_fisher
    @sean_fisher Před rokem

    excellent video. very detailed. coupled with chatGPT I was able to get it right and I have my own discord bot. will be watching much more subbed and notified : )

  • @sheeshou4460
    @sheeshou4460 Před 8 měsíci

    Thank youuu!! This works!

  • @artoriapd
    @artoriapd Před 11 měsíci

    This is so cool!

  • @hazazi3177
    @hazazi3177 Před 7 měsíci

    your'e so amazing person brother thanks for your tutorial I've subscribed and will follow hope you will upload more content like this tutorial I wants to learn and you explain every detail as I expect. thanks.

  • @enzima
    @enzima Před 10 měsíci

    Great tutorial!

  • @drakongames5417
    @drakongames5417 Před rokem

    nice channel name. sounds cool and intuitive

  • @paintendo1251
    @paintendo1251 Před 6 měsíci

    nice tutorial, thank you so much

  • @TheWildcat_YT
    @TheWildcat_YT Před rokem

    Thanks very useful.

  • @kajtus74
    @kajtus74 Před 10 měsíci

    best tutorials on youtube fr

  • @ardeleanu7902
    @ardeleanu7902 Před rokem

    Thanks for the tutorial love it!!!!!!
    For a kid who wants to start coding it s just amazing thanks

  • @mats33667
    @mats33667 Před 7 měsíci +1

    How do I make it so it checks for user cooldown like if someone gets a promotion (roblox) it says that “Cool-down ends on the (DATE) using the / command

  • @kleb3101
    @kleb3101 Před 5 měsíci

    Thank you so much!

  • @icecubesaad8732
    @icecubesaad8732 Před rokem

    Nah your explanation is fireeeeee 🔥🔥🔥

  • @Funkiverse
    @Funkiverse Před rokem

    Thank you so very much !

  • @CyberNetAgency
    @CyberNetAgency Před 10 měsíci

    The best tutorial so far 🥰🥰🥰

  • @midnightdemise1795
    @midnightdemise1795 Před 9 měsíci

    best amazing tutorial ever.

  • @krispyangels
    @krispyangels Před měsícem +2

    It always gives me an error that the term 'npm' is not recognized as the name of a
    cmdlet, function, script file, or operable program. Check
    the spelling of the name, or if a path was included, verify
    that the path is correct and try again.
    I tried checking as I can but I'm still too new to this stuff.

  • @arasbuilds611
    @arasbuilds611 Před rokem

    thanks for the amazing tutorial \^o^/

  • @hazush_
    @hazush_ Před 10 měsíci

    I LOVE YOU, BRO YOU HELPED ME SO MUCH BRO I REALLY DON'T KNOW WHAT TO SAY BRO

  • @larkb4944
    @larkb4944 Před rokem

    You’re so Calm

  • @XXX10Tacles
    @XXX10Tacles Před rokem

    I cant invite my bot when i go there its telling me "Please enter a redirect uri" when i manually enter that in "OAuth2" and try to invite then it's telling me "{"client_id": ["This field is required"]}".

  • @Bert._
    @Bert._ Před rokem +1

    13:14
    do I need nodemon or can I install node fetch suggested by someone?

  • @gtryermisin
    @gtryermisin Před rokem

    thanks a lot man! finally ı found my problem

  • @5bigblackmen
    @5bigblackmen Před měsícem +2

    at 13.46 when i run the command the terminal says [nodemon] app crashed - waiting for file changes before starting...

  • @bushibushirino6566
    @bushibushirino6566 Před rokem

    You deserve a award

  • @wooshy1x
    @wooshy1x Před rokem +1

    hi! its saying
    TypeError: Cannot read properties of undefined (reading 'GUILD_MESSAGES')
    at Object.
    for some reason, can anyone help?

  • @twig6051
    @twig6051 Před 11 měsíci

    whenever i use "nodemon an error says something like "AppData\Roaming
    pm
    odemon.ps1 cannot be loaded because
    running scripts is disabled on this system." how can i fix this?

  • @Powlay2020
    @Powlay2020 Před rokem +1

    idk what to do i keep getting this error [nodemon] app crashed - waiting for file changes before starting...

  • @kontorudaisuki6938
    @kontorudaisuki6938 Před 2 měsíci +1

    It said
    Node.js v18.14.2
    [nodemon] app crashed - waiting for file changes before starting...
    Ive already tried to kill all nodes but it still doesn't change the error. How do I fix this?

  • @muriilouwu
    @muriilouwu Před rokem

    awesome video ! a question, what did u make to show that ure using vs code in the discord

    • @UnderCtrl
      @UnderCtrl  Před rokem +1

      Discord Presence extension in VS Code

  • @antman99781
    @antman99781 Před rokem

    Great tutorial

  • @Sunn204
    @Sunn204 Před 10 měsíci

    for me, when i was writing the "sudo install -g nodemon", there was red writing saying that i couldnt do this script. I dont realy knew what to do can someone help me out?

  • @vrvaze
    @vrvaze Před rokem +1

    when i type "hello" in discord, it says "[nodemon] app crashed - waiting for file changes before starting..." can someone help?

  • @shinthantkaung
    @shinthantkaung Před 2 měsíci

    Thank you!

  • @kageuchi
    @kageuchi Před rokem

    Is it okay if I'm not naming the environment '.env'? Cause in replit you can't named it like that

  • @scypus8691
    @scypus8691 Před 4 měsíci +3

    If you get the error "[nodemon] app crashed - waiting for file changes before starting..." around 13:30 you may have to set the file path manually with the command since it sometimes does not account for the src folder. For example, I ran "nodemon C:\discord-bot\src\index.js" and it worked.

    • @sdewwu
      @sdewwu Před 4 měsíci

      i had the same problem, but thats because i had only been saving the index.js folder and not the package folder. double check that main is src/index.js not just index.js

    • @mikerotchburns4307
      @mikerotchburns4307 Před 4 měsíci

      @@sdewwuhow do I do that

    • @Bloqqy88
      @Bloqqy88 Před 3 měsíci

      it still does not work for me

    • @kapimo
      @kapimo Před 3 měsíci

      nodemon C:\discord-bot\src\index.js this will work

  • @joshuaorthodox
    @joshuaorthodox Před rokem

    Thank you so much

  • @GCmoose
    @GCmoose Před rokem +1

    Hey, I searched through the other comments and dont see an answer to this - any idea? Im getting this error aroudn the 13:40 mark "[nodemon] app crashed - waiting for file changes before starting..."
    I just posted in the discord so hopefully you or someone there can help

  • @user-ri7rf7qp9j
    @user-ri7rf7qp9j Před rokem

    when i run the nodemon it says clean exit - waiting for changes before restart what do i do