How to Build a Discord Bot

Sdílet
Vložit
  • čas přidán 18. 09. 2022
  • Join the Fireship Discord Server / discord
    Learn how to build your own discord bot from scratch with JavaScript and deploy it to the cloud in this beginner friendly tutorial.
    #javascript #discord #tutorial

Komentáře • 227

  • @shateq
    @shateq Před rokem +59

    This dude covered 30-ten minute long video series in 4 minutes 😂

  • @parker02311
    @parker02311 Před rokem +4

    I love watching videos about creating Discord bots even know I have made multiple. This content is just so satisfying to watch.

  • @autumndev
    @autumndev Před rokem +339

    Well, serverless is possible if you only need a bot to do slash commands which is a valid use case

    • @ocean3323
      @ocean3323 Před rokem +9

      Interactions not only slash commands (message components and context menus, modals also)

    • @hrvs
      @hrvs Před rokem +8

      Well, telegram bot are very easy to deploy in serverless environment.
      I built a Telegram Bot with Deno and deploy it in Deno Deploy and it is just blazingly fast.

    • @lapraswastaken
      @lapraswastaken Před rokem +3

      currently working on a Python library that focuses solely on Discord interactions! the timing for this video is pretty funny

    • @arkayv
      @arkayv Před rokem +2

      @@hrvs *ThePrimagean intensifies*

    • @h.hristov
      @h.hristov Před rokem +2

      How would that work if it requires a persistent connection?

  • @RedCrafter07
    @RedCrafter07 Před rokem +1

    Finally, we've been waiting for so long 😂
    Great video as always, please keep doing this, you help out so many people (including me). Thanks for that!

  • @nicetrooper2
    @nicetrooper2 Před rokem +5

    keep up the amazing work🙌

  • @jamesprentor8433
    @jamesprentor8433 Před rokem +5

    This is perfect timing! I am just working on a discord server for a product I am making and here comes fireship with the discord bot video!

  • @tymianek
    @tymianek Před rokem +8

    4:33 well, I don't think I can ask you any questions when activity is super high and slowmo is 25sec. Your videos are amazing, keep doing them 🔥

  • @mirzazplayz_rblx
    @mirzazplayz_rblx Před rokem +1

    Literally the best tutorial of discord bot making damnn

  • @eternalgamer496
    @eternalgamer496 Před rokem +1

    I just logged into CZcams to learn how to make a discord bot and your video popped up in my recommendations, Just the thing I needed. Although I was planning to use Python for the bot I changed my decision to use Node instead

  • @gducrash
    @gducrash Před rokem +63

    My favorite part was when Jeff said "it's Discord time" and botted all over the servers. Definitely one of the tutorials of all time ever!!

    • @makkusaiko
      @makkusaiko Před rokem +3

      Definitely one of the comments of all time

  • @ezra6094
    @ezra6094 Před rokem +2

    I was just thinking about making a discord bot, you're a mind reader!

  • @amrelmohamady
    @amrelmohamady Před rokem +1

    The Builder Pattern is my favorite!

  • @lucasguimaraes7041
    @lucasguimaraes7041 Před rokem +59

    I absolutely loved the “create your own discord bot” experience. I built mine using Heroku + DialogFlow 2+ years ago.
    Such a cool memory !

    • @yeppiidev
      @yeppiidev Před rokem +9

      ah yeah heroku, remember using it to create server side apps. unfortunately they stopped giving free tiers

    • @arjittw
      @arjittw Před rokem

      Do not take servers too seriously, you will someday get out of free tear - Arjit Tiwari

    • @coolguy1083
      @coolguy1083 Před rokem

      @@yeppiidev so sad my first app on heroku was a discord bot

    • @vabtech7627
      @vabtech7627 Před rokem

      @@yeppiidev What are the alternative options nowadays?

    • @yeppiidev
      @yeppiidev Před rokem

      @@vabtech7627 hmm i haven't done much backend development to know that but repl.it provides some stuff you can use to run things server side

  • @nicolasramos7084
    @nicolasramos7084 Před rokem

    Great as usual. I would love to see a 'How to build a Twitch extension' video

  • @yasanduseenapatabendige9108

    Few months ago I made a discord bot for my discord server with python(nextcord) and it was awesome. I learned many things from it and it encouraged me to keep coding. BTW I am really happy you made a discord server

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

      hey you probably wont respond but can you help me learn to make a bot

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

      @@JamesBezza01 I at least will respond. What type of bot do you want to make?

  • @awhux
    @awhux Před rokem +1

    nice video mate

  • @developerpranav
    @developerpranav Před rokem +5

    Thanks for the tutorial :D
    BTW why does the video have 480p as the max res?

  • @mghq-mobilegamerzhq2533

    Wish this came out 2 weeks earlier, love this though!

  • @deepshah2305
    @deepshah2305 Před rokem +1

    Gonna be 1M subscribers in a Month 🔥🔥

  • @flamableassassin5105
    @flamableassassin5105 Před rokem +95

    1:55 I'm really sorry but you are kind of wrong you are able to build bots with server-less functions (discord has an example on their docs for cloudflare workers). However you will only be able to receive interaction events not any other event. Keep up with the amazing vids tho

    • @beyondfireship
      @beyondfireship  Před rokem +70

      Good call, yeah serverless will work in certain cases.

    • @krishgarg2806
      @krishgarg2806 Před rokem +1

      @@beyondfireship yeah it works on interaction model with webhooks like system

    • @hrvs
      @hrvs Před rokem

      Telegram Bots works amazing in serverless environment.

    • @azeemhaider5278
      @azeemhaider5278 Před rokem

      Didn't App Engine standard automatically shutdown when no incoming request?
      It means bot can't listen events after a shot time.
      How you are managing it on App Engine

  • @dendysaptoadi9652
    @dendysaptoadi9652 Před rokem

    its very easy when you explain it

  • @MentorMode
    @MentorMode Před rokem

    Awesome 👍

  • @returnZeroo
    @returnZeroo Před rokem

    props to you.

  • @mattplaygamez
    @mattplaygamez Před rokem +2

    Good video. "Follow the principal of least privilege"

  • @Nexurl
    @Nexurl Před rokem +5

    Good vid but why is it in 480p ?

  • @clean7886
    @clean7886 Před rokem

    Thanks Brother

  • @parmajohn238
    @parmajohn238 Před rokem

    0:12
    you got me - you really got me

  • @eliasmangoro413
    @eliasmangoro413 Před rokem +5

    Great video! but why don't you like the builder pattern?

  • @YuriG03042
    @YuriG03042 Před rokem +2

    when you said you were going to create your bot from scratch, i thought you were actually going go reinvent this wheel, but then you imported discord.js lol glad to know you aren't crazy

    • @YuriG03042
      @YuriG03042 Před rokem +2

      guild messages is a privileged intent, you shouldn't ask for that intent or rely on it anymore as discord will only approve those requests on case by case. just use interactions for everything

    • @YuriG03042
      @YuriG03042 Před rokem +1

      you listed to event messageCreate but then show a screenshot of the bot replying to an interaction wtf???

  • @richasrivastava7739
    @richasrivastava7739 Před rokem

    The most fireship way of announcing the discord

  • @0x5DA
    @0x5DA Před rokem +2

    have you considering opening s matrix room as well?

  • @i3looi2
    @i3looi2 Před rokem +7

    Building a Discord bot is easy. Keeping it from taking over the world .. now that's a challenge !

  • @morganjennings3164
    @morganjennings3164 Před rokem

    It,s so so good 😀🤘🏼

  • @xxheroxx9128
    @xxheroxx9128 Před rokem

    Hey, good video. For future videos i would recommend a editing soft

  • @s0er3n33
    @s0er3n33 Před rokem

    nice video but were the discords notification sounds necessary?

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

    I have a question. What code editor do you use? I have no solid one, so I use notepad or notepad++

  • @ibrahimmohammed3484
    @ibrahimmohammed3484 Před rokem +4

    why is this video in 480?!!!

  • @dddeiv
    @dddeiv Před rokem

    Hey could you take a look at the biscuit library for Discord API? :)

  • @pixelsbyme
    @pixelsbyme Před rokem +3

    Why the quality of video is set to 480p ??

  • @wlockuz4467
    @wlockuz4467 Před rokem +2

    I have never used Discordjs, how does it compare to DiscordPy? personally I've used discordpy for a long time and some of the tools that it offers out of the box like tasks, extensions etc are extremely powerful and on top of that you also have the full power of python at your disposal.

  • @TheSkyCries1
    @TheSkyCries1 Před rokem

    My God.. the discord notification noices triggered me. I can't resist checking if there is actually a message. Great video though :D

  • @GrzyPiks
    @GrzyPiks Před rokem

    I'm pretty sure you will have the best tutorials (and shortest) about “how to make *good* discord bot”

  • @evildoer1606
    @evildoer1606 Před rokem +1

    Why you are not a fan of builder pattern? What do you prefer to solve lots of parameters in the constructor/constructors?

  • @fkw0k3t4rd5
    @fkw0k3t4rd5 Před rokem +1

    Is there a reason you didn't use something like a Heroku worker? That's what I'm using now and wondering if its a bad idea.

  • @SpeedyRacist
    @SpeedyRacist Před rokem

    You released this after i figured slash commands out lmao

  • @BarryPLAYz
    @BarryPLAYz Před rokem +1

    I did this in 2020 because nothing existed to automatically assign a role based on email verification. It was a pretty fun project.

  • @yss64
    @yss64 Před rokem +7

    wow I'm early!!

  • @joshuanovak961
    @joshuanovak961 Před rokem

    Not going to lie, I read the thumbnail as: "How I built a cyber bully"

  • @crupayan
    @crupayan Před rokem +7

    I generally use builder patterns while coding and when you that that you are not a fan of that, it got me really curious to know you thoughts. Maybe can you elaborate on what is the thing builder pattern lacks, and which pattern you use personally for most cases. Thanks :-)

    • @Andressuquaz156
      @Andressuquaz156 Před rokem +2

      X2, personally I find the builder pattern really useful and readable, can simplify the sometimes complex way of building objects.

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

    One question, can you recommend a bot that allocatates daily points to users for writing a particular command

  • @PatrickAlphaC
    @PatrickAlphaC Před rokem +11

    Question, are you still editing all your videos? The edits are so clean.

    • @PatrickAlphaC
      @PatrickAlphaC Před rokem

      @@jujimufi472 fireship is just too good

    • @victorhenriquecollasanta4740
      @victorhenriquecollasanta4740 Před rokem +1

      that's the man! thank you for your tutorials! today i am employed as a web3 dev and your videos had a huge influence on it ;)

    • @PatrickAlphaC
      @PatrickAlphaC Před rokem

      @@victorhenriquecollasanta4740 LETS GOOOO!!!!!

  • @MdSamir-ce5pe
    @MdSamir-ce5pe Před rokem +1

    How do I check if the bot is working fine or not?
    when I'm running the index file its giving errors like 'Privileged intent provided is not enabled or whitelisted'

  • @smachgame
    @smachgame Před rokem

    ok man cool where is the discord developer dashboard?

  • @CodyDBentley
    @CodyDBentley Před rokem +1

    Curious to know why you don't like builder pattern?

  • @pazzoeo
    @pazzoeo Před rokem +2

    I would *really* love to know how to use Google App Engine. I hear it's "free" but i cannot wrap my head around how to use it and the limits this "free" tier apply to.

  • @dimitritsikaridze6220
    @dimitritsikaridze6220 Před rokem +2

    full discord bot tutorial would be nice

  • @beyondfireship
    @beyondfireship  Před rokem +15

    Let's chat. UPDATE: Thanks for boosts, we have a custom link now discord.gg/fireship

    • @Denny-77
      @Denny-77 Před rokem +1

      less goo!!!!!

    • @Kat21
      @Kat21 Před rokem +1

      😮

    • @wppq6944
      @wppq6944 Před rokem +1

      Is there a particular reason why this comment isn't pinned?

  • @iamnotstanley
    @iamnotstanley Před rokem

    Hey Jeff, why is this video in 480p?

  • @sage_gamers
    @sage_gamers Před rokem +1

    Please make video on your journey as a developer and the ups-downs you faced. btw love watching your video and it inspires a lot ^⁠_⁠^
    I'm not a bot

  • @mrdrummer2564
    @mrdrummer2564 Před rokem +3

    I guess we only get 480p eh?

  • @emahhh
    @emahhh Před rokem

    I would love to see a Telegram got tutorial next

  • @idrissberchil25
    @idrissberchil25 Před rokem

    Do matrix next

  • @harvanchik
    @harvanchik Před rokem +3

    I didn't realize how easy it is. Definitely will try making my own bot soon!

    • @R80QZ
      @R80QZ Před rokem +4

      He lost me at the coding part

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

      @@R80QZ this fr

  • @RovelStars
    @RovelStars Před rokem

    I can confirm this youtube video will hit a lot of views, due to the topic being so popular ;)

  • @Knightmare-of-Shadows
    @Knightmare-of-Shadows Před 11 měsíci

    Is it possible to imbue a bot with the memories/information of fictional characters? I need to know, as I must create a Lelouch Vi Britannia bot as well as a Zero bot.

  • @benjaminshinar9509
    @benjaminshinar9509 Před rokem

    can we get a video about a TEAMS bot?

  • @7heMech
    @7heMech Před rokem

    Cool

  • @360noscooper
    @360noscooper Před 10 měsíci

    can you give some examples of free bot hostings?

  • @muaz840
    @muaz840 Před rokem +1

    why your videos aren't in hd?

  • @minetomek
    @minetomek Před rokem

    Can you make example repo on GitHub with base for a bot? It would be really helpful.
    Btw great video

  • @nodirbekvositov
    @nodirbekvositov Před rokem

    Do you have twitter bot as well?

  • @misaelpereira9679
    @misaelpereira9679 Před rokem

    Javascript or Python is better for easily builds a bot?

  • @jasonbenfrin
    @jasonbenfrin Před rokem

    LET'S GOOOO

  • @ZachPlayzYT1
    @ZachPlayzYT1 Před 21 dnem

    what app is he using for the codes

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

    3:30 youtube not THAT liike 😭

  • @Twingamerdudes
    @Twingamerdudes Před rokem +5

    The long awaited tutorial. 2:32 thanks for the free token.

  • @ruigerooie8055
    @ruigerooie8055 Před rokem

    when i put npm in the terminal it says that it doesn't know what that is

  • @mhmdalharbi2370
    @mhmdalharbi2370 Před rokem

    I managed to run telegram bots on serverless environment via web hooks I'm not sure if that also possible for discord tho

  • @fd_edits.fd24
    @fd_edits.fd24 Před rokem

    what was the javascript app?

  • @samiulbasirfahim112
    @samiulbasirfahim112 Před rokem

    Love from bangladesh

  • @noisyguest5249
    @noisyguest5249 Před rokem

    Why is the quality 480p at max?

  • @Ouchie
    @Ouchie Před rokem

    I have a bot that will turn on a led if my mic is muted and off when unmuted, hosted on my raspberry pi

  • @gamemak0r
    @gamemak0r Před rokem +1

    This works amazingly with langchain.

  • @khalilbessaad5553
    @khalilbessaad5553 Před rokem +1

    only 480p?

  • @simonbrandner
    @simonbrandner Před rokem +2

    My rather biased self would love to see a How to Build a [matrix] Bot video :)

  • @dendysaptoadi9652
    @dendysaptoadi9652 Před rokem

    are you reset your token bro?

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

    The content field is always empty for some reason?

  • @electrolyteorb
    @electrolyteorb Před rokem

    Why your videos are 480p?

  • @0xC4aE1e5
    @0xC4aE1e5 Před rokem +1

    Why 480p?

  • @SRoyTheComfy
    @SRoyTheComfy Před rokem

    Any idea why this video is only 480p?

  • @willinton06
    @willinton06 Před rokem

    Not a fan of the builder pattern huh, spicy

  • @echonabin
    @echonabin Před rokem

    why's its only 480p on quality??

  • @bishnudas3562
    @bishnudas3562 Před rokem +1

    3:10 !message?.author.bot can anyone explain why there is question mark?

  • @braydntanner5467
    @braydntanner5467 Před rokem

    Why don't you like the builder pattern?

  • @chaitanyakulkarni6416
    @chaitanyakulkarni6416 Před rokem +1

    okj , but how do i run it ?

  • @drowsy5384
    @drowsy5384 Před rokem

    Vscode extension tutorial?

  • @erlangparasu7524
    @erlangparasu7524 Před rokem

    about discord and rustlang rust ?

  • @asdasddas100
    @asdasddas100 Před rokem +5

    1:55 You can 100% build a bot using serverless functions because that's what I'm doing right now

    • @ai-whisperer
      @ai-whisperer Před rokem

      can you lease shed more light on the how?

    • @SuperElephant
      @SuperElephant Před rokem

      I tried. Not possible for discord bots.

    • @ieatthighs
      @ieatthighs Před rokem

      how

    • @pmj_studio4065
      @pmj_studio4065 Před rokem +1

      It's made possible by using HTTP interactions instead of Gateway events.

  • @TheOneAnOnlyGuy
    @TheOneAnOnlyGuy Před rokem

    Why are you not a fan of the builder pattern?

  • @thecodebuddha7246
    @thecodebuddha7246 Před rokem +4

    Hey! There's this scammer on using your logo that replies to commentsvon your channel. Reported it earlier today not sure if the channel got taken down. Just putting it out so you know and if possible you could give a heads up to your followers