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

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

Lucas

Lucas

Күн бұрын

In this video, we go over the basic setup steps for creating a discord bot in python.
Let me know in the comments what videos you want to see next.
0:00 Intro
0:43 Python Version + Creating the application
4:33 Environment Setup
6:52 Initial Code
9:11 Outro
INSTALL PYTHON: www.python.org/downloads/
DISCORD DEVELOPER PORTAL: / discord
HIKARI GITHUB: github.com/hikari-py/hikari/
HIKARI DOCUMENTATION: www.hikari-py.dev/
HIKARI HELP DISCORD: / discord
JOIN MY HELP SERVER: / discord
#DiscordBot #Python #Hikari

Пікірлер: 205
@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
@marbialyiusz_4588
@marbialyiusz_4588 2 жыл бұрын
Man, you're pretty underrated! This is really helpful, thanks. Definitely gonna follow this series, waiting for more!
@lyingpancake95
@lyingpancake95 2 жыл бұрын
It's like a new season! Looking forward to this!
@keno7166
@keno7166 Жыл бұрын
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: kzfaq.info/get/bejne/jp2dmpahr8zMioU.html 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: kzfaq.info/get/bejne/jp2dmpahr8zMioU.html
@-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
@hishamabdulhak539
@hishamabdulhak539 2 жыл бұрын
starting the new year off with a new lucas upload!! 2022 is starting off good
@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.
@RaghavKarthik1778
@RaghavKarthik1778 2 жыл бұрын
Welcome back! This tutorial was really helpful! Thanks! (:
@minetestfan1015
@minetestfan1015 2 жыл бұрын
Slash commands and interactions please. Great VID! Been curious about hikari for sometime now.
@gamingworm8827
@gamingworm8827 2 жыл бұрын
Hey, thanks for the great serious looking forward to it.
@Dawnbringer1
@Dawnbringer1 2 жыл бұрын
lifesaver! hopefully the other videos will come soon!
@DXAssassin
@DXAssassin 2 жыл бұрын
ooo a new series?! amazing, keep it up!
@prince7187
@prince7187 2 жыл бұрын
Thank god, you are back. I missed this.
@schnitzy9589
@schnitzy9589 2 жыл бұрын
Looking forward to this!😃
@schnitzy9589
@schnitzy9589 Жыл бұрын
Ohh boys I’m bored so back here again!
@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
@samineumanntaylor6345
@samineumanntaylor6345 2 жыл бұрын
Dude your back. I loved your dpy rewrite series
@pelusa1241
@pelusa1241 2 жыл бұрын
Continue with more videos like this one about Discord Bot! Music, Level, Embeds, Reaction Roles and so on.
@armpitsalad
@armpitsalad Жыл бұрын
YOU HELPED ME GET MY BOT ONLINE AFTER DAYS OF TRYING!!! I JUST NEED TO LEARN HOW TO CODE MY OWN CODE FOR THE BOT!!! YOU'RE AWESOME! SUBBED!
@samchristopher6906
@samchristopher6906 2 жыл бұрын
After 7 months a legend is finally back
@totobs1
@totobs1 2 жыл бұрын
YAY! THANKS MAN!
@rpfl5059
@rpfl5059 2 жыл бұрын
I WAS TRYING TO DO THIS FOR A WEEK THANKYOU
@mxrcelical7679
@mxrcelical7679 2 жыл бұрын
He's back!
@squish7831
@squish7831 2 жыл бұрын
Hey man, you helped me alot with coding, thank you so much! i would love to see more content ✨
@kayd9733
@kayd9733 2 жыл бұрын
This is pretty cool
@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?
@justeenleidioso2150
@justeenleidioso2150 2 жыл бұрын
You came back!
@chumering
@chumering 2 жыл бұрын
welcom back!
@divyamsamarwal5752
@divyamsamarwal5752 2 жыл бұрын
Awesome
@raghavmundotia
@raghavmundotia 2 жыл бұрын
Welcome back
@harek231
@harek231 2 жыл бұрын
Welcome Back!!!
@benbo9560
@benbo9560 2 жыл бұрын
New serise lets go
@hillybankok
@hillybankok 2 жыл бұрын
i forgot the application.commands but then it worked tysm
@just_andro
@just_andro 2 жыл бұрын
Coool
@montecristo31
@montecristo31 2 жыл бұрын
thaks, man!
@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 Жыл бұрын
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!!
@therealshelly
@therealshelly 2 жыл бұрын
thank you, this helps me a lot, +1 sub
@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?
@gagans9302
@gagans9302 2 жыл бұрын
Nice 👍🏻🙂
@EnglishRain
@EnglishRain 2 жыл бұрын
Thank youuuuuuuu
@skmyk02
@skmyk02 2 жыл бұрын
History repeats itself for the third time and does'nt cease to be cool. Keep it up.
@mrgokulbig6298
@mrgokulbig6298 2 жыл бұрын
Lucas is BACK!
@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.
@owotaku2712
@owotaku2712 Жыл бұрын
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?
@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.
@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") """
@adjectif3887
@adjectif3887 2 жыл бұрын
thanks
@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
@raksshana1197
@raksshana1197 Жыл бұрын
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)
@kavinr.p3556
@kavinr.p3556 2 жыл бұрын
SICK WALLPAPER
@moosie5544
@moosie5544 2 жыл бұрын
Do you know which wallpaper that is?
@anonylol537
@anonylol537 Жыл бұрын
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
@stefkoning2385
@stefkoning2385 2 жыл бұрын
Can you make a musicbot part with queues and search + link stuff
@Ren-io4sx
@Ren-io4sx 2 жыл бұрын
Hey man, what kind of theme are you using on VSCode
@lautre9873
@lautre9873 2 жыл бұрын
i mean... for the first step it say something about the powershell that i can open the "env" ? is it normal ?
@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 ?
@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
@raghavmundotia
@raghavmundotia 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?
@alooflemur1492
@alooflemur1492 2 жыл бұрын
i'm new to visual studio how do you get to that screen at 4:42 ?
@helish_88
@helish_88 2 жыл бұрын
refresh token, lmao. it was cool.
@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
@hactavis
@hactavis 2 жыл бұрын
what theme do you use for vsc?
@leeandasi1383
@leeandasi1383 Жыл бұрын
Hi, I am having trouble on discord. There are no servers to add on the drop down list. What should I do?
@revelmonger
@revelmonger 2 жыл бұрын
Nice voice drop.
@emetz2293
@emetz2293 2 жыл бұрын
Whenver I run the code it tells me that "module 'hikari' has no attribute 'GateWayBot' "
@BenIsFound
@BenIsFound 2 жыл бұрын
Round 3 here we go
@Lucas-tz3jp
@Lucas-tz3jp 2 жыл бұрын
😂
@dagdbot83
@dagdbot83 2 жыл бұрын
He bac
@InfiniteSciences
@InfiniteSciences 2 жыл бұрын
For me, IG its saying that python is not there. Could you assist me on this?
@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 Жыл бұрын
I did not know this, Thanks!
@kookeekwisp
@kookeekwisp Жыл бұрын
Why is it when i do this, my bot's not online after running it?
@jurgitaguobiene8504
@jurgitaguobiene8504 2 жыл бұрын
it says no module hikari and i don't know what to do. can you help me?
@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. kzfaq.info/get/bejne/jp2dmpahr8zMioU.html
@noerror9404
@noerror9404 2 жыл бұрын
Upload more tutorial on this topic plsssssssssssss
@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
@KanaIsTheCutest
@KanaIsTheCutest 2 жыл бұрын
is there a way hikari can delete messages or kick/ban, basic functionalities
@Games.On.Wheels
@Games.On.Wheels 2 жыл бұрын
Could you make a tutorial on how to set this up on a Raspberry Pi 4?
@vent_srikar7360
@vent_srikar7360 2 жыл бұрын
any resource for me to learn how to code a discord bot using hikari
@s1lenttifn69
@s1lenttifn69 2 жыл бұрын
nothing happen when i run code. can someone help?
@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
@TehNitro
@TehNitro 2 жыл бұрын
What about some moderation commands?
@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)?
@doubled8846
@doubled8846 2 жыл бұрын
can i use pycharm for this?
@paired7815
@paired7815 2 жыл бұрын
thanks how to join your discord server. the invite link expired
@abdistic1047
@abdistic1047 2 жыл бұрын
works on replit aswell?
@celaph8734
@celaph8734 2 жыл бұрын
can i get the background?
@dextero
@dextero 2 жыл бұрын
Why not use nextcord or pycord?
@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
@hakanayan8727
@hakanayan8727 Жыл бұрын
i downloaded python 3.11, but it is like onlycommand , not like in thi video
@barbyboi
@barbyboi 2 жыл бұрын
woa, he's living! dont like the lib tho, but still :)
@-karma1394
@-karma1394 2 жыл бұрын
Why do i get a message saying “No module name ‘hikari’?
@virusyrel771
@virusyrel771 2 жыл бұрын
Install it ig
@minseokwon9723
@minseokwon9723 Жыл бұрын
why does event.content return none
@styres933
@styres933 2 жыл бұрын
lol first
@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
@tygo.d1
@tygo.d1 Жыл бұрын
for me it says i need an uri
@jail8011
@jail8011 2 жыл бұрын
Hi when I do .\env\scripts\activate it gives me a error when I try to run it
@thealmightykaiser5982
@thealmightykaiser5982 2 жыл бұрын
@Flicks thanks
@zerosense7222
@zerosense7222 2 жыл бұрын
the env does not work for me sadly
@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 жыл бұрын
kzfaq.info/get/bejne/mNGWl7CAxte-pZ8.html found this youtube video that explains how to do it on linux
@premiumboi473
@premiumboi473 2 жыл бұрын
I’m on a 24’ M1 iMac and I’m trying to get the bot running on it, I got a certificate not verified error, I know you on a windows but would be great if you or anyone els have a solution for me
@JustMastermind
@JustMastermind 2 жыл бұрын
@@olivierberg5855 If I do this, I get the following error: ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/certifi' Consider using the `--user` option or check the permissions.
@JustMastermind
@JustMastermind 2 жыл бұрын
@@olivierberg5855 What can I do, to fix that error?
@user-jd3gf5xw1x
@user-jd3gf5xw1x 2 жыл бұрын
ooo a updated one?
@idontknowhatoput8663
@idontknowhatoput8663 2 жыл бұрын
what's that wallpaper it looks pretty cool
@siemtesman
@siemtesman Жыл бұрын
WSS
Making a Discord Bot in Python (Part 2: Events)
5:58
Lucas
Рет қаралды 34 М.
I Paid Game Developers on Fiverr to Make the Same Game
9:49
BadGameDev
Рет қаралды 3,4 МЛН
Finger Heart - Fancy Refill (Inside Out Animation)
00:30
FASH
Рет қаралды 26 МЛН
Пранк пошел не по плану…🥲
00:59
Саша Квашеная
Рет қаралды 6 МЛН
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 10 МЛН
Making My Own Programming Language and Coding a Game in It
10:19
AstroSam
Рет қаралды 1,2 МЛН
Reviewing YOUR Discord Servers 2!
17:29
SoundDrout
Рет қаралды 316 М.
I made my own Code Editor
12:02
FaceDev
Рет қаралды 266 М.
Why You NEED a DRIVER (for hacking games)
8:03
cazz
Рет қаралды 446 М.
How GitHub's Database Self-Destructed in 43 Seconds
12:04
Kevin Fang
Рет қаралды 965 М.
Making Minecraft from scratch in 48 hours (NO GAME ENGINE)
16:38
Can I Run Youtube Entirely From My Terminal? (No Browser)
15:31
I Paid Game Developers on Fiverr to Make Minecraft
11:13
BadGameDev
Рет қаралды 1,7 МЛН