How To Build And Deploy Your First Discord Bot

Поделиться
HTML-код
  • Опубликовано: 17 окт 2024

Комментарии • 151

  • @willparrcodes6228
    @willparrcodes6228 3 года назад +44

    I love how this tutorial goes from the initial setup all the way to the deployment of the bot! A lot of tutorials only scope to the implementation, and leave the configuration up to a confused follower.

  • @AdityaSharan811
    @AdityaSharan811 3 года назад +10

    Omg i was searching for it few days back and getting it from you is a blessing 😁

  • @Soap_js
    @Soap_js 2 года назад +1

    This is the most clear discord bot tutorial ever

  • @realtechnerd7340
    @realtechnerd7340 3 года назад +6

    Hey Kyle, thank you for this tutorial. I never knew creating Discord bots were this easy!

  • @AkshaySharma-sv3yl
    @AkshaySharma-sv3yl 3 года назад +4

    Great Tutorial from a Great person. Truly in love with your work man!🙇‍♂️

  • @TriptoAfsin
    @TriptoAfsin 3 года назад +4

    For those who are having , R10 error after 60s -
    adding a Procfile to the root directory helped, I added "worker: node bot.js" to the procfile, and pushed to the git repo, then manually deployed it, after that I disabled the deploy type of web, (from resources tab), and enabled the worker type
    Now it works, hope it helps

    • @Klyner007
      @Klyner007 3 года назад +3

      To explain this in a bit more detail;
      - You need to create a new file called `Procfile`.
      - Add the mentioned line `worker: node bot.js` to it in order to be able to see the option in the Resources menu in Heroku.
      - Enable the new option, disable the old one

    • @TriptoAfsin
      @TriptoAfsin 3 года назад

      @@Klyner007 Thanks for making it more clear

    • @realtechnerd7340
      @realtechnerd7340 3 года назад +1

      You both are absolute gods.

  • @goyashy
    @goyashy Год назад

    This is probably one of the best tutorials out there. Thank you!

  • @bunnosh
    @bunnosh 3 года назад +3

    Thanks Kyle this was really good ! would love to to see more cool things about bots in the future

  • @hammy6366
    @hammy6366 3 года назад

    I swear I always and thinking of doing something and then that day or the next day you come out with a video for it! Love your content!

  • @raushonmunni2633
    @raushonmunni2633 3 года назад +2

    Hello everybody. Kyle in this tutorial used an .env file to store his token and downloaded an .env library to read it in Javascript. But we can use Json file and directly import it from JavaScript and keep the folder size low

  • @doco6186
    @doco6186 3 года назад +1

    Super informative! I've been wondering about how to create a discord. Thanks.

  • @gone4701
    @gone4701 3 года назад

    I watched this only for the deployment, but I respect you and you are very helpful (I have also watched other videos)

  • @usmanmunir1559
    @usmanmunir1559 3 года назад

    This video is awesome !! It's really a web dev simplified ... always wait for

  • @harrazmasri2805
    @harrazmasri2805 2 года назад

    amongst many other videos, i find yours the best

  • @Smackindaface
    @Smackindaface 3 года назад +10

    Getting a crash after 60 seconds of running on heroku, Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch.
    Edit: To fix make a Procfile in the bot root directory and add worker: node bot.js. In heroku disable web dyno and enable worker dyno.

  • @Snoo29293
    @Snoo29293 3 года назад +4

    Wow, I didn't know I could make Discord bots with JavaScript, gotta try it out one day, I had this very cool bot idea few years ago but I knew nothing about coding back then, perhaps I will be able to make my idea reality soon.

    • @Smackindaface
      @Smackindaface 3 года назад +1

      Discord runs on javascript, even the desktop app.

  • @NicChap
    @NicChap 3 года назад

    Man I like your Tuts. Such a time saver.

  • @thepunslinger1536
    @thepunslinger1536 3 года назад

    This is great. Will you make more of these Discord Bot tutorial in the future ?

  • @Smartst3r
    @Smartst3r 3 года назад +3

    Hey Kyle I keep getting this error after about 3 mins of my bot running on Heroku "Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch" did you run into this problem?
    Saw something about changing something in Procfile but I'm not sure what that is.

    • @TriptoAfsin
      @TriptoAfsin 3 года назад +1

      adding a Procfile to the root directory helped, I added "worker: node bot.js" to the procfile, and pushed to the git repo, then manually deployed it, after that I disabled the web deploy type of web, (from resources tab), and enabled the worker type
      Now it works, hope it helps

  • @Stoney_Eagle
    @Stoney_Eagle 3 года назад +3

    I love WDS
    This is definitely simple to start with 😉

  • @RazipRizen
    @RazipRizen 3 года назад +3

    this was really helpful, thx man, but i have a question how do i open the console like how you did in 3:55

  • @albertointervento8555
    @albertointervento8555 3 года назад

    I was planning to make a discord bot on weekend and today booom, I see this video :)

  • @calvinmalagon7154
    @calvinmalagon7154 3 года назад +1

    Great Video! You should make one where you can have the discord bot be voice command instead of a music bot

  • @abhishekteni425
    @abhishekteni425 3 года назад +4

    Lord Kyle has blessed us with a discord bot tutorial.
    let's enhance this knowledge and spread peace with the world.

  • @me-heer
    @me-heer 3 года назад

    A suggestion: You don't have to copy 'heart emoji' off google. There's emoji insertion feature in Windows 10: Press [Windows] + [ . ](dot key)

  • @viewtonha
    @viewtonha 2 года назад +1

    Hi. Do you know what might be the reason for this error: Web process failed to bind to $PORT within 60 seconds of launch

  • @hexerous
    @hexerous 3 года назад

    I can't believe you also do discord.js! I commend you!

  • @sharvilpatil8742
    @sharvilpatil8742 2 года назад

    Thank you! This was very useful

  • @shaderone07
    @shaderone07 3 года назад

    you have my respect Kyle.

  • @jonmjauu6435
    @jonmjauu6435 3 года назад +3

    11:42 Hahaha "take the user of the meSaghesr"

  • @MeNoorswe
    @MeNoorswe 3 года назад

    Wonderful content sir, thanks!

  • @liliankempenich9486
    @liliankempenich9486 3 года назад +2

    How did you install the packages through the terminal? I keep getting an error that $ isn't a thing, same with npm.

    • @MusicByAr1605
      @MusicByAr1605 3 года назад +2

      He's using a bash terminal and u might be using a PowerShell. In PowerShell it doesn't look like a $ instead you are gonna have it like this: "Path-Of-Folder>". And now the main part is install Node.js to run NPM, node, and nodemon.

    • @Create-zc8qe
      @Create-zc8qe 2 года назад

      U have to install the packages to use their commands 💀

  • @abhilashmhadli2742
    @abhilashmhadli2742 3 года назад

    Hey brother.... Is the deployment process is same for any other backend code?
    Is it same even if ive react frontend code and node backend code?

  • @Badnercalabrese
    @Badnercalabrese 3 года назад +2

    I'm embarassed to say but on the registration process I'm already getting stuck when trying to access $ npm init - y
    I'm getting this error
    $ : The term '$' 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 unit -y
    + ~
    + CategoryInfo : ObjectNotFound: ($:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

  • @Klyner007
    @Klyner007 3 года назад +2

    For some reason for me the bot crashes after a minute: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch

    • @realtechnerd7340
      @realtechnerd7340 3 года назад +1

      I got the same error, did you figure out a way to fix it?

  • @CanadaballAlphabetlore123
    @CanadaballAlphabetlore123 3 года назад +2

    how do you open visual studio code

  • @Luk3Stein
    @Luk3Stein 3 года назад +1

    Holy shit! Kyle you legend!

  • @54JIN
    @54JIN 3 года назад

    I am having trouble launching my bot to Heroku, everytime I try to launch it gives me an error after one minute of deployment exact, stating: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch. Please help

  • @janithcooray5546
    @janithcooray5546 3 года назад

    Amazing tutorial!!!

  • @scarasect5161
    @scarasect5161 3 года назад

    can you make a discord bot series?

  • @bunnybloods768
    @bunnybloods768 3 года назад

    Waiting for this 🔥🔥

  • @danser_theplayer01
    @danser_theplayer01 Год назад +1

    UPDATE:
    17 December 2022
    Heroku is dead
    New way to host one small bot for free is Daki. Which for me is even better because I hatw crawling in console documentation trying to tell github that I just want to update this file.
    Also, new syntax for discord.js is this:
    messageCreate instead of message,
    new Discord.Client({ intents: [insert a number code]});
    You can find that code on your discord creators panel where it has checkboxes with permissions for your bot, you can just check what you need and copy resulting code below.

  • @alessandro_carta
    @alessandro_carta 3 года назад +1

    I love WDS

  • @sagara5982
    @sagara5982 3 года назад

    U r the best kyleeeeee I'm sry if I spelled it wrong

  • @tigerlep9
    @tigerlep9 Год назад +1

    heroku is no longer free is there another way to host the bot for free?

  • @mohithadiyal6083
    @mohithadiyal6083 3 года назад

    You are big saviour☺️

  • @alilasteve5340
    @alilasteve5340 3 года назад

    Anybody that loves WDS is awesome.

  • @MohammedAli-dc3xe
    @MohammedAli-dc3xe Год назад

    Run works fine for me but the bot is not working on discord for some reason, i added the GatewayIntentBits since it requires this in the new update

  • @johndoe2233gh
    @johndoe2233gh 3 года назад

    You must be using some jedi mind reading tricks. I was thinking about this just a day ago

  • @tomaspuzenko4027
    @tomaspuzenko4027 3 года назад

    Thank you so much

  • @gowthamujjineni8422
    @gowthamujjineni8422 3 года назад

    Bro please create a " learn node and backend with js today " course

  • @blank-vw2sb
    @blank-vw2sb 3 года назад

    He can read my mind

  • @sakubdev52
    @sakubdev52 3 года назад +1

    Let's say our bot gonna handle like 50 commands, now we have everything in client.on('message') listener and we're writing everything in if statements, is there any better way to write code like this without having 50 if's? Can you categorize commands into different directory like economy etc?

    • @gone4701
      @gone4701 3 года назад

      Use a switch statement. Unfortunately, what you described is not doable afaik

    • @SirJal
      @SirJal 2 года назад

      late reply, but that’s the job for a command handler. instead of using if/switch statements, you can preload the commands and run it whenever a user calls a command in littler and nicer code.

  • @chrislynch7064
    @chrislynch7064 Год назад

    i cant seem to get it to run. im only partially through the vid but, it says "client missing intents" I don't think i saw him go over this yet. Im researching it now. but if anyone knows, it would be helpful. Thanks

  • @Trunksssj44
    @Trunksssj44 3 года назад

    Question:
    Hello guys, I have followed Kyle's tutorial and the Bot that I created seems to be working fine without Heroku. So I wonder what that Heroku site or whatever is for ?

    • @gone4701
      @gone4701 3 года назад

      So you don’t have to keep your computer running 24/7 for your bot

  • @kumarkelash4423
    @kumarkelash4423 2 года назад

    nice but I need some advanced stuff related to bot

  • @heshanwijerathna
    @heshanwijerathna 3 года назад

    This is great🔥🔥

  • @hamidbakhtiari3986
    @hamidbakhtiari3986 3 года назад

    this was a great video

  • @swatilekha_roy
    @swatilekha_roy 3 года назад

    Amazing job!!!

  • @blul8316
    @blul8316 3 года назад

    When I type npm init -y in terminal. I get an error message. " The term 'npm' is not recognized as the name of a cmdlet". Not sure how to fix this?

  • @destreed4261
    @destreed4261 3 года назад

    this is a good tutorial however, i had many issues understanding the visual studio code part.

  • @imafireIsFroent
    @imafireIsFroent Год назад +1

    How are you opening the console?

    • @Troyzhen
      @Troyzhen Год назад

      Ctrl + shift + tilde

  • @dvsshashank8074
    @dvsshashank8074 3 года назад

    Dude do one video on parsing video and converting the audio played in the video to text in javascript.

    • @swoorp
      @swoorp 3 года назад

      😂instead of making an app, i would just type the audio out... btw it's a cool project to build... i'll try to build it my self.

  • @Arabian_Abomination
    @Arabian_Abomination 3 года назад

    Thanks bro

  • @namashaggarwal7430
    @namashaggarwal7430 3 года назад

    Awesome, please make a tutorial on how to make a WhatsApp bot , Instagram bot and telegram bot

  • @gouveia8887
    @gouveia8887 3 года назад

    This works in private calls?

  • @Roknok
    @Roknok 3 года назад

    I have a question
    How can we make a button that can copy some text?

  • @dontworryrelex6949
    @dontworryrelex6949 3 года назад

    Thanks I like it

  • @rohitchowdhary618
    @rohitchowdhary618 3 года назад

    can u tell the git command u typed or anyone else
    thanks in advance

  • @mystic_dil
    @mystic_dil Год назад

    my bot is offline i did no programming just made it in discord but when i added it to server its offline 24/7

  • @txpics8760
    @txpics8760 3 года назад

    do you have to be a discord bot dev?

  • @KevinChar
    @KevinChar 3 года назад

    So we can sort of hack-deploy our bot not to discord server which costs money and deploy on Heroku for free? Is it even approve by discord??

    • @WebDevSimplified
      @WebDevSimplified  3 года назад

      This is the way Discord bots are setup. The code for the bot is just a server that is running and the way your server gets information is by you adding a bot to a server.

    • @Create-zc8qe
      @Create-zc8qe 2 года назад

      Hosting is not illegal in terms of discord. If it was the bot feature would be gone!

  • @AceeGamess
    @AceeGamess 2 года назад

    I sent out my first bot but I don't know how to code! Nor is there any free coding websites for discord coding bots

  • @Dieaconus
    @Dieaconus 3 года назад

    When I open the terminal it uses powershell and says that "npm isn't a recorgnised command"

    • @Dieaconus
      @Dieaconus 3 года назад

      I downloaded git but it still doesn't work. It now says that "npm: command not found"

    • @gannozforthewin3165
      @gannozforthewin3165 3 года назад

      You need to install node js. The latest version of discord.js requires node.js 16.6.0 or newer.

  • @userqwertyuiop9652
    @userqwertyuiop9652 2 года назад

    can you make a new video for this since the content changed now?

  • @Baghera-a
    @Baghera-a Год назад +1

    Heroku dynos are no longer for free

  • @logangoose
    @logangoose 3 года назад

    ... this man

  • @shreejitpal6598
    @shreejitpal6598 2 года назад +1

    This video needs an update with the v13 because nothing in this tutorials works anymore

  • @twentyonedot
    @twentyonedot 3 года назад

    Can you do a vid on telegram bot too

  • @mmorkinism
    @mmorkinism 3 года назад

    Yes, yes, yes.

  • @gregory6099
    @gregory6099 3 года назад

    super

  • @thebruhgames3968
    @thebruhgames3968 3 года назад +1

    I am getting an error while doing npm start, can anybody give the solution to fix it

    • @Create-zc8qe
      @Create-zc8qe 2 года назад

      Not without any context at all??

  • @ChiknBorger
    @ChiknBorger 7 дней назад

    6:42 npm start isnt working for me, gives an error

  • @WulframII
    @WulframII 3 года назад

    Don't go to Google to copy emojis... Use Win + . (Win + period).

  • @sankaranarayanan7847
    @sankaranarayanan7847 3 года назад +2

    Omg dude superb tutorial..

  • @jpxqstockz
    @jpxqstockz 3 года назад

    How do i Open the console?

  • @DeveroonieWasTaken
    @DeveroonieWasTaken 3 года назад

    Haha - our bots got the same coloured pfp

  • @bhumit070
    @bhumit070 3 года назад

    Make a same video for telegram bot

  • @janschmid281
    @janschmid281 2 года назад

    Has nodejs or the discordjs change in the last few months, nothing of what he shows works for me

    • @Create-zc8qe
      @Create-zc8qe 2 года назад

      @Mr. Unknown there's very slight changes, you can just fix em.

  • @tesla1772
    @tesla1772 3 года назад

    So if someone wants to use my bot. how can he? Is there something like downloading bot?

    • @WebDevSimplified
      @WebDevSimplified  3 года назад +3

      They just need to invite the bot into their server.

    • @Create-zc8qe
      @Create-zc8qe 2 года назад

      However you set the bot to work, that's how the guild member will use it

  • @krista4882
    @krista4882 3 года назад

    Why are you not using switch-case smh my head

  • @davisouza5151
    @davisouza5151 Месяц назад

    Unfortunately Heroku no longer has a free tier

  • @samarmohan9891
    @samarmohan9891 3 года назад +2

    Lol, I used Discord.py Rewrite and followed TechWithTim's tutorial

    • @jimhalpert9803
      @jimhalpert9803 3 года назад

      I used that exactly a year ago! It's super easy

  • @MaskiilovMai
    @MaskiilovMai 3 года назад

    my code can't push :

  • @ScileSc
    @ScileSc 3 года назад +1

    YandereDev: I´m four parallel universes ahead of you.

  • @BusinessWolf1
    @BusinessWolf1 2 года назад +1

    the newest version of the discord lib messes everything up, this tutorial needs an update

    • @Create-zc8qe
      @Create-zc8qe 2 года назад

      Don't forget you can write your own code!

    • @SuperYtc1
      @SuperYtc1 2 года назад

      @@Create-zc8qe Don't forget you weren't born with coding knowledge and had to learn at some point too!

    • @Create-zc8qe
      @Create-zc8qe 2 года назад

      @@SuperYtc1 thx

  • @Working800
    @Working800 3 года назад

    Fun fact, my girlfriend yell at me when I delete message too

  • @CrystalKnote
    @CrystalKnote 2 года назад

    my bot is offline

  • @shaggiel3099
    @shaggiel3099 3 года назад

    pog