[NEW] Slash Commands in Less than 10 Minutes Using Discord.PY

  Рет қаралды 106,405

Glowstik

Glowstik

Жыл бұрын

Hey!
Thanks for watching today's video, I hope you enjoyed and joined my discorddd... also thanks for 3.63K subscribers!!
LINKS -
Join my Discord - / discord
Learn Bot Dev - • [NEW 2023] How to crea...
Learn Nextcord Slash Commands - • [UPDATED] Discord Slas...
------------------
Thanks if you read all of this and I hope you have a great day!
BYEEEE

Пікірлер: 231
@ZonkedOutTCM
@ZonkedOutTCM Жыл бұрын
first tutorial that actually worked in the end. i tried dozens of tutorials because i want the badge but didnt want to go the sketchy route and wanted to try to learn something while doing it. worked like a charm, and i ended up refreshing my memory of programming things as well , thanks! was fun!
@clvrk8047
@clvrk8047 Жыл бұрын
Good job dude, just jumping back into coding and was a bit rusty. Finally got around to updating my bot thanks to your video. Keep it up.
@daephx
@daephx Жыл бұрын
Don't you ever call 'hello, world' a cliche. I will use that as a placeholder until the day I die!
@Comfy.
@Comfy. 11 ай бұрын
Thank you so much bro this is an amazing tutorial! I've been trying to find videos that could help me and I finally found the one! You are such a talented programmer! Your tutorial was amazing and now my bot works now! Keep up the great work! Again, Thank you so much again!!!
@realferdimeiert
@realferdimeiert Жыл бұрын
Thank you for this tutorial, I had lots of problems with other videos but this one really helped.
@lukas5238
@lukas5238 Жыл бұрын
Thanks Man now i can apply for the Developer Badge and create as many commands as i want for free. Keep it up
@badelbonillasimon4381
@badelbonillasimon4381 Жыл бұрын
thx u buddy this helped me to finish my bot. You teaches really good
@turagchoi_
@turagchoi_ Жыл бұрын
the syncing part helped me alot! Thank you so much
@SirRiceBurger
@SirRiceBurger Жыл бұрын
Thanks i was looking for a tutorial on this for so long and it finally helped.
@WiIIiamL
@WiIIiamL Жыл бұрын
God tier tutorial. Thanks so much!❤
@mirzakurtovic5878
@mirzakurtovic5878 11 ай бұрын
Great tutorial! I have been struggling to understand the documentation so this really helped a lot. Just one question if you know, how do you make a parameter optional? Is there a flag for it or do you have to manually code the logic?
@rhenzduyag5868
@rhenzduyag5868 11 ай бұрын
kinda late but this might help you prompt: str=None put this on the method
@gustavolondono8691
@gustavolondono8691 Жыл бұрын
Really great tutorial! Thank you very much!
@dev_snips
@dev_snips 11 ай бұрын
I had forgotten how to use arguments within my slash commands and couldn't find anybody explaining in a simple way. I really appriciate how this was explained and how simplified the code is compared to other people's tutorials. Very good job!
@themightykhan3720
@themightykhan3720 Жыл бұрын
I get the print message that my commands are syncing, however nothing shows up on my server
@twguy69
@twguy69 Жыл бұрын
Thanks. Exactly what I needed.
@agnibhapal
@agnibhapal 4 ай бұрын
it works :D for the second time, first time it worked and then I forgot about this channel I did subscribe but I forgot the channel name, now I will remember it.
@BeefOSRS
@BeefOSRS Ай бұрын
This was really short and to the point. Well done. Maybe include a paste bin of the example code for reference in the description
@Jonarella
@Jonarella Жыл бұрын
I loved this tutorial... However "Hello World" shall never die lmaooo
@fahnub
@fahnub Жыл бұрын
Thanks for this dawg
@stevehiatt534
@stevehiatt534 Жыл бұрын
Very useful! Thanks
@coding_guy
@coding_guy Жыл бұрын
NOTHING WORKED EXCEPT THIS TYSM
@pitachu_s
@pitachu_s 11 ай бұрын
Is it possible to build the command tree to sync using cogs ? That would be great to update commands with a list based arguments input.
@dragonalley6443
@dragonalley6443 Жыл бұрын
hey quick question what if i want one of the options to open a drop down menu of options they can select?
@TechXSoftware
@TechXSoftware Жыл бұрын
I subbed, I like your vids. :D
@republicgamer6998
@republicgamer6998 Жыл бұрын
Thanks for your help, really helped me here I almost gonna scrap my code and move to pycord but any ideas about the cogs?
@glowstik
@glowstik Жыл бұрын
its pretty much the same thing, you can also just check their examples at github.com/Rapptz/discord.py/blob/master/examples/app_commands/basic.py
@bummbumm6
@bummbumm6 7 ай бұрын
amazing tutorial, keep up the work bro
@NullableIsLive
@NullableIsLive Жыл бұрын
it gives me this error:Client does not have an application_id set. Either the function was called before on_ready was called or application_id was not passed to the Client constructor
@fomy2176
@fomy2176 11 ай бұрын
Thanks so much !!
@welshtony1
@welshtony1 Жыл бұрын
This actually worked but how do I get it to work with current commands in Cogs? Can't seem to get them to work
@Cacetinho_
@Cacetinho_ 5 ай бұрын
Thanks bro, nice tutorial! What theme do you use?
@glowstik
@glowstik 5 ай бұрын
monakai julia
@samarthd.n.2314
@samarthd.n.2314 Жыл бұрын
But how to categorize or create a sperate help command for the slash commands?
@doctuh
@doctuh 10 ай бұрын
i keep getting errors on line 14 ( except Exception as e: ) its saying invalid syntax... what should i do?
@departition1169
@departition1169 Жыл бұрын
Tysm, may I ask what compiler that you are using? It looks super nice
@glowstik
@glowstik Жыл бұрын
I'm using visual studio code as the editor and the Sublime Monakai by Aryan Ahire theme
@departition1169
@departition1169 Жыл бұрын
@@glowstik tysm I didn't know dpy supported slash commands till somebody told me on discord. Glad I know how to add slash commands instead doing the old way
@ProgrammerPenguin
@ProgrammerPenguin 5 ай бұрын
how does the ide tells you error as you're typing? like when you typed try: it said it must have an exception. is it a vscode extension or are you even using vscode?🤣
@immortalsun
@immortalsun Жыл бұрын
Fantastic tutorial, thank you! Are you also using Copilot?
@glowstik
@glowstik Жыл бұрын
Yeah, thats how I got the code completion!
@chillanomican
@chillanomican 6 ай бұрын
can someone help me, I have installed discord with pip3 since pip doesnt work & it keeps saying it cant connect to discord when I click run
@a_programer
@a_programer Жыл бұрын
I LOVE YOU I FUCKING LOVE YOU FIRST TUTORIAL THAT ACTUALLY WORKS NOTHING ELSE WORKED NOT MY BRAIN NOT TUTORIALS NOT CHAT GPT BUT YOU DID THANK YOU
@shyzuko
@shyzuko Жыл бұрын
chatgpt :D
@clay2889
@clay2889 Жыл бұрын
Thank you!
@M.Markovkin
@M.Markovkin 3 ай бұрын
Hey bro, thanks for this tutorial, but I need to enable the command only for one of my servers. How can I do it? How do I call a snowflake? Here's the string from the docs: guild (Optional[Snowflake]) - The guild to add the command to. If not given or None then it becomes a global command instead. I can't understand how to call a snowflake.
@gavinthecrafter
@gavinthecrafter Жыл бұрын
Thank you for this tutorial! Do you know which intents this bot requires? I can't get the bot to work and I don't want to set all intents as that's very dangerous
@glowstik
@glowstik Жыл бұрын
yeah for slash commands alone you dpnt need any
@BigMemes-jd3tb
@BigMemes-jd3tb 6 ай бұрын
thanks bro ❤
@kno_01
@kno_01 Жыл бұрын
you deserve a sub man
@PGCTalha
@PGCTalha Жыл бұрын
is it possible to still use embeds when using the slash commands, like you can with ctx?
@glowstik
@glowstik Жыл бұрын
yep, it works the same way also!
@PogoDigitalism
@PogoDigitalism Жыл бұрын
yo ty for this vid, littl equestion, how do i add descriptions to the commands and make them optional/required?
@glowstik
@glowstik Жыл бұрын
you can add a required=True to make it required and you can add command descriptions in the decorator.
@noodle69
@noodle69 Жыл бұрын
wow, thank you so much
@fahkyew7776
@fahkyew7776 3 ай бұрын
I printed the results of bot.tree.sync() and saw that both the commands I coded are, in fact, in the command tree, but when I type / in my test server, the slash commands I made don't appear. Any idea what might have gone wrong?
@MoneyThynker
@MoneyThynker Ай бұрын
same error
@jareimefilm8480
@jareimefilm8480 Жыл бұрын
Great video! Can you provide a documentary?
@pug3991
@pug3991 Жыл бұрын
ITS ALIVE! (ty)
@eweeeer
@eweeeer Жыл бұрын
how to do it but instead of sending a message, it sends out the user avatar ?
@averageperson341
@averageperson341 Жыл бұрын
I copied exactly no errors but says 0 command(s) connected
@huntlazy_original
@huntlazy_original Жыл бұрын
Thanks!
@Keegan-T
@Keegan-T Жыл бұрын
is there a way to hide certain commands from users?
@chrissam6026
@chrissam6026 Жыл бұрын
What program are you using for this
@melchoir55
@melchoir55 Жыл бұрын
Good video. Needs a github link with the completed code.
@luucc_ss
@luucc_ss Жыл бұрын
what code editor do you use? it looks amazing!
@glowstik
@glowstik Жыл бұрын
Visual Studio Code and I've got the Julia Monakai Vibrant theme
@mcdondagd
@mcdondagd Жыл бұрын
how can I add a description to the command, like the ones below the command name when you go to slash commands. Also the ephemeral thing is what makes it only appear to the person who ran the command right EDIT: NVM I found it, and to anyone wondering the same thing, it's quite simple. you just change @bot.tree.command(name="[your command]") to @bot.tree.command(name="[your command]", description ="[whatever description you want]")
@nitin9725
@nitin9725 Жыл бұрын
how did you get that italic f thing?
@MrBossclub
@MrBossclub Жыл бұрын
Hey can u help me to make slash commands in my scrip possible?
@Nevvyboi
@Nevvyboi Жыл бұрын
Amazng video bro
@Izarden
@Izarden 6 ай бұрын
AttributeError: 'Client' object has no attribute 'tree'....
@animationsbelike
@animationsbelike Жыл бұрын
thank you so much! I guess with this you can get the new batch or i hope so! :) xd
@glowstik
@glowstik Жыл бұрын
you may have to wait 24h for it to register and also have a friend or alt run the command just to make sure you get it!
@animationsbelike
@animationsbelike Жыл бұрын
@@glowstik okay thank you! :)
@animationsbelike
@animationsbelike Жыл бұрын
for some reason i cant start the bot with bot.run("my token") do you know why? :)
@animationsbelike
@animationsbelike Жыл бұрын
edit: it works now! thank you so much :)
@BennoCrafterDev
@BennoCrafterDev Жыл бұрын
thank u its to nice
@Soap2morrow
@Soap2morrow 8 ай бұрын
I’ve been looking for a tutorial on how to do slash commands for 2 months now. Thank you so much for making this video!! 😭
@spinierkm4279
@spinierkm4279 4 ай бұрын
the / commands are saying its synced but the commands arent showing up when i type / any idea why?
@moeddl
@moeddl Ай бұрын
You have to give the roles on your Server Permissions. Go into your Settings of the Server and klick onto integrations and then onto your bot. There you will see your commands. You can add some roles there
@krzechix2030
@krzechix2030 9 ай бұрын
Ayo what keyboard switches you got? they sound realll smooth
@glowstik
@glowstik 9 ай бұрын
gatreon reds, just modded the case with some foam
@user-vq9hi2eu3z
@user-vq9hi2eu3z Жыл бұрын
How can I solve the error ValueError: 'activation comfirm' must be between 1-32 characters and contain only lower-case letters, numbers, hyphens, or underscores.
@glowstik
@glowstik Жыл бұрын
you can not have spaces in your slash command name
@svendiamond
@svendiamond Жыл бұрын
how did your slash commands work when you put an exclamation point as your command prefix?
@glowstik
@glowstik Жыл бұрын
i'm not using bot.command() and so I can use whatever prefix I want and it will still not work.
@d3nt391
@d3nt391 9 ай бұрын
How would you access the context (ctx) in order to get things like discord attachments in a message? Thanks!
@glowstik
@glowstik 9 ай бұрын
unfortunately, slash commands use interactions and not ctx so you would have to find work arounds to getting what you need through interactions.
@Asrilui
@Asrilui Жыл бұрын
I tried a lot of things, this is the only working thing for me!
@Tom-JS
@Tom-JS Жыл бұрын
Thanks it works
@dingies.
@dingies. Жыл бұрын
When I type line 19 (from video), it keeps saying "File "(directory)", line 19 await interaction.response.send_message(f"Hey {interaction.user.mention}! This is a slash command!" ephemeral=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma?", how do I fix this?
@glowstik
@glowstik Жыл бұрын
it should be (f"Hey {interaction.user.mention}! This is a slash command!", ephemeral=True) lol
@DJFVR
@DJFVR Жыл бұрын
what app do u use for the prediction and that? is it vs code, is it pycharm like what is it
@glowstik
@glowstik Жыл бұрын
i use github copilot (which is paid) although there is tabnine which is free
@CrunchySpon
@CrunchySpon Жыл бұрын
I need help with smth. I wanna make a command that is a reminder, so it has to be responded to twice (1 time to confirm the reminder and the other one to actually remind the person.) but when it gets to the 2nd response it gives me the error: "InteractionResponded: This interaction has already been responded to before". Is there any way to fix this?
@BuddyWinteOfficial
@BuddyWinteOfficial 4 ай бұрын
Use channel = bot.get_channel(your channel id) and then use channel.send to send a second message.
@studiotutorial
@studiotutorial 2 ай бұрын
instead of using send_message again, use interaction.channel.send() and just mention
@CrunchySpon
@CrunchySpon Жыл бұрын
Is there any variable for the message itself (like the "/hello" itself)?
@studiotutorial
@studiotutorial 2 ай бұрын
@app_commands.describe(var = "Variable)
@CYKLER
@CYKLER Жыл бұрын
it says "discord.ext.commands.errors.CommandNotFound: Command "hello" is not found and the hello command does not work
@yager400
@yager400 Ай бұрын
Hi, it work but I don’t see the commands
@ecommercewithjay8857
@ecommercewithjay8857 23 күн бұрын
worked perfectly for me.
@eIixi
@eIixi 9 күн бұрын
how about user commands?
@simsekgamer5252
@simsekgamer5252 7 ай бұрын
hey its saying app not defined
@realKarlHealy
@realKarlHealy Жыл бұрын
help pls, I got an error: ImportError: cannot import name 'app_commands' from 'discord'
@worty32
@worty32 Жыл бұрын
same here
@MIMI-oo5mz
@MIMI-oo5mz 3 ай бұрын
how did you make this "F"?
@RemiTheFiend
@RemiTheFiend 10 ай бұрын
How do you make a subcommand using bot.tree.command()
@diavolovinegar5372
@diavolovinegar5372 Жыл бұрын
Nice 👍
@f00tyBa11
@f00tyBa11 Жыл бұрын
theres no errors but if i do slash nothing shows up and if i put /hello or /say nothing came up
@circuitcoder
@circuitcoder Жыл бұрын
The program needs to be running while you try the command
@kibaofficial6332
@kibaofficial6332 Жыл бұрын
do you have also a video to remove a command again? i made a lot of bullshit yesterday in my code and want to remove some commands but i know that i have to do more then just delete them from the code
@glowstik
@glowstik Жыл бұрын
They should remove them selves if you delete it from the code, you can also manually delete it from the server settings
@kibaofficial6332
@kibaofficial6332 Жыл бұрын
@@glowstik oh sure true becaus when in start the bot the commands get new synced thanks man ^^'
@immortalsun
@immortalsun Жыл бұрын
@@glowstik For some reason, my commands stay even when rebooting the bot without the command code, and there’s no option to delete it in the integrations settings.
@Presterboi
@Presterboi Жыл бұрын
i cant type that italic f.
@Mango-dj2gg
@Mango-dj2gg Жыл бұрын
Please make a whole series like how to make a advance multi purpose bot in python pls
@tiygar8548
@tiygar8548 Жыл бұрын
bro, is this vscode, if yes how did you make it fill the lines like that easily?
@glowstik
@glowstik Жыл бұрын
Yeah, I have github copilot so it helps me when coding by auto filling code that I might use.
@kenner__
@kenner__ 11 ай бұрын
Why i have error - in interaction.response.send_message unknown parameter "interaction"? Please help!
@Topher7lol
@Topher7lol 3 ай бұрын
interaction must equal discord.Interaction (captial i)
@kenner__
@kenner__ 3 ай бұрын
@@Topher7lol niceee response after 7 months
@fisti1208
@fisti1208 Жыл бұрын
Is there a way to make describe with spaces? 'cause underlines and other stuff kinda sucks :c
@probablyalive6470
@probablyalive6470 Жыл бұрын
since those are variable names, no
@studiotutorial
@studiotutorial 2 ай бұрын
womp womp
@metrowave_
@metrowave_ 10 ай бұрын
For the first slash command I followed everything, but it says "(" was not closed. What can I do to fix it?
@ryanharrison1971
@ryanharrison1971 10 ай бұрын
did you find a fix for this?
@Topher7lol
@Topher7lol 3 ай бұрын
so the ( must have a closing bracket, opposite to the first one, which would be )
@rophil9551
@rophil9551 Жыл бұрын
Why are we not using a wrapper like pycord or something
@glowstik
@glowstik Жыл бұрын
well it was quite asked for and dpy now has slash commands... also dpy is also a wrapper lmao
@fentables
@fentables 6 ай бұрын
bro it says "Synced 0 commands"
@RVZWN
@RVZWN Жыл бұрын
It doesn t work for me, what version of discord or python do you need, youu need nextcord and not discord? Or Pycord? 0_o?
@glowstik
@glowstik Жыл бұрын
it requires discord.py 2.0
@RVZWN
@RVZWN Жыл бұрын
@@glowstik as soon as I wrote this I made it work on PyCharm... however I'm using a hosting platfom where my files are stored in there, but it doesn t work because now I see that my discord.py is v1.7.3... so that was the problem.. I want to change it but I don t know how..
@v1Dice
@v1Dice 8 ай бұрын
where's the src
@kenezur
@kenezur Жыл бұрын
How do you connect this to the bot? Btw its really useful.
@glowstik
@glowstik Жыл бұрын
I just put in my bot token which I stored in another variable so it cant be stolen
@hi-kt3qr
@hi-kt3qr Жыл бұрын
cogs example please
@user-fz1lv4ju1z
@user-fz1lv4ju1z 16 күн бұрын
this is valid
@MuslimBlud
@MuslimBlud 5 ай бұрын
I don’t even know how to open this script page :/
@ashrithathmaram7631
@ashrithathmaram7631 Жыл бұрын
I'm getting "Attribute error: 'Bot' object has no attribute 'tree'
@mad3567
@mad3567 Жыл бұрын
it's either something wrong with the discord.ext library, or how you used "commands.Bot" (see line 6 from the video) I couldn't replicate the problem, so if you send more info that'd help
@swodaw1247
@swodaw1247 Жыл бұрын
@@mad3567 same thing happened to me, I replicated everything from the video.
@biplabchakraborty5014
@biplabchakraborty5014 Жыл бұрын
Use tree =commands.app_command(bot)
@flexnajnwsps
@flexnajnwsps Жыл бұрын
import the tree by in the on_ready thing put await bot.tree.sync()
I tried Discord Bot Makers...
14:19
FaceDev
Рет қаралды 99 М.
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 10 МЛН
WHAT’S THAT?
00:27
Natan por Aí
Рет қаралды 6 МЛН
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 13 МЛН
Scary Teacher 3D Nick Troll Squid Game in Brush Teeth White or Black Challenge #shorts
00:47
How to Make a Discord Bot with Python
29:17
pixegami
Рет қаралды 54 М.
Can You Get Every Discord Badge?
9:44
No Text To Speech
Рет қаралды 2,3 МЛН
Showing a Craigslist scammer who's boss using Python
5:27
Engineer Man
Рет қаралды 6 МЛН
Can I Run Youtube Entirely From My Terminal? (No Browser)
15:31
How To Add Autocompletion To Your Discord Slash Commands
6:25
Richard Schwabe
Рет қаралды 15 М.
Level Up your Discord Server with Onboarding
13:16
No Text To Speech
Рет қаралды 440 М.
Klavye İle Trafik Işığını Yönetmek #shorts
0:18
Osman Kabadayı
Рет қаралды 3,9 МЛН
$1 vs $100,000 Slow Motion Camera!
0:44
Hafu Go
Рет қаралды 23 МЛН
OZON РАЗБИЛИ 3 КОМПЬЮТЕРА
0:57
Кинг Комп Shorts
Рет қаралды 1,8 МЛН
Здесь упор в процессор
18:02
Рома, Просто Рома
Рет қаралды 344 М.