Create Your Own Discord Bot in Python 3.12 Tutorial (2024 Edition)

preview_player
Показать описание
Today we will be learning how we can create a Discord Bot from scratch in Python. We will host it on a local server and it will be able to respond to users in less than 20 minutes! A perfect tutorial for getting started with Discord Bots in 2024.

▶ Become job-ready with Python:

▶ Follow me on Instagram:

Developer Portal:

00:00 Intro
00:15 PyCharm
00:25 Pip install
01:05 Project files
02:15 Bot setup
06:36 Imports
08:19 Handling intents
09:26 Message functionality
13:24 Adding responses
15:29 Improve your Python skills
16:08 Bot startup
16:40 Handling incoming messages
18:22 Almost done
18:54 Running our bot
19:18 Fixing our mistake
19:52 It’s alive!
20:42 You can edit it
21:27 Hosting your bot
21:46 See you in the next video!
Рекомендации по теме
Комментарии
Автор

I had been searching for a proper tutorial on a discord bot using python, but I couldn't find one since every video was outdated, and the documentation also made no sense. Thanks for the great work.

siddhartharao
Автор

As someone who doesn't even own a computer and is borrowing one let alone how to code, this worked flawlessly. It's really easy once you get over the first few hurdles of installing everything correctly

DanielTheOcto
Автор

I have never heard of the walrus operator. Just that alone made watching this video worth my while.

Q.Roo_
Автор

Thank you so much for this tutorial, I followed along and created my own Discord Bot!

TonyStark-lgcw
Автор

This helped me a lot thank you.Keep up the work it really high quality

TheOnlyCurd
Автор

Jag är så glad, folk som dig är göra guider för python liksom andra kodning språk!

Kärlek från Sverige!

Overlycomplicatedswede
Автор

Hi, this video was very helpful to me. I hope you will continue to bring content regarding creating a discord bot in python and in a future video you will discuss the use of embeds, welcome messages, buttons, moderation functions and so on. I have so many questions haha

sSessionn
Автор

followed the tutorial but the bot doesn't response in the channel, only private messages. can you help?

thebetsnameverlol
Автор

0:35 Dont use `discord`, use `discord.py`, `discord` is a mirror package, even the README in PyPi shows this warning.
8:42 Please, explain better Intents, Intents are the different things your bot wants to recieve from the Gateway & API, not some sort of permissions...
10:30 No!! Check if the message has any embeds or attachments rather than just saying that intents are not set up.
14:22 No need for the `elif`s, if any `if` block check is met then it will return something... I can't really explain myself here but no needs did elif
18:20 No need for those variables...
19:58 Why do you still have that "one liner check"? Just use if blocks, it makes readability better

Also, why make a `responses.py` file? I thought you were using clean python practises, and that is NOT a good python practise.

Anyways, good vid

developer_anonymous
Автор

Thanks for the video and all the contents you’ve created. I’ve recently bought a couple of Udemy courses from you and they’re amazing. Congrats.

alejandroperezl
Автор

So, it says everything is all good and up and running. Everything is exact as the video. But when I text in the channels, it won't respond. But when I text using the ? then thats when it works and goes to DMs. What's wrong? Why won't it work normal?

DynastyRealism
Автор

Coded my first discord bot today with your video, now i'm using the code to learn further into adding more features and stuff to my bot! thank you for the super easy to follow tutorial

hustlej
Автор

I made it!🙂Thank you. I got my first bot running.

ivyw
Автор

This is amazing! thank you for such a lovely tutorial!

ClaireNighten
Автор

Thank you for this so much! Now I am well on my way to creating an AI chatbot using python for discord!

kiss
Автор

literally the best tutorial ever... worked like a charm. thank you!!

chanlers
Автор

Im 12 y/o and this helped me a lot, thanks!

kthefreak
Автор

Im print "TOKEN", but the out is: "None"

Qdbp-shti
Автор

this was very easy i have barely ever coded with pyuthon but i have learned alot jsut becyse of this tutorial thank you so much!

ProjectMarzDev
Автор

I tried your code and i got a error on line 5 theres no module named discord

cristiangaming