Making a Discord Bot in Python (Part 1: Setup)

  Рет қаралды 94,684

Lucas

Lucas

Күн бұрын

Пікірлер: 203
@abaldpersonlookingatthesky1605
@abaldpersonlookingatthesky1605 2 жыл бұрын
I remember watching your videos when I got into python and coding and decided to make a discord bot as a first project, lovely to see you still at it keep it up my guy!
@wuaht
@wuaht 2 жыл бұрын
a fool moon night
@williamcalhoun7841
@williamcalhoun7841 2 жыл бұрын
this comment is my life currently! wish me luck. :-p
@iuri3930
@iuri3930 2 жыл бұрын
@@williamcalhoun7841 same lol
@shirfix
@shirfix 2 жыл бұрын
@@williamcalhoun7841 Lmao it's same
@ankeet404
@ankeet404 2 жыл бұрын
Im the 100th liker!
@rerereuj
@rerereuj Жыл бұрын
this is an absolute godsend. So many tutorials go at a breakneck pace and skip over important stuff, even if they claim to be beginner friendly. Thank you for explaining each step, it really makes everything so much more understandable
@keno7166
@keno7166 2 жыл бұрын
for anyone having trouble in the terminal and it not working, try to select the cmd terminal instead of powershell by clicking on the drop down arrow next to "powershell" on the right and select command prompt. hope this works for you!
@anon8723
@anon8723 2 жыл бұрын
If you are getting an error such as: File env\Scripts\Activate.ps1 cannot be loaded because running scripts is disabled on this system At the begging of this tutorial when setting up the bot in Virtual Studio Code, below is a tutorial on how to fix the error. Tutorial on how to fix: kzbin.info/www/bejne/jmjQmGamf8ubkLM The instuctions from that tutorial are listed below. There is an easy work around but you have to have Administrator access on the account that you are using on your PC. -Open PowerShell as Administrator -Type the command "Get-ExecutionPolicy -List" This will bring up a list of execution policies and their current status, at the very bottom of the list, it may say undefined or restricted -Type the command "Set-ExecutionPolicy Unrestricted" A popup will open asking if you would like to continue in powershell -Type "Y" to continue -Type the command "Get-ExecutionPolicy -List" This will show the new set of execution policies and their current status. Here is the YT video I followed for this error, the same YT video linked above: kzbin.info/www/bejne/jmjQmGamf8ubkLM
@-will-1389
@-will-1389 2 жыл бұрын
thanks dude
@xxdarkking368xx5
@xxdarkking368xx5 2 жыл бұрын
Thank You so much you saved me
@modestasriabovas3977
@modestasriabovas3977 2 жыл бұрын
Life saviour.
@ItsTooBrutal
@ItsTooBrutal 2 жыл бұрын
this works, this man knows his stuff
@darshshah7649
@darshshah7649 2 жыл бұрын
ur a god
@lyingpancake95
@lyingpancake95 2 жыл бұрын
It's like a new season! Looking forward to this!
@whitehorsept
@whitehorsept 2 жыл бұрын
NOTE: If "python" is not a recognised command (even though you downloaded/installed python), you need to go to your "control panel > system > advanced system settings > environment variables " and edit the "Path" variable to also include the folder where you installed python (that contains the python executable).
@nap_yuu
@nap_yuu 2 жыл бұрын
thank you so much, i was struggling with this one!!
@Spiderfffun
@Spiderfffun Жыл бұрын
or just redo the installer with add to path enabled
@leluch1616
@leluch1616 Жыл бұрын
thank you!!
@minetestfan1015
@minetestfan1015 2 жыл бұрын
Slash commands and interactions please. Great VID! Been curious about hikari for sometime now.
@sntx_8250
@sntx_8250 2 жыл бұрын
Great! I just started rewriting my Bot with Hikari (+ lightbulb, but also want to try tanjun). Will definitely be following this series.
@samchristopher6906
@samchristopher6906 2 жыл бұрын
After 7 months a legend is finally back
@marbialyiusz_4588
@marbialyiusz_4588 2 жыл бұрын
Man, you're pretty underrated! This is really helpful, thanks. Definitely gonna follow this series, waiting for more!
@hishamabdulhak539
@hishamabdulhak539 2 жыл бұрын
starting the new year off with a new lucas upload!! 2022 is starting off good
@Haikuno
@Haikuno 2 жыл бұрын
If you're on Linux, you probably already know this, but to activate the virtual environment you need to run: source env/bin/activate
@Far-YT
@Far-YT 2 жыл бұрын
I'm on mac you saved my problem thanks mate :)
@ndp0830
@ndp0830 2 жыл бұрын
I’m on Mac too but it said permission denied…
@TapirTot
@TapirTot 2 жыл бұрын
I did not know this, Thanks!
@m.nandanbhandary8742
@m.nandanbhandary8742 2 жыл бұрын
A small tip : Increase the font size or zoom in because it is kinda hard to read even at 1080p.
@Lucas-tz3jp
@Lucas-tz3jp 2 жыл бұрын
I am a little bit sick but hopefully I don't sound too bad :(
@namanbiswajit9756
@namanbiswajit9756 2 жыл бұрын
Sounds fine to me no problem dude
@shreyas449
@shreyas449 2 жыл бұрын
Dad
@Rakhshita_g
@Rakhshita_g 2 жыл бұрын
Get well soon and thanks for making this series ☺️
@alpha18_81
@alpha18_81 2 жыл бұрын
Hey, if I run the script, it gives me that rainbow-ish hikari text and everything looks fine. But the bot doesn't go online. I checked the token, I reinstalled hikari, but it wont start the bot. I went over to pycharm and there it says me that it can't find the hikari libary, even after reinstalling again... Am I again the only one in the world with this problem or does someone know a fix for that problem?? :/
@namanbiswajit9756
@namanbiswajit9756 2 жыл бұрын
@@alpha18_81 did you created virtualenv and activated it properly?
@samineumanntaylor6345
@samineumanntaylor6345 2 жыл бұрын
Dude your back. I loved your dpy rewrite series
@nsida_maichart
@nsida_maichart Жыл бұрын
For anyone who met the """UnicodeDecodeError: 'cp950' codec can't decode byte 0xe5 in position 95: illegal multibyte sequence""" error when running """python bot.py""", you will have to go to the folder where python and hikari was installed. Then edit ux.py Line 160 : change the """open("r")""" to """ open("r",encoding = "UTF-8") """
@jimmyscott5144
@jimmyscott5144 2 жыл бұрын
Why hikari and not discord.py? Hikari is newer and has less documentation and I think would be harder for someone new because it does not have as big of a community. I don't know python well but I see so many tutorials for discord.py but switching while trying to learn seems a bit too confusing
@prince7187
@prince7187 2 жыл бұрын
Thank god, you are back. I missed this.
@RaghavKarthik1778
@RaghavKarthik1778 2 жыл бұрын
Welcome back! This tutorial was really helpful! Thanks! (:
@anonylol537
@anonylol537 2 жыл бұрын
why does yours say \Users\desktop\discordbot>python and my says \Users\kober\PycharmProjects\DiscordBot?? i need help and when i type -m venv env it doesnt work
@BenIsFound
@BenIsFound 2 жыл бұрын
Round 3 here we go
@Lucas-tz3jp
@Lucas-tz3jp 2 жыл бұрын
😂
@kookeekwisp
@kookeekwisp 2 жыл бұрын
Why is it when i do this, my bot's not online after running it?
@schnitzy9589
@schnitzy9589 2 жыл бұрын
Looking forward to this!😃
@schnitzy9589
@schnitzy9589 Жыл бұрын
Ohh boys I’m bored so back here again!
@kavinr.p3556
@kavinr.p3556 2 жыл бұрын
SICK WALLPAPER
@moosie5544
@moosie5544 2 жыл бұрын
Do you know which wallpaper that is?
@Dawnbringer1
@Dawnbringer1 2 жыл бұрын
lifesaver! hopefully the other videos will come soon!
@pelusa1241
@pelusa1241 2 жыл бұрын
Continue with more videos like this one about Discord Bot! Music, Level, Embeds, Reaction Roles and so on.
@mrgokulbig6298
@mrgokulbig6298 2 жыл бұрын
Lucas is BACK!
@sandiguha
@sandiguha 2 жыл бұрын
The background picture shows the place of 'Kailash' - the home of Lord Shiva and how I could tell this because can you spot that artifact beside the tree, that's the 'Trishul' or Trident of Lord Shiva.
@kameblitz
@kameblitz 2 жыл бұрын
Uhhh... Hii! So actually I saw your vids and pretty much liked it however there were huge gaps between some of them. So can you upload consistently for this series if possible?
@afterhours5466
@afterhours5466 2 жыл бұрын
it gives me an error when i type ".\env\Scripts\activate'
@sleepywithspeed
@sleepywithspeed 2 жыл бұрын
Change the default terminal from powershell to cmd
@-will-1389
@-will-1389 2 жыл бұрын
me too
@gamingworm8827
@gamingworm8827 2 жыл бұрын
Hey, thanks for the great serious looking forward to it.
@rpfl5059
@rpfl5059 2 жыл бұрын
I WAS TRYING TO DO THIS FOR A WEEK THANKYOU
@hillybankok
@hillybankok 2 жыл бұрын
i forgot the application.commands but then it worked tysm
@Sciencedoneright
@Sciencedoneright 2 жыл бұрын
By the way, discord tokens are valuable, do not show them to anyone else. They must be kept private, and they can be misused in case it was leaked. In case you leaked a token, regenerate it and replace the old token with the new one. Happy coding!
@aiden6343
@aiden6343 2 жыл бұрын
ok dud
@jhonsuper7065
@jhonsuper7065 2 жыл бұрын
! mhmf
@Sciencedoneright
@Sciencedoneright 2 жыл бұрын
@@jhonsuper7065 you're in twt? :O who are u?
@jhonsuper7065
@jhonsuper7065 2 жыл бұрын
​@@Sciencedoneright PrabhS :mhm:
@Sciencedoneright
@Sciencedoneright 2 жыл бұрын
@@jhonsuper7065 mhm nice
@mirzaadnan3012
@mirzaadnan3012 2 жыл бұрын
You have such an amazing voice and your videos are very easy to follow along. Thank you for this. I would absolutely love to see you make tutorials on other topics beside discord bots
@DXAssassin
@DXAssassin 2 жыл бұрын
ooo a new series?! amazing, keep it up!
@oz9985
@oz9985 Жыл бұрын
Hey when I host my bot i see the ram goes higher and higher out of nowhere. Any idea how to fix it ?
@styres933
@styres933 2 жыл бұрын
What is the difference to the series before? The hikari? Why use this and not the normal api for python?
@Lucas-tz3jp
@Lucas-tz3jp 2 жыл бұрын
discord.py which was used in the last series, has been abandoned and will no longer be updated. I have moved on to using hikari thus the new series :)
@froststeel
@froststeel 2 жыл бұрын
@@Lucas-tz3jp What about pycord?
@goldmannation
@goldmannation 2 жыл бұрын
@@Lucas-tz3jp this comment didnt age well
@knightmare4874
@knightmare4874 2 жыл бұрын
@@goldmannation why hasnt it age well?
@mxrcelical7679
@mxrcelical7679 2 жыл бұрын
He's back!
@totobs1
@totobs1 2 жыл бұрын
YAY! THANKS MAN!
@celaph8734
@celaph8734 2 жыл бұрын
can i get the background?
@stefkoning2385
@stefkoning2385 2 жыл бұрын
Can you make a musicbot part with queues and search + link stuff
@0xsuperman
@0xsuperman Жыл бұрын
Will this series cover how to make a bot to post messages to specific channels (not to respond to specific command in discord chat)?
@-karma1394
@-karma1394 2 жыл бұрын
Why do i get a message saying “No module name ‘hikari’?
@virusyrel771
@virusyrel771 2 жыл бұрын
Install it ig
@TydinisGR
@TydinisGR 2 жыл бұрын
thanks for making this tutorial and please try to continue finishing this new series of teaching how to make discord bot in python! and also is the 2 series in ur channel are outdated?
@Ren-io4sx
@Ren-io4sx 2 жыл бұрын
Hey man, what kind of theme are you using on VSCode
@skmkq
@skmkq 2 жыл бұрын
History repeats itself for the third time and does'nt cease to be cool. Keep it up.
@hactavis
@hactavis 2 жыл бұрын
what theme do you use for vsc?
@ayqet
@ayqet 2 жыл бұрын
Hi Lucas, whenever I try and run .env\Scripts\activate I keep getting an error which is (The module '.env' could not be loaded) and then it tells me to run ('Import-Module .env') and I still get an error after that. Do you know how to fix this, thanks.
@MomIsCrying
@MomIsCrying 2 жыл бұрын
this from @Redfly from this somment section "NOTE: when making the virtual environment, you may get an error saying that your execution policy is wrong. I tried running VS code as an admin, but then it wouldn't let me open the folder. You can solve this by switching your intergrated promt from the default(powershell) to cmd. Thanks for the tutorial btw, it really helps =)"
@rockoyhead
@rockoyhead 2 жыл бұрын
Yo I found a fix for it just watch this vid mate. kzbin.info/www/bejne/jmjQmGamf8ubkLM
@benbo9560
@benbo9560 2 жыл бұрын
New serise lets go
@nightshadepoision
@nightshadepoision 2 жыл бұрын
I can't seem to get into the env file im on Linux Ubuntu.
@milkmannoodles3783
@milkmannoodles3783 2 жыл бұрын
I'm having the same issue
@milkmannoodles3783
@milkmannoodles3783 2 жыл бұрын
kzbin.info/www/bejne/mJzJlYCFltaNq80 found this youtube video that explains how to do it on linux
@censr6616
@censr6616 2 жыл бұрын
For anyone struggling with an error that looks something like this: ModuleNotFoundError: No module named 'hikari', restarting my vs code seemed to have fixed the issue
@kayd9733
@kayd9733 2 жыл бұрын
This is pretty cool
@리코링
@리코링 2 жыл бұрын
welcom back!
@SlimeyDev
@SlimeyDev 2 жыл бұрын
What is ur upload schedule?
@gauravuttarkar9682
@gauravuttarkar9682 2 жыл бұрын
What's the difference between this series and the previous one?
@montecristo31
@montecristo31 2 жыл бұрын
thaks, man!
@owotaku2712
@owotaku2712 2 жыл бұрын
Thx, can ask you one thing, I have 2 laptops and one pc but in my two laptops I can programming a bots for discord (also profile of windows are diferentes) however in my pc I can’t programming a bot, I mean test a bot (also the pc share the same profile windows from one of my laptops) my question is why I have discord.error HTT etc unauthorizatio?
@dagdbot83
@dagdbot83 2 жыл бұрын
He bac
@leeandasi1383
@leeandasi1383 Жыл бұрын
Hi, I am having trouble on discord. There are no servers to add on the drop down list. What should I do?
@TehNitro
@TehNitro 2 жыл бұрын
What about some moderation commands?
@noerror9404
@noerror9404 2 жыл бұрын
Upload more tutorial on this topic plsssssssssssss
@lautre9873
@lautre9873 2 жыл бұрын
i mean... for the first step it say something about the powershell that i can open the "env" ? is it normal ?
@efipx
@efipx 2 жыл бұрын
Traceback (most recent call last): File "C:\Users\andre\env\disc_bot_test2.py", line 1, in import hikari ModuleNotFoundError: No module named 'hikari' pls help i did every step
@Rihards_Gold
@Rihards_Gold 2 жыл бұрын
Do "pip install hikari-tanjun" That solved it for me
@sleepywithspeed
@sleepywithspeed 2 жыл бұрын
Try restarting your computer, that worked for me
@rockoyhead
@rockoyhead 2 жыл бұрын
@@Rihards_Gold You are a god thanks my friend.
@raksshana1197
@raksshana1197 2 жыл бұрын
how do i make the virtual enviroment on a mac? i cant use cmd because my default is zsh
@its_shuay
@its_shuay 2 жыл бұрын
I am getting a "No Module Named venv" when running python -m venv env How do I fix this error? (I am also using VS Code)
@ikenz1e
@ikenz1e 2 жыл бұрын
after installing hikari and writing the import line i get this error "Import "hikari" could not be resolved Pylance (reportMissingImports)" it worked at first but after a while of coding it stopped working
@rinka8430
@rinka8430 2 жыл бұрын
its: "import hikari" not "Import hikari"
@josuedelatorre35
@josuedelatorre35 2 жыл бұрын
@@rinka8430 still doesn't work, it says " ModuleNotFoundError: No module named 'hikari' "
@rinka8430
@rinka8430 2 жыл бұрын
@@josuedelatorre35 so that is because u didnt install hikari, run this code in ur terminal: pip install hikari
@alpha18_81
@alpha18_81 2 жыл бұрын
@@rinka8430 I got the same error, i reinstalled twice but I still get this error
@rinka8430
@rinka8430 2 жыл бұрын
@@alpha18_81 so try this commands: pip3 install hikari pip install hikari python -m pip install hikari python3 -m pip install hikari py -m pip install hikari py3 -m pip install hikari
@emetz2293
@emetz2293 2 жыл бұрын
Whenver I run the code it tells me that "module 'hikari' has no attribute 'GateWayBot' "
@idontknowhatoput8663
@idontknowhatoput8663 2 жыл бұрын
what's that wallpaper it looks pretty cool
@SamikTiwari.2004
@SamikTiwari.2004 2 жыл бұрын
But why not continue the older ones??? It'll be really informative and easy to understand for those that have watched the older ones you can make newer stuff
@resc863
@resc863 2 жыл бұрын
Old one is dead
@justeenleidioso2150
@justeenleidioso2150 2 жыл бұрын
You came back!
@alooflemur1492
@alooflemur1492 2 жыл бұрын
i'm new to visual studio how do you get to that screen at 4:42 ?
@divyamsamarwal5752
@divyamsamarwal5752 2 жыл бұрын
Awesome
@harek231
@harek231 2 жыл бұрын
Welcome Back!!!
@just_andro
@just_andro 2 жыл бұрын
Coool
@Rakhshita_g
@Rakhshita_g 2 жыл бұрын
Welcome back
@nerolized1209
@nerolized1209 2 жыл бұрын
it is showing that hikari is not installed but when i tried it installing it again, it showed requirement already satisfied :\ edit: and im usind python 3.9
@EnglishRain
@EnglishRain 2 жыл бұрын
Thank youuuuuuuu
@dextero
@dextero 2 жыл бұрын
Why not use nextcord or pycord?
@squish7831
@squish7831 2 жыл бұрын
Hey man, you helped me alot with coding, thank you so much! i would love to see more content ✨
@Games.On.Wheels
@Games.On.Wheels 2 жыл бұрын
Could you make a tutorial on how to set this up on a Raspberry Pi 4?
@jurgitaguobiene8504
@jurgitaguobiene8504 2 жыл бұрын
it says no module hikari and i don't know what to do. can you help me?
@SlimeyDev
@SlimeyDev 2 жыл бұрын
plz can u do tutorials using pycord plzzzzzzz
@KanaIsTheCutest
@KanaIsTheCutest 2 жыл бұрын
is there a way hikari can delete messages or kick/ban, basic functionalities
@revelmonger
@revelmonger 2 жыл бұрын
Nice voice drop.
@hakanayan8727
@hakanayan8727 Жыл бұрын
i downloaded python 3.11, but it is like onlycommand , not like in thi video
@InfiniteSciences
@InfiniteSciences 2 жыл бұрын
For me, IG its saying that python is not there. Could you assist me on this?
@じゅげむ-s6b
@じゅげむ-s6b 2 жыл бұрын
ooo a updated one?
@FuzzyImages
@FuzzyImages 2 жыл бұрын
So right away I'm running into the problem of my computer saying "no such option: -U"
@helish_88
@helish_88 2 жыл бұрын
refresh token, lmao. it was cool.
@vent_srikar7360
@vent_srikar7360 2 жыл бұрын
any resource for me to learn how to code a discord bot using hikari
@minseokwon9723
@minseokwon9723 2 жыл бұрын
why does event.content return none
@abdistic1047
@abdistic1047 2 жыл бұрын
works on replit aswell?
@doubled8846
@doubled8846 2 жыл бұрын
can i use pycharm for this?
@adjectif3887
@adjectif3887 2 жыл бұрын
thanks
@shryansh_a16
@shryansh_a16 2 жыл бұрын
is he trying to launch something like no way home?? as that too had too many reboots!!
@enriquealba5345
@enriquealba5345 2 жыл бұрын
i did everything exaclty the same but I never got the rainbow hitari I have the error hikari has no attribute gatewaybot
@enriquealba5345
@enriquealba5345 2 жыл бұрын
nvm just save the file at the end then run it right before python.py
@fuzoken7698
@fuzoken7698 2 жыл бұрын
man when i am activating environment it says cannot be loaded because running scripts is disabled on this system. do you know something abt it?
@m1n3c4rt
@m1n3c4rt 2 жыл бұрын
run Set-ExecutionPolicy -ExecutionPolicy Unrestricted, it works for me
@sleepywithspeed
@sleepywithspeed 2 жыл бұрын
Change your default terminal to cmd in vs code settings
@gagans9302
@gagans9302 2 жыл бұрын
Nice 👍🏻🙂
@therealshelly
@therealshelly 2 жыл бұрын
thank you, this helps me a lot, +1 sub
Making a Discord Bot in Python (Part 2: Events)
5:58
Lucas
Рет қаралды 34 М.
World’s strongest WOMAN vs regular GIRLS
00:56
A4
Рет қаралды 19 МЛН
When mom gets home, but you're in rollerblades.
00:40
Daniel LaBelle
Рет қаралды 131 МЛН
Making a Discord Bot in Python (Part 3: Commands)
19:36
Lucas
Рет қаралды 37 М.
Code a Discord Bot with JavaScript - Host for Free in the Cloud
56:30
freeCodeCamp.org
Рет қаралды 431 М.
Python: Making a Discord bot (Part 1: Setup)
16:28
Lucas
Рет қаралды 714 М.
Code a Discord Bot with Python - Host for Free in the Cloud
1:08:28
freeCodeCamp.org
Рет қаралды 2,4 МЛН
One CPU To Rule Them All - Ryzen 7 9800X3D Review
12:47
Linus Tech Tips
Рет қаралды 404 М.
Simple Discord Bot in Python
26:30
NeuralNine
Рет қаралды 18 М.
Intelligent Discord AI Chatbot in Python
18:58
NeuralNine
Рет қаралды 57 М.
World’s strongest WOMAN vs regular GIRLS
00:56
A4
Рет қаралды 19 МЛН