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

Поділитися
Вставка
  • Опубліковано 14 жов 2024
  • 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/de...
    Patreon: / underctrl
    Buy me a coffee (one-time donation): buymeacoffee.c...
    🎵 Music Credits:
    Track Name: "Blue Boi"
    Music By: LAKEY INSPIRED @ / lakeyinspired
    Original upload HERE - • LAKEY INSPIRED - Blue Boi
    Official "LAKEY INSPIRED" UA-cam Channel HERE - / @lakeyinspired
    License for commercial use: Creative Commons Attribution 3.0 Unported "Share Alike" (CC BY-SA 3.0) License.
    Full License HERE - creativecommon...
    Music promoted by NCM / @chillcopyrightfreemusic

КОМЕНТАРІ • 825

  • @UnderCtrl
    @UnderCtrl  Рік тому +39

    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

    • @Cyoclonic
      @Cyoclonic 3 місяці тому

      the insane amount of times i have hear scammers say that and in reality they nuke your server

    • @UnderCtrl
      @UnderCtrl  3 місяці тому

      @@Cyoclonic Thanks for bringing up this concern - I'll help clear it up.
      My reputation matters to me. I've been working with clients for web development for over a year at this point.
      To make things clear:
      1. My clients are paying for the code I write. They own it at the end of the day and have full authority to check and see what's going on with the code.
      2. If I'm doing bot development, I do the bot development in a separate guild so as to not disturb the flow of my client's community.
      3. In most situations (considering the project scale), we work with a legal contract to protect the interest of both parties.

    • @Cyoclonic
      @Cyoclonic 3 місяці тому

      ​@@UnderCtrl Jesus Christ I didn't expect an entire essay dude I was just joking 😭 but can you make a vid on how to fix nodeom thingy it keeps saying that security is not letting me.do it

    • @UnderCtrl
      @UnderCtrl  3 місяці тому

      @@Cyoclonic got an faq in our Discord about the powershell security policy: underctrl.io/discord

    • @RockTheSlayer
      @RockTheSlayer 2 місяці тому

      I did the tutorial and my bot isnt turnin on

  • @iSpaRky_01
    @iSpaRky_01 Рік тому +127

    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 🙌

  • @xcalibur3198
    @xcalibur3198 10 місяців тому +14

    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!!

  • @Misfit5395
    @Misfit5395 Рік тому +10

    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.

  • @MoistMosquito9000
    @MoistMosquito9000 Рік тому +77

    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.

    • @defnotpetchz
      @defnotpetchz 9 місяців тому +2

      Ty

    • @flashgaming6447
      @flashgaming6447 9 місяців тому +2

      elaborate?

    • @bkkpro1980
      @bkkpro1980 8 місяців тому

      thanks

    • @DINOxANAS
      @DINOxANAS 7 місяців тому

      tysm

    • @nathanbotes5868
      @nathanbotes5868 5 місяців тому +5

      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 Рік тому +38

    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 10 місяців тому

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

  • @ausiman
    @ausiman 11 місяців тому +10

    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  11 місяців тому +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 11 місяців тому

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

    • @mr0mooz368
      @mr0mooz368 11 місяців тому

      ❤❤❤

    • @ausiman
      @ausiman 11 місяців тому

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

    • @haggarduser
      @haggarduser 9 місяців тому

      Thanks so much for this!

  • @1x1y8o
    @1x1y8o Рік тому +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 Рік тому

      @Storm Debater Lmao

  • @Nick12_45
    @Nick12_45 8 місяців тому +3

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

  • @hyiping5926
    @hyiping5926 Місяць тому +6

    Hmm when i generate the Discord invite link, i just get an error no matter if i choose user or guild "Installation type not supposed by this application"

  • @DucksAreEpic
    @DucksAreEpic Рік тому +44

    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 Рік тому +3

      Not Working for me😥😥.Any suggestions please

    • @elmix5318
      @elmix5318 Рік тому +1

      Thanksss!!!!!

    • @sniper_agent4656
      @sniper_agent4656 Рік тому +1

      ohhhhhhhhhhhhhhhh! thanks

    • @jijiandme
      @jijiandme Рік тому

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

    • @freshdews
      @freshdews Рік тому +1

      thanks!

  • @V9Void
    @V9Void 10 місяців тому +1

    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!

  • @scypus8691
    @scypus8691 8 місяців тому +4

    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 8 місяців тому

      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 8 місяців тому

      @@sdewwuhow do I do that

    • @Bloqqy88
      @Bloqqy88 7 місяців тому +1

      it still does not work for me

    • @kapimo
      @kapimo 7 місяців тому

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

    • @alxx_3dxtz
      @alxx_3dxtz День тому

      still did not work

  • @garrydawnerdot
    @garrydawnerdot Рік тому +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!

  • @Das_08
    @Das_08 Рік тому +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 UA-cam 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)

  • @being.saksham
    @being.saksham Рік тому +3

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

  • @うほうほ-f3l
    @うほうほ-f3l 6 місяців тому

    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.

  • @pzcax
    @pzcax 6 місяців тому

    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

  • @OptionsEmporium-z8v
    @OptionsEmporium-z8v Місяць тому

    I wanted to implement a bot for something fairly niche. I have no prior programming experience, and this was incredibly useful. Thanks!

  • @krispyangels
    @krispyangels 5 місяців тому +4

    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.

  • @GhostIrene
    @GhostIrene Рік тому +13

    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 7 місяців тому

      Same

    • @ZyexYT
      @ZyexYT 7 місяців тому

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

    • @deleted1803
      @deleted1803 4 місяці тому +1

      might have to change the name of the folder

    • @echomouser
      @echomouser 3 місяці тому +1

      Did you install node.js?

  • @IoniB
    @IoniB Місяць тому

    Amazing tutorial, just the right speed and knowledge expectation + you show docs and talk us through so nicely, honeslty u r doing amazing work!!!

  • @WildBearHW
    @WildBearHW Рік тому +7

    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

    • @clarks-short-channel
      @clarks-short-channel 12 днів тому

      did you run "npm install -g nodemon"
      if ur on mac or linux you need to add sudo before it btw

  • @RHOCHR
    @RHOCHR Рік тому +2

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

  • @riwayateishq
    @riwayateishq 6 місяців тому

    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 ❤

  • @itskn_k
    @itskn_k 2 місяці тому

    you are the BEST i have been looking for forever to make a discord bot with permissions and this is the first and best one that worked. thank you you are a LIFESAVER

  • @bladedaxe77
    @bladedaxe77 Рік тому +4

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

  • @elouanm4732
    @elouanm4732 5 місяців тому

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

  • @bxnny6657
    @bxnny6657 Рік тому

    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!(:

  • @MioNozomi
    @MioNozomi Рік тому

    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

  • @silentM000N
    @silentM000N 9 місяців тому

    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.

  • @stevenelsoncpp
    @stevenelsoncpp 8 місяців тому +1

    Great tutorial man! Very obviously aimed at coders but you do a great job at explaining concepts that may be unfamiliar.
    Just wanted to add one note, for those that may have an issue with the 'nodemon' command, I had to login to CMD as admin and type "PowerShell Set-ExecutionPolicy -Unrestricted" for the command to work due to security settings.

    • @delmix-65
      @delmix-65 7 місяців тому

      what do you mean ? I have the same error but i don't understand why i have this error

    • @YTNUKEALL
      @YTNUKEALL 7 місяців тому

      I need help

    • @YTNUKEALL
      @YTNUKEALL 7 місяців тому

      how do I login to cmd as admin
      I might just be dumb

    • @YTNUKEALL
      @YTNUKEALL 7 місяців тому

      so this to open the cmd as admin
      Press the Windows Start button at the bottom left.
      Type in "Command Prompt".
      Right click on Command Prompt and click "Run as administrator".
      Click Yes if the Windows 10 User Account Control prompt is displayed.
      The Command Prompt should appear.
      then you type the cmd (PowerShell Set-ExecutionPolicy -Unrestricted)
      I hope this help

    • @YTNUKEALL
      @YTNUKEALL 7 місяців тому

      maybe not idk man

  • @avsm4832
    @avsm4832 Рік тому +1

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

  • @mkoi228
    @mkoi228 Рік тому

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

  • @dalfydalfy9318
    @dalfydalfy9318 Рік тому +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 Рік тому +1

      You speak great english

    • @RHOCHR
      @RHOCHR Рік тому

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

  • @markgorbe
    @markgorbe Рік тому +3

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

  • @min_808
    @min_808 Рік тому +1

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

  • @DOTPIE
    @DOTPIE 7 місяців тому

    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 :)

  • @HuebertEllowit-LOL
    @HuebertEllowit-LOL 9 місяців тому +4

    Whenever I try to run nodemon, i get a syntax error: undexpected token . problem, and nodemon app crashed - waiting for file changes before starting. I have done the tutorial up to 13:45 4 times now, and I am basically positive my files are identical to his. Are there some sort of dependencies he has installed that most people have installed that I dont?

    • @nebulous5622
      @nebulous5622 7 місяців тому

      having this same issue rn

    • @ZyexYT
      @ZyexYT 7 місяців тому

      same

  • @medul8039
    @medul8039 Рік тому

    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.

  • @NancyL-b9k
    @NancyL-b9k Рік тому +6

    Struggling, it says [nodemon] app crashed - waiting for file changes before starting...what to do?

    • @playerx38
      @playerx38 7 місяців тому +1

      i got the same problem it seems it takes the token as wrong

    • @k4kadu
      @k4kadu 7 місяців тому

      this shows up for pretty much any issue with the code that keeps the bot from running and when you read the full log it tells you the specific problem a bit earlier.
      for example I got that message and read through the log to find:
      error: new Error("Used disallowed intents")
      so I looked through my intents list and found out that one of those lines contradicted with my bot settings.
      hope this helps

    • @clarks-short-channel
      @clarks-short-channel 12 днів тому

      you have to press ctrl S to save it

  • @boostedrobloxdevelopment3374
    @boostedrobloxdevelopment3374 Рік тому +4

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

  • @evanilsonp.8183
    @evanilsonp.8183 Рік тому

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

  • @al-mamluk
    @al-mamluk 5 місяців тому

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

  • @tonyanimations5377
    @tonyanimations5377 Рік тому +1

    Hey really good tutorial ! Thanks a lot ! I have a question, how many disk space does the packages take ? I already have VisualStudio but i want to know the amount of disk space the packages takes. Can you please tell me ?

    • @UnderCtrl
      @UnderCtrl  Рік тому

      I believe it can take anywhere between 20-100mb of storage per project.

  • @CodewithGunnar
    @CodewithGunnar 2 місяці тому

    Brilliant tutorial - thank you very much :) Got my first bot up and running!

  • @muriilouwu
    @muriilouwu Рік тому

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

    • @UnderCtrl
      @UnderCtrl  Рік тому +1

      Discord Presence extension in VS Code

  • @Blitzinity
    @Blitzinity Рік тому +1

    Additional question, do single quotation and double quotation marks have any difference? Could I substitute one for the other?

    • @AC_ProjectT
      @AC_ProjectT Рік тому

      it wont make a difference in strings

  • @Arkantos
    @Arkantos Рік тому +4

    Incredible how only 29 lines of code can do it. I'm really enjoying the series, is it still updated with new episodes?

    • @UnderCtrl
      @UnderCtrl  Рік тому +1

      Thanks, and yes it is up to date!

  • @WhiteCattStudios
    @WhiteCattStudios Рік тому +12

    NPM INIT Y- WHY DOES IT NOT WORK?:
    you just have to restart vsc if you have downloaded the apps while having vsc open

    • @LitLeafLibrary
      @LitLeafLibrary 9 місяців тому

      omg this!!!!! 100% needs upvotes to go to the top!

    • @Hotdoghunter55
      @Hotdoghunter55 6 місяців тому

      bro thank so much

    • @vgl0ssyq
      @vgl0ssyq 5 місяців тому +1

      still doesnt work for me lol

    • @seelowe88
      @seelowe88 29 днів тому

      @@vgl0ssyq neither me lol

  • @realnarwhal
    @realnarwhal Рік тому

    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!

  • @al-ft1ng
    @al-ft1ng Рік тому

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

  • @Tendity
    @Tendity 9 місяців тому

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

  • @infini667
    @infini667 4 місяці тому

    You said that 'in development, we want the bot to restart automatically whenever we make any changes to the code'... but won't Discord impose a rate limit due to you logging in each time you change a line of code?

    • @UnderCtrl
      @UnderCtrl  4 місяці тому

      Discord does have rate limits, but it's quite rare you'll hit while logging into your bot with changes. The most you'll notice from my experience is your bot login might be a little slower than usual every now and then. Nothing to worry about though.

  • @gillisagorastos
    @gillisagorastos Рік тому

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

  • @CasuallyWillis
    @CasuallyWillis Рік тому

    I’m not sure if you will see this but it’s worth a shot! Everything was smooth sailing up until about 13:50. When I run ‘nodemon’, it starts and then immediately follows up with “clean exit - waiting for changes before restart”. Yours didn’t do that and I tried looking back through to see what I did differently but I’m stumped! Any way you could try to point me in the right direction ? Much love, and many thanks!

    • @UnderCtrl
      @UnderCtrl  Рік тому +1

      It seems like something is causing your node.js application to stop working. Could be a process.exit().
      Please join my Discord and post your question there :) discord.underctrl.io

  • @KarolinaRGameDesign
    @KarolinaRGameDesign 7 місяців тому

    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

  • @Rix1128
    @Rix1128 Місяць тому

    npm : 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.
    At line:1 char:1
    + npm init -y
    + ~~~
    + CategoryInfo : ObjectNotFound: (npm:String)
    [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

  • @popmango
    @popmango Рік тому

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

  • @radthemadgamer9879
    @radthemadgamer9879 11 місяців тому +2

    What Happens when you try nodemon and the terminal says "cannot be loaded because running script is disabled on thus system

    • @diorchenle
      @diorchenle 10 місяців тому

      i still couldn't figure it out have u?

  • @sk1pp3r65
    @sk1pp3r65 Рік тому

    I was wondering if you had advice or recommendation for hosting and actually publishing a created bot? Maybe I am slow but feels like i have to build a server to run bot/s or they can never be used by others.

    • @UnderCtrl
      @UnderCtrl  Рік тому +1

      I do have a tutorial on that: ua-cam.com/video/f7KjJQVcogY/v-deo.html

  • @HodlTokenClub
    @HodlTokenClub 8 місяців тому

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

  • @enkhboldnymdorj2790
    @enkhboldnymdorj2790 Рік тому

    Your explanation goes right into my head. Nice one

  • @mats33667
    @mats33667 11 місяців тому +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

  • @simeonerasmus
    @simeonerasmus Рік тому +2

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

  • @albin8961
    @albin8961 3 місяці тому +1

    The require is always throwning an error for me and it says that the modul cant be found

  • @Apsihbg
    @Apsihbg 6 місяців тому +2

    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?

    • @Gamerboy_1711
      @Gamerboy_1711 Місяць тому

      did you fixed it?

    • @Apsihbg
      @Apsihbg Місяць тому

      @@Gamerboy_1711 Dam i already forgot

  • @phonisesmith
    @phonisesmith 10 місяців тому +8

    npm init -y does not work on mine 😢

    • @van_stop
      @van_stop 8 місяців тому

      same

    • @CID098
      @CID098 6 місяців тому

      just do npm init and try

    • @MSC_EMPIRE
      @MSC_EMPIRE 2 місяці тому

      Npm install try it

  • @DemonX82
    @DemonX82 5 місяців тому +2

    if nodemon doesn't work for you on windows try to
    1. Open Windows PowerShell with Run as Administrator
    2. Run this command: Set-ExecutionPolicy Unrestricted
    😉

  • @stroyz
    @stroyz Рік тому +1

    Will the bot stay online even when im offline using this method?

  • @miaougik7285
    @miaougik7285 Рік тому +1

    Hi ! I have a problem at 13:38 , I have another green line with written clean exit - waiting for changes before restart, and my bot is offline... Also I really appreciate your tutorial and never went this far ! Thanks !

    • @ehsanjaved494
      @ehsanjaved494 Рік тому

      I got this too the files don't autosave so jus turn auto save on or save the files and it should work

  • @5bigblackmen
    @5bigblackmen 5 місяців тому +5

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

  • @_Jiwan_
    @_Jiwan_ 4 місяці тому

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

  • @李哈游
    @李哈游 Рік тому +2

    6:53 May I ask what shortcut key you use to make the symbol wrap? It seems that it is not just Enter or Shift+Enter

    • @UnderCtrl
      @UnderCtrl  Рік тому +1

      Your cursor has to be inside the curly braces {} and then when you press enter it’ll do that.

    • @李哈游
      @李哈游 Рік тому +1

      @@UnderCtrl get it! sorry I've another question..
      11:36 in this momoent,How to make ("token"); become ('token');
      Is it to let the cursor press Enter at the end of ("token"); ?

    • @vthestoner
      @vthestoner Рік тому

      ​@@李哈游 he said in the video he has a auto code formatter

  • @anocre
    @anocre Рік тому

    Wow Awesome explanation. Subscribed you in 1st video.

  • @ChimingSkyBell
    @ChimingSkyBell 10 місяців тому +1

    I had some problem at the beginning with the npm init -y part. It says command not found, can you help me?

    • @LitLeafLibrary
      @LitLeafLibrary 9 місяців тому

      i am also having this issue.... did you get it to work?

  • @Bert._
    @Bert._ Рік тому +1

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

  • @BaYPro0001
    @BaYPro0001 Рік тому +1

    npm : 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.
    At line:1 char:1
    + npm init -y
    + ~~~
    + CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    • @BaYPro0001
      @BaYPro0001 Рік тому

      Pls help

    • @UnderCtrl
      @UnderCtrl  Рік тому +1

      That’s because you haven’t installed node js

  • @s1nistr433
    @s1nistr433 8 місяців тому

    This should be the official documentation of discord.js, definitly a lot better and more helpful

  • @melisahy
    @melisahy 11 місяців тому +1

    it keeps saying [nodemon] app crashed - waiting for file changes before starting and before that it said module not found, any idea on what i should do?

  • @ilyempan
    @ilyempan 4 дні тому

    npm init -y
    npm : 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. Help?

  • @YaBoyH
    @YaBoyH 8 місяців тому +1

    I tried to run nodemon but after every time I tried it just said Error: Cannot find module ‘Users/Desktop/discord-bot/index.js’ then it says [nodemon] app crashed - waiting for file changes before starting. Does anyone have a fix please I’ve been trying for 2 hours now

  • @GCmoose
    @GCmoose Рік тому +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

  • @Brothervince
    @Brothervince Рік тому

    Would the method be any different in replit? If so, do you mind making a tutorial for that website? Thanks

    • @sfs-lyder8560
      @sfs-lyder8560 Рік тому

      replit is just the easier version to do this

  • @wooshy1x
    @wooshy1x Рік тому +1

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

  • @bushibushirino6566
    @bushibushirino6566 Рік тому

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

  • @m4rfs
    @m4rfs Рік тому

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

  • @a-el3hu
    @a-el3hu 6 місяців тому

    Thank you for making these videos! These videos are really helpful in my understanding of coding. I had an issue, however, that I can't find a fix to. In my package.json folder there isn't a separate section for dependencies. Does anyone know why?

  • @tariqplays5826
    @tariqplays5826 3 місяці тому

    BANGER tutorial. Loved it.

  • @DefNotBlake
    @DefNotBlake Рік тому +2

    Im getting an error "[nodemon] app crashed - waiting for file changes before starting..." What do I do? I youtubed it but nothing is helping

    • @GCmoose
      @GCmoose Рік тому +1

      did you figure this out yet??

    • @DefNotBlake
      @DefNotBlake Рік тому

      ​@@GCmoose Yes. I did. Something was wrong with the code but it's all fixed now

    • @zzzzzzzaxc
      @zzzzzzzaxc Рік тому +1

      @@DefNotBlake help me
      I wonder which line of the code?

  • @isseyyy69
    @isseyyy69 Рік тому

    this is first video which helped me. thank you!

  • @pogjeff42
    @pogjeff42 Рік тому +1

    How would you make it so they can say hey or hello for the bot to reply?

  • @FaresFakhouri
    @FaresFakhouri Рік тому +1

    whenever i type " npm init -y " it says this can u help me pls?
    npm : 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.
    At line:1 char:1
    + npm install json-server
    + ~~~
    + CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

  • @SemmyRGH
    @SemmyRGH Рік тому +2

    hey, i've tripled checked the code but for some reason when I make a .env and do the client.login('process.env.TOKEN) it comes back with an error saying "invalid token" any help would be greatly appreciated as its the only thing im stuck on and I cant find the answer anywhere else

    • @UnderCtrl
      @UnderCtrl  Рік тому

      Reasons could be
      1. The token is indeed invalid (try regenerating in this case)
      2. You did not install dotenv
      3. If you did install dotenv you did not import it and call the config method at the top

    • @DucksAreEpic
      @DucksAreEpic Рік тому

      @@UnderCtrl I'm having the same problem.
      1. The token is valid, it works fine with the token directly in index.js
      2. I did install it. It even says "dotenv": "^16.0.3" in package.json
      3. I have "require('dotenv').config();" at the top of index.js and still doesn't work...

    • @DucksAreEpic
      @DucksAreEpic Рік тому +1

      Okay nevermind. I'm stupid.
      The file ".env" wasn't saved yet.
      REMEMBER TO SAVE YOUR FILES, EVERYONE

  • @carlosmartinezsanchez2144
    @carlosmartinezsanchez2144 11 місяців тому

    what keyboard re u using?

  • @Powlay2020
    @Powlay2020 Рік тому +1

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

  • @theeran7697
    @theeran7697 Рік тому +2

    Hey Under Ctrl, I am on first episode and when I type in Nodemon, it says Nodemon cannot be loaded because running scripts is disabled on this system. Is there a way to fix this?

    • @KapybaraKSP
      @KapybaraKSP Рік тому +1

      run this command in your terminal, restart the terminal and then try again!
      Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force

    • @angelice.
      @angelice. Рік тому

      @@KapybaraKSP doesn't work :(

    • @KapybaraKSP
      @KapybaraKSP Рік тому

      @@angelice. then it’s some other issue

  • @partyboyww
    @partyboyww 8 місяців тому +1

    I don't know what I'm doing wrong, but I keep getting the error message: Cannot read properties of undefined (reading 'FLAGS')

    • @proto333
      @proto333 7 місяців тому

      @@Tomerz. now my code can't read Guilds, GuildMembers, etc. how can i fix this?

  • @jeffanderinkillmer8479
    @jeffanderinkillmer8479 Рік тому +1

    Your directions are great and easy to follow, however, I'm getting an error message when I run nodemon. It is unable to locate the module, however, I can't figure out how to correct. Any suggestions?
    [nodemon] starting `node index.js`
    node:internal/modules/cjs/loader:1080
    throw err;
    ^
    Error: Cannot find module 'C:\Users\jkill\Discord\discord-bot\index.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
    at node:internal/main/run_main_module:23:47 {
    code: 'MODULE_NOT_FOUND',

    • @unathorizdwatermelon
      @unathorizdwatermelon Рік тому +2

      Yup exact same issue. I don’t think this tutorial works anymore sadly, just like every other single discord bot tutorial on UA-cam.

    • @Konachaos
      @Konachaos 11 місяців тому

      It might be due to the import

  • @BRAZUCANYTV
    @BRAZUCANYTV Рік тому +2

    How you put the bot online with no command ? 18:39

    • @UnderCtrl
      @UnderCtrl  Рік тому +1

      That’s something nodemon handles. Auto restarts your bot when you make changes to your file.

    • @BRAZUCANYTV
      @BRAZUCANYTV Рік тому +1

      @@UnderCtrl ty can you make a vide on how to make a bot to give stock market TOP GAiners ? Like the STOCKBOT
      THANK YOU FOR THE VIDEO