Hi everyone! I did an updated version of this video recently which you can view here: kzbin.info/www/bejne/imbQoIVrnKefmK8 I explained a lot more in depth about how discord.py works. Also I showed how to use environment variables to store your tokens so they won't get leaked if you push your code to github!
@thatweirdsymbol3 жыл бұрын
"the like goal for this video will be 15 likes" *gets 2k likes*
@itzchimchar42334 жыл бұрын
if you want your command to work whether or not there is capitals use client = commands.Bot(command_prefix="-", case_insensitive=True) however it will enable it for all commands
@EXUMOUS4 жыл бұрын
dude i think that after watching over 20 videos on this topic this is the best , thanks swastik!
@MrAll-ng9qz4 жыл бұрын
good to see that finally indians teach discord
@unknownentity73333 жыл бұрын
XD
@AncientARofficial3 жыл бұрын
Hahah
@arshrng4 жыл бұрын
8:06 An easier way to run it is by pressing ctrl+shift+B
@pawanarasu80893 жыл бұрын
Bro!!!! best short tutorial ever seen and tried (which actually works ) Thanks a lot.😎😎
@modderslab20343 жыл бұрын
thx man u explained it very well u earned a sub
@voh82104 жыл бұрын
This guy deserves more sub
@pawanarasu80893 жыл бұрын
completely true
@BrainDamageNeko3 жыл бұрын
Thank you so much for explaining the basic details so well! Much appreciated! Note: If you're using an environment like VSCode you can run the file inside the environment, and opening it in CMD/Terminal won't be required.
@dev_snips4 жыл бұрын
Got a bit bored with doing nothing and decided to create myself a discord bot. Found your tutorial so simple to follow and understand! Thanks a ton :)
@CodeWithSwastik4 жыл бұрын
You're welcome 😄
@vcokltfre3 жыл бұрын
I have a few points to make about this tutorial: 1) You give the bot the 'Administrator' permission while inviting it - Do not do this. Take the time to correctly work out which permissions your bot needs and only add them. Using more permissions than you need is lazy and a security risk. 2) You use 'pip install discord' - this is not the same as discord.py, it's a mirror and may not be up to date - Instead use 'pip install discord.py' 3) You name your bot variable 'client' which is bad naming practise and will only serve to confuse you or those who try to help you - Instead, name it 'bot' - sincerely, someone who has to deal with people naming it client. 4) You put the bot token in the main file, hardcoded in, without even a single mention that this is a very bad practice - Instead, you should make a .env file and use the 'python-dotenv' module to load it as an environment variable
@jjkydyt30113 жыл бұрын
"practise" practice* :)
@techingenius25402 жыл бұрын
@@jjkydyt3011 he could be british
@soralol6904 жыл бұрын
ok so, right at 8:17 when i do that command it loads but then just repeats itself on the command im trying to do.. im not good at explaining but for example ill use whats in the video. once i do C:\Users\swast\Desktop\Tutorial Bot>bot.py it would load for like 5 seconds then it would just repeat the same thing, the bot doesn't go online. help maybe? i prob didnt explain anything correctly in this comment but somebody please, help lol.
@Uncreeperble4 жыл бұрын
Soo close to 1k subs man hope u make it soin
@offensivename37124 жыл бұрын
When I install discord on cmd it doesn’t tell me it’s done installing
@CodeWithSwastik4 жыл бұрын
What is the exact problem? I think you didn't add Python to path. That's why PIP isn't working. Try installing python again. If you still face problems join my server I'll help you out.
@primedust14 жыл бұрын
@@CodeWithSwastik in last step the cmd will try to open the file even tho i did excactly the same stuf
@kinnycodm40444 жыл бұрын
@@CodeWithSwastik can u help ,e?
@endervisualsolddeadivemove25923 жыл бұрын
same
@keenkxx4 жыл бұрын
i need help, i've done everything in the video and when i try to run the file by C:\Users\USER\Desktop\Itachi sama>bot.py nothing comes up, and the bot is still offline.
@poopybutt69donttouchtail4 жыл бұрын
You need to keep the cmd prompt open, that's why people say "the bot is down" because the people who created the bot closed the cmd prompt i think.
@keenkxx4 жыл бұрын
@@poopybutt69donttouchtail is there a way to keep the bot up without even having ur pc on?
@susanthcp4 жыл бұрын
@@keenkxx use a hosting service
@abhaygamer-cu5fx4 жыл бұрын
@@keenkxx yes you can host your own bot... for 24/7
@keenkxx4 жыл бұрын
@@susanthcp is it free?
@aditdobhal3 жыл бұрын
Like target "15" likes Oh My Gah! Good going bro
@wingmanup73683 жыл бұрын
In command prompt when i try to start the program to get the bot online it says " line 4, in client = commands.bot(command_prefix="f") TypeError: 'module' object is not callable " How do I fix this?
@modoulaminceesay92114 жыл бұрын
thanks i like how you make the basics so easy to understand
@neeil_xd17144 жыл бұрын
'pip' is not recognized as an internal or external command, operable program or batch file. error comin
@emblcm4 жыл бұрын
same
@neeil_xd17144 жыл бұрын
@@emblcm bro i found the solution
@Isaac-uu5rl4 жыл бұрын
@@neeil_xd1714 what is it
@emblcm4 жыл бұрын
@@neeil_xd1714 what is it please helpppp
@emblcm4 жыл бұрын
@@neeil_xd1714 dudeeee plssss
@gameon10894 жыл бұрын
Thanks man you are only one who gave me this knowledge
@CodeWithSwastik4 жыл бұрын
Glad to hear that
@gameon10894 жыл бұрын
@@CodeWithSwastik bro my bot goes offline when I close my pc how to solve that??
@rbxless4 жыл бұрын
@@gameon1089 U will have to host your bot on a VPS :/
@thyboigabe55623 жыл бұрын
when i say "bot.py" it says "Traceback (most recent call last): File "C:\Users\seanw\Desktop\Albert.exe\bot.py", line 2, in from discord.exe import commands ModuleNotFoundError: No module named 'discord.exe'" what i do lol?
@mrropersworld4 жыл бұрын
Error when pip install discord Building wheel for multidict (PEP 517) ... error ERROR: Command errored out with exit status 1:
@D499-d3z4 жыл бұрын
Make sure youre using command prompt not some .py file or command line
@maximum-trollage4 жыл бұрын
Pro tip: just do Ctrl+B to run the script. (Sublime only)
my code is import discord from discord.ext import commands client = commands.Bot(command_prefix=">") @client.event async def on_ready(): print("Bot is ready") @client.command() async def hello(ctx): await ctx.send("Hi") client.run("[token but i dont want to share it]")
@CodeWithSwastik4 жыл бұрын
You wrote commands_prefix, it's command_prefix without the s
@dagdbot833 жыл бұрын
@@CodeWithSwastik this is my code client = commands.Bot(command.prefix=",") But it says I need to use "==" and when I did it still gives an error
@scramble18413 жыл бұрын
hey bruh ? my bot goes auto matically offline why ??
@mightygamer63443 жыл бұрын
Did u close the command prompt
@fikajlo4 жыл бұрын
for some reason, I can't get commands to work with my bot using this @client.command() async def hello(ctx): await ctx.send("Hi") but it works this way if message.content.lower().startswith("bot are you still working?"): await message.channel.send("Yes") why do I have this problem and how can I fix it?
@CodeWithSwastik4 жыл бұрын
Hmm, what error do you get when you use the commands
@fikajlo4 жыл бұрын
@@CodeWithSwastik Thanks for replying I managed to get it fixed with help of people from a r/discord_bots discord server.
@ZooperPlayz4 жыл бұрын
@@fikajlo that's a sub reddit NOT A DISCORD SERVER
@finderofbears4 жыл бұрын
@@ZooperPlayz homie there's a discord server for the subreddit...
@IsabelaCardeal4 жыл бұрын
How did u fix that? The same thing happen with me, I'm looking on the reddit and another sites but couldn't fix yet
@beastthrash50344 жыл бұрын
This Guy Is Best At Explaining
@CodeWithSwastik4 жыл бұрын
Thanks lol
@ladybug27503 жыл бұрын
what do i do when i get a system doesn't recognize thing for cmd part 8:10 im stuck on this part i even put it on dektop like he did and still nu'n :/
@carrotlol4 жыл бұрын
This was so helpful, thanks!
@CodeWithSwastik4 жыл бұрын
Glad it was helpful!
@RainEDM4 жыл бұрын
This is perfect, thank you!!
@giyuutomayoka55794 жыл бұрын
it didnt work for me i did everything right why>?
@wood1n13 жыл бұрын
@@giyuutomayoka5579 are you using Python 3.8.3?
@THERRIEN_MUSIC3 жыл бұрын
Hey there, I really need your help. When I do the "pip" thing on the command prompt, it's sais it is not recognized as an internal or external command
@mustaqmujahidmim62163 жыл бұрын
python get-pip.py
@nickd8924 жыл бұрын
When i type bot.py or python bot.py my bot wont run and i have the exact same code as yours
@nickd8924 жыл бұрын
Thanks for the suggestion I fixed it yesterday. The problem was the python I downloaded didn’t seem to be compatible with discord. So I used 3.8.6 and that worked fine.
@saekisop4 жыл бұрын
@@nickd892 thanks bro
@sveeryine4 жыл бұрын
at 8:16 i did everything right but it doesnt do anything. i tried putting the script in sublime text and visual studio code as well but it still doesnt work. can any1 help me please
@KyleTheDude_4 жыл бұрын
8:19 line 1, in import discord ModuleNotFoundError: No module named 'discord' I have Discord but for some reason it can't find it and I've made sure the Sublime text was exactly the same.
@KyleTheDude_3 жыл бұрын
@IRON i used pycharm and it still didnt work but this was a long time ago and i dont care anymore. thanks for trying tho :)
@ProsamGaming3 жыл бұрын
I need help about it if you can
@KyleTheDude_3 жыл бұрын
@@ProsamGaming sorry, idk what to do
@ProsamGaming3 жыл бұрын
I got it i am not using the command prompt i am using python to make bot live
@ProsamGaming3 жыл бұрын
@DogeIsCool yes vscode is good but 1 glitch is also in it
@potato92844 жыл бұрын
thanks buddy, created my own bot today! you rock :D
@CodeWithSwastik4 жыл бұрын
Nice work!
@gamespotlive36734 жыл бұрын
This is genuinely awesome.
@CodeWithSwastik4 жыл бұрын
Thanks 😊
@raghuvanshiedit3 жыл бұрын
You help me lot man keep it up
@Ender_Bust4 жыл бұрын
pip install discord is not working for me. It says 'pip' is not recognized as an internal or external command, operable program or batch file. Are you able to help me with this? And also thank you so much for this video!
@Ender_Bust4 жыл бұрын
Can you help me?
@awedsy31954 жыл бұрын
@@Ender_Bust im having the same exact issue
@CodeWithSwastik4 жыл бұрын
KZbin just decided to delete the comment I made a week ago, you should try to install Python again but make sure you add it to path. Then it should work
@awedsy31954 жыл бұрын
@@CodeWithSwastik Yes. that actully solved it for me. But i later added discord's folder into the python "lib" folder. Then everything started to work out.
@jettplane4 жыл бұрын
When I try and run the command "pip install discord" I get an error message saying "failed to build yarl multidict"
@Sid-cv8hw4 жыл бұрын
same
@jettplane4 жыл бұрын
Oh. Btw. I fixed my problem. I had to install c++ build libraries.
@Sid-cv8hw4 жыл бұрын
@@jettplane I did it but till didn't work so I just switched to discord.js JavaScript one
@nimreaper37182 жыл бұрын
could you just install discord from the pycharm terminal directly or does it have to be through the command prompt? curios its not detecting python on my pc even though i have it installed
@prateekparashar75734 жыл бұрын
It says no module found "discord.exe" in line to when i run the command in cmd though i have installed discord correctly in my laptop python version:- 3.8.6
@hriddhimandutta65974 жыл бұрын
it's discord.ext
@prateekparashar75734 жыл бұрын
@@hriddhimandutta6597 thx.
@canceluttpandnixanna73523 жыл бұрын
@@hriddhimandutta6597 still wont work
@ProsamGaming3 жыл бұрын
I also need help about it
@kailuvstxt4 жыл бұрын
ty it worked well!
@yagyaprasadadhikari26344 жыл бұрын
pip' is not recognized as an internal or external command, operable program or batch file. It says this :(
@JustAnotherCoder4 жыл бұрын
You can add pip as a variable, there are many tutorials on this, or you can use the Visual Studio or Anaconda command prompt if you have any of those programs
@yagyaprasadadhikari26344 жыл бұрын
@@JustAnotherCoder thanks man, helped me alot :)
@uraniumgaming1233 жыл бұрын
search the error name on youtube, watch CodeWithHarry's video , he explained and fixed the error hop it helps
@moe092mlboa3 жыл бұрын
hi the bot replies more than once so when i type >hello it types hi 4 or 3 times
@ProCarnageX3 жыл бұрын
why when i run the script it says "is not recognized as an internal or external command, operable program or batch file."
@chirag55004 жыл бұрын
it shows this Traceback (most recent call last): File "C:\Users otgo\OneDrive\Desktop\discord bots\bot.py", line 2, in from discord.exe import commands ModuleNotFoundError: No module named 'discord.exe' [Finished in 5.2s] what should i do
@chill48574 жыл бұрын
what application should i use to open the subline file
@verlene103 жыл бұрын
my bot doesnt come online whenver i run it
@Hi-wm6nb4 жыл бұрын
When I run "pip install discord" nothing happens, help?
@matthewdanger31504 жыл бұрын
I have a really weird error, can you help me out? File “main.py”, line 5 client = commands.Bot(command_prefix=“&”) SyntaxError: invalid character in identifier
@matthewdanger31504 жыл бұрын
The weird thing is that it is pointing at the first quotation mark, not the &.
@Hiphop602y4 жыл бұрын
I would suggest u not to use symbols which are not available in every pc try to use normal symbols like ? ! / and u can also use alphabets.
@Hiphop602y4 жыл бұрын
matthewdanger 3 u need to put the " after and before the prefix.
@matthewdanger31504 жыл бұрын
@@Hiphop602y already fixed it! I was just using the wrong quotation marks :)
@Hiphop602y4 жыл бұрын
matthewdanger 3 nice!
@Imsuchagoodguyfr2 жыл бұрын
hey swastik.... im having a problem on command promt place when i use "bot.py" it says typer error on the 4th line of code where you set a prefix for it..so the bot isnt going online...pls help...
@rettm86723 жыл бұрын
i did everything right but the last part where the bot comes online there's coming some errors
@mrt0bh4 жыл бұрын
i did do pip install discord and its installed and if i do import discord and doing same as you do then starting the bot in cmd it say Traceback (most recent call last): File "C:\Users\USER\Desktop\discord.py\mybot.py", line 1, in import discord ModuleNotFoundError: No module named 'discord' what is the solution to solve this problem and thanks
@-kingduckthexiii49384 жыл бұрын
Hey so I’m at 8:18 and I saved the folder in my desktop but when I type cd desktop it’s works but then when I type the folder name like cd “foldername” then it says “the system cannot find the specified path” what should I do?
@sveeryine4 жыл бұрын
im struggling on that too..
@omgdodogamer47594 жыл бұрын
say the name of the folder was "randombot" then you do cd Desktop and then cd randombot exactly how i did it but replace randombot with the name of your bot
@-kingduckthexiii49384 жыл бұрын
@@omgdodogamer4759 all right I’ll try it and let you know
@srivardhan92224 жыл бұрын
where did u learn python can u please tell
@joshuacrowley24144 жыл бұрын
'pip' is not recognized as an internal or external command, operable program or batch file.
@da_barracuda59163 жыл бұрын
dude likes your message then doesnt answer lmao
@monsieurxann88594 жыл бұрын
when i created a new bot, for some reason the new bot cant find the discord module pls help
@SNPatil-ev2ut3 жыл бұрын
Nice tut for windows dis bots everyone makes macOS tutorials i And o have windows so this is helpfull:)
@arrow87114 жыл бұрын
My code says that the "3" in "Python 3.8.6" is invalid, what do I do?
@crsons78024 жыл бұрын
whenever i go to run it , it just keeps opening the folder it’s in. it doesn’t say “bot is ready” . then it never shows as online . help ?!
@dhruvin52594 жыл бұрын
same
@thecatofnyan4 жыл бұрын
8:10 when I do that, it tells me a long message that says that the thing FAILED. I tried typing: python3 bot.py, bot.py and python bot.py. PLS HELP ME
@diwasparashar17074 жыл бұрын
bro i'm facing troubles while installing discord libraries via command prompt can you please help
@emblcm4 жыл бұрын
same idk it’s not working
@bozoboys44 жыл бұрын
When I tried downloading discord, it says to update pip, so when i do the command to update pip it says -m is not recognised as an internal or external command, operable command or batch file, what do I do?
@scorchergames30384 жыл бұрын
i had same issue
@imSomebody-m4c4 жыл бұрын
You didnt add python as path
@bozoboys44 жыл бұрын
@@imSomebody-m4c i just found it out, this vid is clickbait and doesnt work
@bozoboys44 жыл бұрын
i mean, not just found it out, i knew it when it didnt actually work
@imSomebody-m4c4 жыл бұрын
@@bozoboys4 oh ok
@Hiphop602y4 жыл бұрын
hello had a doubt when i check if the bot is working then it shows that there is no discord module may i know why?
@Hiphop602y4 жыл бұрын
Doubt was cleared 30 days ago lol
@Ash_Industries3 жыл бұрын
Fantastic video Very well done.
@rqiz30804 жыл бұрын
i am having issue which is building wheel for yarl error... what should i do?
@raunakisannoying3 жыл бұрын
I just paused the video to comment that how beautiful voice u have :)
@maxfunlife34914 жыл бұрын
I don't know if I am using the wrong command prompt I saw there was a python one and a regular one but whenever I type in "pip install discord" it says ould not build wheels for multidict, yarl which use PEP 517 and cannot be installed directly.
@4lwnEUW4 жыл бұрын
After I do bot.py I get: Trace back (most recent call last): File (then the file stuff) , line 3,in Client = command.bot(command_prefix = "w.") Namerrror: name 'command' is not defined
@Skailed4 жыл бұрын
i cannot do pip instal discord - and i added python to windows so for other reason my pip command is working. but when i do pip install disord its just sending some messages and then pops up an error. :(
@srivardhan92224 жыл бұрын
client = commands.bot(command_prefix=">") TypeError: 'module' object is not callable. plz help with this error
@CodeWithSwastik4 жыл бұрын
b in bot should be capital
@acogblue43274 жыл бұрын
C:\Users\Cody>cd Desktop C:\Users\Cody\Desktop>cd "EpicBot" C:\Users\Cody\Desktop\EpicBot>bot.py 'bot.py' is not recognized as an internal or external command, operable program or batch file. What does that mean.
@CodeWithSwastik4 жыл бұрын
Try doing "python bot.py"
@cosmo85884 жыл бұрын
No module named discord? I'm using VS Code, can anyone help me?
@flegmis56294 жыл бұрын
SyntaxError: expression cannot contain assignment, perhaps you meant "=="?
@gamessimilar85094 жыл бұрын
change the = to ==
@sasuketricks41334 жыл бұрын
Is it another version of python.. Can we use jupyter notebook for commands
@deianmihai80384 жыл бұрын
So my not does't run command promt said the file can't open error 2
@eskon77523 жыл бұрын
I was doing this in repl.it and it said module discord has no attribute 'Bot'
@saviour..4 жыл бұрын
8:10 when I do that it opens my code and it doesn't run my bot. And when I try the "python3 bot.py" method, it doesn't work either.
@dev78393 жыл бұрын
did u find any fix?
@techplayz064 жыл бұрын
Really awesome video. Helped me a lot....
@7s7ss7s223 жыл бұрын
when I ran my bot it was ready but when I typed >Hi it didn"t say anything so I ran it again and it said Ignoring exception in command None: discord.ext.commands.errors.CommandNotFound: Command "Hi" is not found
@vszlx43 жыл бұрын
if there is an error at line 4 go to Line 2 and type from discord.ext.commands import Bot ✔ instead of from discord.ext import commands ✖
@faheezsyed4 жыл бұрын
‘Pip’ is not recognised as an internal or external command,operate legally program or batch file
@legendgamingyt92824 жыл бұрын
use py -3 -m then the rest command for windows
@JustAnotherCoder4 жыл бұрын
Wow 15 likes is our goal, more like 1k likes! Great job anyways, very good tutorial! Btw how can I make the bot work even if I'm not running the script?
@bruhm0ment7673 жыл бұрын
host the bot through heroku (that gives you specified number of free hours) or run a constant ping function with uptime bot
@syedmohammadanas30554 жыл бұрын
please help its says Could not build wheels for multidict, yarl which use PEP 517 and cannot be installed directly
@SenorSaim4 жыл бұрын
same
@syedmohammadanas30554 жыл бұрын
@@SenorSaim bro please run these command pip install --upgrade "aiohttp>=3.7.2" "numpy=1.4.0" pip install --upgrade pip pip install discord in the order, yet it shows the error but you can see that you can import the DISCORD package completely inshallah these may help you
@syedmohammadanas30554 жыл бұрын
bro I need help not heart
@saekisop4 жыл бұрын
C:\Users\user>pip install discord 'pip' is not recognized as an internal or external command, operable program or batch file. please help bro same all the time!!!!
@solruck76164 жыл бұрын
Hello, so pretty much, you don't have PIP installed. I think that in python 3+ there is an option in the python installer to also install pip. If you want to fix your problem, just open the python installer and then click the advanced installer button. You should see a checkmark some time in the installer to install pip. I am writing this from memory, so pardon me if there are any problems.
@kitsune.spicyspify11004 жыл бұрын
hey ive been getting this: line 4, in client = commands.bot(command_prefix=".") TypeError: 'module' object is not callable do you know any possible fix?
@CodeWithSwastik4 жыл бұрын
It's is commands.Bot not commands.bot The B needs to be capitalized
@elysian_myst4 жыл бұрын
Hey man I got a problem here! You know every youtube install discord script to make the bot online right? so when I go to cmd and I type "py -m pip install -U discord" it shows me an error and I don't know why it is happening! I have searched in google, some of the peoples are saying to uninstall node.js then reinstall it! i tried this method too! can u please help me? bruh like python didn't installed discord.py which is not allowing me to make it online. At the end of the error something comes here "ERROR: Failed building wheel for multidict Failed to build yarl multidict ERROR: Could not build wheels for yarl, multidict which use PEP 517 and cannot be installed directly" and I also added python to the path!
@lapezi3 жыл бұрын
Im a little bit late but whats that backround??
@bolin25794 жыл бұрын
Help! when coding, why does it say "Ready" instead of "Bot is Ready" when I put it on the command prompt?
@friendlyneko10704 жыл бұрын
Maybe you wrote 'Ready' in the print statement within on_ready():
@lukarasic87694 жыл бұрын
Bro you are a god very thanks for making bot tutoriial
@CodeWithSwastik4 жыл бұрын
Happy to help😃
@aarybinduJODD3 жыл бұрын
when i use a coomand the bot replies so many times plzz help
@sunnysgadgetreviews58863 жыл бұрын
How to use it to grab posts from other discord servers? thanks
@rama55234 жыл бұрын
after typing ''bot.py'' it says the following as an error: Traceback (most recent call last): File "C:\Users\Mattis\Desktop\bot\bot.py", line 14, in client.run("Insert Token here") Why is this?
@CodeWithSwastik4 жыл бұрын
Could you show me the full error?
@rama55234 жыл бұрын
@@CodeWithSwastik Its ok i fixed it. I asked in the Discordpy discord server and they sent me some download link that fixed it but thanks for answering so fast
@basscoin95944 жыл бұрын
@@rama5523 I know its been a month since you posted this but do you by chance still have that link?
@rama55234 жыл бұрын
@@basscoin9594 i could try to find it again ( answering with a new comment if I get it )
@armaansanserwal29333 жыл бұрын
Bro when i use the command "pip install discord" It says 'pip' is not recognized as an internal or external command, operable program or batch file. Pls Help
@reflex76493 жыл бұрын
please can u teach the same thing with pycharm cause i am getting a lot of errors
@godwinausten56103 жыл бұрын
hey can i do the same process in vs code?
@SierraHunter21064 жыл бұрын
how do you do it in mac like how do you make it online
@klaft52284 жыл бұрын
when i type "pip install discord" it says " 'pip' is not recognized as an internal or external command, operable program or batch file."
@CodeWithSwastik4 жыл бұрын
That means that you haven't installed python to path. When you install Python you need to select the "Add to Path" option
@kadendixon74054 жыл бұрын
@@CodeWithSwastik i did, and it still says invalid syntax