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!
@daephx2 жыл бұрын
Don't you ever call 'hello, world' a cliche. I will use that as a placeholder until the day I die!
@themightykhan3720 Жыл бұрын
I get the print message that my commands are syncing, however nothing shows up on my server
@fahkyew77769 ай бұрын
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?
@MoneyThynker7 ай бұрын
same error
@DylanJava3 ай бұрын
For me I hit COMMAND & R (CTRL & R on Windows and Linux) to reload my discord.
@fahkyew77763 ай бұрын
I should have thought to update this. If anyone has the same problem I had, all you need to do is restart Discord. For whatever reason, new slash commands don't appear until you restart the application.
@averageperson341 Жыл бұрын
I copied exactly no errors but says 0 command(s) connected
@agnibhapal9 ай бұрын
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.
@mirzakurtovic5878 Жыл бұрын
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 Жыл бұрын
kinda late but this might help you prompt: str=None put this on the method
@lukas52382 жыл бұрын
Thanks Man now i can apply for the Developer Badge and create as many commands as i want for free. Keep it up
@clvrk80472 жыл бұрын
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.
@Cacetinho_11 ай бұрын
Thanks bro, nice tutorial! What theme do you use?
@glowstik11 ай бұрын
monakai julia
@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]")
@ashrithathmaram76312 жыл бұрын
I'm getting "Attribute error: 'Bot' object has no attribute 'tree'
@mad35672 жыл бұрын
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
@swodaw12472 жыл бұрын
@@mad3567 same thing happened to me, I replicated everything from the video.
@biplabchakraborty5014 Жыл бұрын
Use tree =commands.app_command(bot)
@flexnajnwsps Жыл бұрын
import the tree by in the on_ready thing put await bot.tree.sync()
@spinierkm427910 ай бұрын
the / commands are saying its synced but the commands arent showing up when i type / any idea why?
@moeddl7 ай бұрын
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
@ProgrammerPenguin11 ай бұрын
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?🤣
@M.Markovkin8 ай бұрын
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.
@badelbonillasimon4381 Жыл бұрын
thx u buddy this helped me to finish my bot. You teaches really good
@Comfy. Жыл бұрын
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 Жыл бұрын
Thank you for this tutorial, I had lots of problems with other videos but this one really helped.
@Izarden Жыл бұрын
AttributeError: 'Client' object has no attribute 'tree'....
@nargamer03 ай бұрын
Try replace it to bot
@BeefOSRS6 ай бұрын
This was really short and to the point. Well done. Maybe include a paste bin of the example code for reference in the description
@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
@Jonarella2 жыл бұрын
I loved this tutorial... However "Hello World" shall never die lmaooo
@immortalsun Жыл бұрын
Fantastic tutorial, thank you! Are you also using Copilot?
@glowstik Жыл бұрын
Yeah, thats how I got the code completion!
@dragonalley6443 Жыл бұрын
hey quick question what if i want one of the options to open a drop down menu of options they can select?
@RVZWN2 жыл бұрын
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?
@glowstik2 жыл бұрын
it requires discord.py 2.0
@RVZWN2 жыл бұрын
@@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..
@luucc_ss Жыл бұрын
what code editor do you use? it looks amazing!
@glowstik Жыл бұрын
Visual Studio Code and I've got the Julia Monakai Vibrant theme
@coding_guy Жыл бұрын
NOTHING WORKED EXCEPT THIS TYSM
@benno0_0 Жыл бұрын
the syncing part helped me alot! Thank you so much
@TechXSoftware Жыл бұрын
I subbed, I like your vids. :D
@WiIIiamL Жыл бұрын
God tier tutorial. Thanks so much!❤
@pitachu_s Жыл бұрын
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.
@CYKLER2 жыл бұрын
it says "discord.ext.commands.errors.CommandNotFound: Command "hello" is not found and the hello command does not work
@SirRiceBurger2 жыл бұрын
Thanks i was looking for a tutorial on this for so long and it finally helped.
@departition11692 жыл бұрын
Tysm, may I ask what compiler that you are using? It looks super nice
@glowstik2 жыл бұрын
I'm using visual studio code as the editor and the Sublime Monakai by Aryan Ahire theme
@departition11692 жыл бұрын
@@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
@PGCTalha Жыл бұрын
is it possible to still use embeds when using the slash commands, like you can with ctx?
@glowstik Жыл бұрын
yep, it works the same way also!
@FTYRL Жыл бұрын
what app do u use for the prediction and that? is it vs code, is it pycharm like what is it
@glowstik Жыл бұрын
i use github copilot (which is paid) although there is tabnine which is free
@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
@coolgammathecat56932 ай бұрын
unfortunately this didnt work for me because the commands dont show up
@kenezur Жыл бұрын
How do you connect this to the bot? Btw its really useful.
@glowstik Жыл бұрын
I just put in my bot token which I stored in another variable so it cant be stolen
@jc5947 Жыл бұрын
thanks for the tutorial!! Thank you very much for uploading this video ;)
@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 Жыл бұрын
yeah for slash commands alone you dpnt need any
@doctuh Жыл бұрын
i keep getting errors on line 14 ( except Exception as e: ) its saying invalid syntax... what should i do?
@krzechix2030 Жыл бұрын
Ayo what keyboard switches you got? they sound realll smooth
@glowstik Жыл бұрын
gatreon reds, just modded the case with some foam
@chillanomican Жыл бұрын
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
@drdonk_auf_die_1_xd Жыл бұрын
amazing tutorial, keep up the work bro
@PogoDigitalism Жыл бұрын
yo ty for this vid, littl equestion, how do i add descriptions to the commands and make them optional/required?
@glowstik Жыл бұрын
you can add a required=True to make it required and you can add command descriptions in the decorator.
@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 Жыл бұрын
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
@chrissam6026 Жыл бұрын
What program are you using for this
@realKarlHealy2 жыл бұрын
help pls, I got an error: ImportError: cannot import name 'app_commands' from 'discord'
@worty322 жыл бұрын
same here
@twguy69 Жыл бұрын
Thanks. Exactly what I needed.
@samarthd.n.2314 Жыл бұрын
But how to categorize or create a sperate help command for the slash commands?
@svendiamond2 жыл бұрын
how did your slash commands work when you put an exclamation point as your command prefix?
@glowstik2 жыл бұрын
i'm not using bot.command() and so I can use whatever prefix I want and it will still not work.
@gustavolondono8691 Жыл бұрын
Really great tutorial! Thank you very much!
@d3nt391 Жыл бұрын
How would you access the context (ctx) in order to get things like discord attachments in a message? Thanks!
@glowstik Жыл бұрын
unfortunately, slash commands use interactions and not ctx so you would have to find work arounds to getting what you need through interactions.
@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 Жыл бұрын
They should remove them selves if you delete it from the code, you can also manually delete it from the server settings
@kibaofficial6332 Жыл бұрын
@@glowstik oh sure true becaus when in start the bot the commands get new synced thanks man ^^'
@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.
@zreplaysguides2 жыл бұрын
How to add a description to the command itself?
@glowstik2 жыл бұрын
You can just use the description argument in the decorator
@zreplaysguides2 жыл бұрын
@@glowstik ye. Got it, thanks.
@므네모시네클랜기록보 Жыл бұрын
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 Жыл бұрын
you can not have spaces in your slash command name
@eweeeer2 жыл бұрын
how to do it but instead of sending a message, it sends out the user avatar ?
@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?
@BuddyWinteOfficial9 ай бұрын
Use channel = bot.get_channel(your channel id) and then use channel.send to send a second message.
@studiotutorial8 ай бұрын
instead of using send_message again, use interaction.channel.send() and just mention
@Kaenzy.3 ай бұрын
Can you do with discord webhooks?
@glowstik3 ай бұрын
alr did bro kzbin.info/www/bejne/rarWk6yffLOEfqc
@Kaenzy.3 ай бұрын
@@glowstik oh, thanks! Didnt saw, sorry
@fahnub Жыл бұрын
Thanks for this dawg
@metrowave_ Жыл бұрын
For the first slash command I followed everything, but it says "(" was not closed. What can I do to fix it?
@junescript Жыл бұрын
did you find a fix for this?
@Topher7lol9 ай бұрын
so the ( must have a closing bracket, opposite to the first one, which would be )
@tiygar8548 Жыл бұрын
bro, is this vscode, if yes how did you make it fill the lines like that easily?
@glowstik Жыл бұрын
Yeah, I have github copilot so it helps me when coding by auto filling code that I might use.
@dawrrrr4 ай бұрын
Was wondering if i could use an embed with this
@glowstik4 ай бұрын
yeah you can, its just like any other message so you can do all the same things with it
@dawrrrr4 ай бұрын
@glowstik I'm having a little trouble with it can u perhaps show me how 😅
@kenner__ Жыл бұрын
Why i have error - in interaction.response.send_message unknown parameter "interaction"? Please help!
@Topher7lol9 ай бұрын
interaction must equal discord.Interaction (captial i)
@kenner__9 ай бұрын
@@Topher7lol niceee response after 7 months
@Rjjwsn Жыл бұрын
theres no errors but if i do slash nothing shows up and if i put /hello or /say nothing came up
@circuitcoder Жыл бұрын
The program needs to be running while you try the command
@iam_sk_ Жыл бұрын
4:16 Work smarter not harder😂
@SapiPlays2 жыл бұрын
Your auto fill for commands, How did you set that up? Can you tell us?
@glowstik2 жыл бұрын
Thats automaticly built in to discord lol
@SapiPlays2 жыл бұрын
@@glowstik I am talking about VS code. My VS code doesn't prompt codes like that
@glowstik2 жыл бұрын
@@SapiPlays ohh, I use github copilot but you can also use tabnine.
@Keegan-T Жыл бұрын
is there a way to hide certain commands from users?
@MrBossclub Жыл бұрын
Hey can u help me to make slash commands in my scrip possible?
@kthefreak4 ай бұрын
it WORKED thanks a lot
@CrunchySpon Жыл бұрын
Is there any variable for the message itself (like the "/hello" itself)?
@studiotutorial8 ай бұрын
@app_commands.describe(var = "Variable)
@KonigTheV4 ай бұрын
sooo helpfull❤
@kno_01 Жыл бұрын
you deserve a sub man
@carboi4022 жыл бұрын
how did you get that italic f thing?
@jareimefilm8480 Жыл бұрын
Great video! Can you provide a documentary?
@fisti12082 жыл бұрын
Is there a way to make describe with spaces? 'cause underlines and other stuff kinda sucks :c
@probablyalive64702 жыл бұрын
since those are variable names, no
@studiotutorial8 ай бұрын
womp womp
@rophil95512 жыл бұрын
Why are we not using a wrapper like pycord or something
@glowstik2 жыл бұрын
well it was quite asked for and dpy now has slash commands... also dpy is also a wrapper lmao
@stevehiatt5342 жыл бұрын
Very useful! Thanks
@phynae Жыл бұрын
@app_commands.describe(thing_to_say = "Something") causes an error for me. TypeError: unknown parameter given: item_name
@Soap2morrow Жыл бұрын
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!! 😭
@ThatFoxiee4 ай бұрын
when i add more commands, why don't they show up?
@glowstik4 ай бұрын
They might take some time to show up, you can also try creating a sync command and running that to speed up the proccess
@ThatFoxiee4 ай бұрын
@@glowstik I already fixed it, but thank you!
@The1AndOnii Жыл бұрын
Object method can’t be used in „await“ expression
@n1klasli Жыл бұрын
Wen haben wir denn da 😂
@The1AndOnii Жыл бұрын
@@n1klasli kennen wir uns ?
@randompersongm3 ай бұрын
None of the commands are syncing
@pug39912 жыл бұрын
ITS ALIVE! (ty)
@animationsbelike2 жыл бұрын
thank you so much! I guess with this you can get the new batch or i hope so! :) xd
@glowstik2 жыл бұрын
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!
@animationsbelike2 жыл бұрын
@@glowstik okay thank you! :)
@animationsbelike2 жыл бұрын
for some reason i cant start the bot with bot.run("my token") do you know why? :)
@animationsbelike2 жыл бұрын
edit: it works now! thank you so much :)
@Cometbolide Жыл бұрын
Hi, I use VSC and it says I cannot import app_commands from discord. Is there a reason why?
@glowstik Жыл бұрын
you may need to update discord.py
@Cometbolide Жыл бұрын
@@glowstik How would I do that?
@Cometbolide Жыл бұрын
@@glowstik So, I tried updating it, but it doesn't work still.
@THEMASTER10121 Жыл бұрын
Same here. Tried updating it and still didnt work
@BlueBloodGamerz Жыл бұрын
is there way to make slash and prefix both work for command
@glowstik Жыл бұрын
you can use hybrid commands which would make the command both a slash and prefix command discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.HybridCommand
@BlueBloodGamerz Жыл бұрын
@@glowstik can u tell me how can i embed smthing in slassh it just show
@fomy2176 Жыл бұрын
Thanks so much !!
@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 Жыл бұрын
chatgpt :D
@BuilderDeveloper2 жыл бұрын
hey what's your vs code theme?
@glowstik2 жыл бұрын
Sublime Monokai by Aryan Ahire
@BuilderDeveloper2 жыл бұрын
@@glowstik bro i wanna say to you one thing. you are amazing about that focus on yourself and go to 10k followers
@melchoir552 жыл бұрын
Good video. Needs a github link with the completed code.
@dev_snips Жыл бұрын
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!
@yager4006 ай бұрын
Hi, it work but I don’t see the commands
@BigMemes-jd3tb11 ай бұрын
thanks bro ❤
@eIixi5 ай бұрын
how about user commands?
@noodle69 Жыл бұрын
wow, thank you so much
@MIMI-oo5mz8 ай бұрын
how did you make this "F"?
@CagierHorizon Жыл бұрын
How do you make a subcommand using bot.tree.command()
@sharkkk2314 Жыл бұрын
can I make the commands require prems?
@glowstik Жыл бұрын
Yep! Discord has a built in decorator for this, here are the docs with an example to get you started discordpy.readthedocs.io/en/stable/interactions/api.html#discord.app_commands.checks.has_permissions