Creating a Discord Bot in Python (2025) | Episode 3: Slash Commands

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.พ. 2025
  • Looking to add Slash Commands to your Discord Bot? In Episode 3 of our 2025 series, "Creating a Discord Bot in Python," we walk you through everything to do with Slash Commands. By the end of this episode, you'll fully understand what slash commands are and how you can program them in Python for your Discord Bot. This tutorial is perfect for beginners who want to dive into Discord bot development using Python in 2025.
    🚀 In this episode, you will learn:
    1. What Slash Commands are
    2. How to program Slash Commands
    3. How to get your Slash Commands to accept input from a user
    ►Please consider joining my discord server
    / discord
    ►If you would like to support me and this channel please consider donating on Patreon / s_james
    ►Social Media
    Instagram - / james.d.s_
    Patreon - / s_james
    Discord - / discord
    ► Business Inquiries ONLY
    james.d.s.business@gmail.com

ความคิดเห็น • 59

  • @RanveerKang-s5h
    @RanveerKang-s5h 29 วันที่ผ่านมา +1

    Amazing series, this has really helped me out. I tried programming a discord bot in python a few years ago but never figured out slash commands. I instead used a prefix of '.' instead to determine behaviours similar to a command. But this is so much better! It allows me to pass parameters so easy and track my commands easy too. Thank you James! Keep it up with the discord bot stuff!

  • @lennoz8049
    @lennoz8049 3 หลายเดือนก่อน +7

    praying part 4 comes out soon! These are great and very well made please keep going

    • @hike8932
      @hike8932 หลายเดือนก่อน

      dude just learn on your own from here

  • @Robinsong8008
    @Robinsong8008 15 วันที่ผ่านมา +1

    I have been making a bot for a friend and your clear and up-to-date information (as well as your infectious enthusiasm) have given me the tools to run off on my own :D. thank you very much

    • @4B_short
      @4B_short 9 วันที่ผ่านมา

      bro can u help me

    • @shrug9067
      @shrug9067 2 วันที่ผ่านมา

      @@4B_short lmaoooo

    • @4B_short
      @4B_short 2 วันที่ผ่านมา

      @ wsp

  • @MagnificentSeven-r2c
    @MagnificentSeven-r2c 29 วันที่ผ่านมา

    AHHHHHH!!!!! I'm a bot maker transitioning to slash commands and I could not figure out why it just wasn't working - your tip about specifying the guild worked perfectly and fixed my issue so I could get on with my life. THANK YOU!

  • @aposkus
    @aposkus 3 หลายเดือนก่อน +1

    Amazing tutorial, easy to follow and is very clear for someone who knows absolutely nothing at coding. Awaiting for part 4, keep it up!

  • @einerolleklopapier4683
    @einerolleklopapier4683 4 หลายเดือนก่อน +1

    Thank you very much I really enjoy your tutorials! We need more frequent videosssss ❤

  • @junjieoyan4800
    @junjieoyan4800 3 หลายเดือนก่อน +2

    Nicely demonstrated! Don't forget to reset the token

  • @TheDiverJim
    @TheDiverJim 4 หลายเดือนก่อน +3

    love this series. very well done.

  •  4 หลายเดือนก่อน +5

    EPIC MAKE PART 4!!

  • @crowxar
    @crowxar 4 หลายเดือนก่อน +1

    Pretty slick, love the tutorial

  • @TheDiverJim
    @TheDiverJim 4 หลายเดือนก่อน +2

    you earned a sub after this series. please keep it up!

  • @EmmoEcks
    @EmmoEcks 16 วันที่ผ่านมา +4

    can we not do the thing where you intentionally make a mistake and then go back afterwards to point it out and fix it, intentionally??? i just spent 20 minutes trying to troubleshoot my slash command NOT showing up only to give up and hear you say you did it on purpose......

    • @puppehv1457
      @puppehv1457 12 วันที่ผ่านมา +2

      OMG I was losing my mind rewriting my code three times in a row till I saw your comment.

  • @goprohunter
    @goprohunter หลายเดือนก่อน +1

    how would you write the slash commands in a cog file and then sync them ??

  • @iluk3606
    @iluk3606 4 หลายเดือนก่อน +1

    Nice!

  • @Patrick-yl4hp
    @Patrick-yl4hp 2 หลายเดือนก่อน

    MAKE MORE PLEASE!

  • @ahmed20gh
    @ahmed20gh 4 หลายเดือนก่อน +1

    thx bro

  • @Lizardlord6
    @Lizardlord6 4 หลายเดือนก่อน

    Thanks man this is helping so much. I tried reading the API Refrence but it's not entirely clear. I'm curious about timed events and sending links.

    • @Lizardlord6
      @Lizardlord6 4 หลายเดือนก่อน

      i should clarify, sending a message and link to a site at a specific time every week/day/month like for a news channel.

  • @mate4473
    @mate4473 18 วันที่ผ่านมา

    hey, how could i make my bot always be online and answer?

  • @TheRealElonMuSKLOL
    @TheRealElonMuSKLOL 4 หลายเดือนก่อน +1

    i have a problem it dont say anything about syncing

  • @civgum3095
    @civgum3095 หลายเดือนก่อน +1

    Client can't run .tree?

  • @fatboy_on_line3326
    @fatboy_on_line3326 12 วันที่ผ่านมา

    Everything is exactly the same when i type the python3 main.py command nothing happens at all no erros nothing i got no idea what the hell is goin on

  • @GNT-INPHINITHY
    @GNT-INPHINITHY 3 หลายเดือนก่อน

    So what jf you have your bot and you want to separate commands in folders how will you implement slash cmds

  • @NextLevelDev
    @NextLevelDev 4 หลายเดือนก่อน +4

    next episode when

    • @James_S
      @James_S  4 หลายเดือนก่อน +3

      Should be coming out in the next few days

    • @बीओटी
      @बीओटी 3 หลายเดือนก่อน +3

      @@James_S a few days huh...

    • @beedeefpv8930
      @beedeefpv8930 3 หลายเดือนก่อน +1

      @@James_Swhen

    • @mirandamarcaros
      @mirandamarcaros 2 หลายเดือนก่อน

      could you include the source code as well, pls

  • @VampireDLL
    @VampireDLL 4 หลายเดือนก่อน

    when i put the try and except in 15:27 it says on the async below and the except it says Expected indented block Pylance

  • @lilithgjahro-trpgandstoryt5123
    @lilithgjahro-trpgandstoryt5123 หลายเดือนก่อน

    I can't make slash command😢 I followed every step and do it again and still didn't work
    When I type / in discord chat box nothing from my bot appear 😢
    Help

    • @bennydog2021
      @bennydog2021 25 วันที่ผ่านมา

      same have u fixed urs yet?

    • @lilithgjahro-trpgandstoryt5123
      @lilithgjahro-trpgandstoryt5123 25 วันที่ผ่านมา

      @bennydog2021 yes I coppied my code sent to Chat GPT and asked it to fix my code and it works.. some how

    • @bennydog2021
      @bennydog2021 25 วันที่ผ่านมา

      @@lilithgjahro-trpgandstoryt5123 ah alright

  • @itzCookie64
    @itzCookie64 2 หลายเดือนก่อน

    how to link channel with bot?

  • @BillyMaurice
    @BillyMaurice 2 หลายเดือนก่อน +1

    I'm getting the "Error syncing commands: 403 Forbidden (error code: 50001): Missing Access". I've tried the things suggested in Stack Overflow but I'm still not getting the slash command to activate.

    • @fong8375
      @fong8375 หลายเดือนก่อน

      same here

    • @BillyMaurice
      @BillyMaurice หลายเดือนก่อน

      @@fong8375 Its been a little while so I forget the exact fix, but it was something with the permissions of the bot in the dashboard. I am not doing slash, im doing emoji reactions for my bot but I think I redid the permissions in the portal and it worked.

    • @spoken12e
      @spoken12e 16 วันที่ผ่านมา +1

      bot doesn't have permissions

  • @iimou3adkiller607
    @iimou3adkiller607 3 หลายเดือนก่อน +1

    Music bot pls !

  • @JustNars
    @JustNars หลายเดือนก่อน

    what was the vscode theme he was using?

    • @dawn5423
      @dawn5423 หลายเดือนก่อน

      hes not using vscode hes using pycharm

    • @JustNars
      @JustNars หลายเดือนก่อน

      @@dawn5423 Use your eyes pal.

  • @jcabreraa4
    @jcabreraa4 หลายเดือนก่อน

    Bro is in 2025 since October 🤣

  • @ISmellCapDog
    @ISmellCapDog 3 หลายเดือนก่อน

    Bro what the heck is that syntax on line 29? since when can you use a colon inside function arguments? I'm so confused. I know in some other languages you can use that to inherit a class but never have i seen that in python. And I'm having a hard time finding any documentation of that online. I know "@" is used to overload a method on line 28 but somebody help me out here.

    • @ISmellCapDog
      @ISmellCapDog 3 หลายเดือนก่อน +1

      Update: I understand it now. I had to ask Bing AI because I didn't know what to call that syntax. But apparently its called "Type Hints". In other languages you must declare the type of variable before setting it. in python we never had to do that. But after python 3.5 they added this for better code readability and error debugging. so basically you are just letting the interpreter and who ever is reading your code know, that "this variable: should be this type". if not then the discord module should have its on error detection to tell what problem occurred.

  • @TheRealElonMuSKLOL
    @TheRealElonMuSKLOL 4 หลายเดือนก่อน

    it justs run the hello feature

  • @daddyofalltrades
    @daddyofalltrades 3 หลายเดือนก่อน

    Thank you sooo much for the tutorial. !! You're the best ❤

  • @flumpy568
    @flumpy568 หลายเดือนก่อน

    did you purposely show your secret?

  • @milkywayish9315
    @milkywayish9315 3 หลายเดือนก่อน

    tragic 1 month ago

  • @SnachAgar
    @SnachAgar 4 วันที่ผ่านมา

    I don't wanna be mean, but horrible tutorial. This tutorial could have been finished in 5 minutes and u literally waste 20 minute of peoples time for no reason. Just go straight to the point and making people rewrite the code 3 times is very annoying as well.

  • @Fasky005
    @Fasky005 3 หลายเดือนก่อน

    Can anyone help me with my code? - in comment below

    • @Fasky005
      @Fasky005 3 หลายเดือนก่อน

      It doesn’t show any error in consol but the role isn’t given the commands work perfectly

    • @FascinatingFunAnimalFacts
      @FascinatingFunAnimalFacts 2 หลายเดือนก่อน

      @@Fasky005 logic error