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.
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
@@ilikecreeper331 if you're asking if I've improved, not really. I only made a discord bot for an april fools gag for a couple of my friends. It does seem fun to learn later down the line if I ever do
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
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
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
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?
Hi, I really liked the video! Can you show us how to implement a RU-vid video tracking functionality (like Pingcord)? I've looked online but I can't find a way to do this since I'm not the owner of the RU-vid Account whose videos I wanna be reminded of. Thanks :) EDIT: Also slash commands please!!
I don't think he understands how much some Linux users love the terminal. xD I'm legit working on a file manager for it. You may be asking why, and I'll tell you the reason is "why not"?
i had the same problem, so my suggestion is making sure its "discord" and not "Discord", as that was the problem for me when I got the same error message. If that doesn't work, then idk I'm pretty beginner at coding :|
The venv (virtual environment) folder is for storing the project specific modules without changing the global one. In this case we have the standard Python modules in there plus the modules installed witht pip: discord and dotenv.
thank you for this tutorial, i have been looking for a good discord bot tutorial, but for some reason the "import os" section does not work as ""os" is not accessed by Pylance"
I have an error AttributeError: 'Intents' object has no attribute 'message_content'. Has the docs changed because I am getting it when I run your code and the one I wrote
Received an error saying: 'token' is not identified. When I look through the Discord_Token i noticed it's not highlighted in green like in the tutorial, but otherwise I followed everything normally. The code does print my token as it did in the tutorial. Is there a fix? Please and thank you Edit: I figured it out.
Thanks for the information. I have now created my Discord Bot and its online but it wont respond to any message I type. Can you please re-upload this video and also add the chapter "Fix the bot when not responding to any messages"
Hi! Really love the tutorial. Was just wondering, cause when I try to run the script I get a error message saying "asyncio.run() cannot be called from an running event loop", I just can't figure out what is causing this error.
I followed the steps to this tutorial to a T, but I get stuck on the SSL certification. It states that my certification isn't valid, however I already updated it and all
depending on your version of Python, you should have a install certificates.command in your python folder I believe and that fixes the problem for most users. If you copy and paste the last line of the error code into your web browser you should be able to find some solutions if it is a certificate problem on the internet.
That's work, but only on my channel where I'm as an owner, but it didn't work on my friend channel where I'm as an admin and my friend as an owner. I don't really understand discord 😢
im stuck at 7:35 from dotnev import load_dotnev I have a bug saying Cannot find reference 'load_dotenv' in '__init__.py' I can't figure out how to fix it
do you know if you have dotenv library installed on your machine? Sounds like python is trying to find the function, but can't find the package directory. Also make sure everything is spelled correctly.
Too many one liner which makes it super hard for normal devs to read the code. Remember a code is written once and read like 10 times. Always write one more line but keep it readable. I say this as a senior developer.
I recieved SO many errors and when I clicked the link to show me where it was it pulled up a bunch of random code that I never wrote nor could I edit it because it was read only. It went down into thousands of lines of code. I think it has something to do with the new intent stuff but I have no clue what to do about it. I coded everything exactly as is in the video. Can someone help?
Last time i tried to learn python few years ago, and i don't remember this stuff with colons. All this stuff like "lowered : str =..." or "intents: Intents" = ... or "client: Client = ..." etc. Is this something new? I failed to even properly google it.
yo buddy.. when i ran main 8:07 ... for me this comment popped up PS C:\Users\jonan> & C:/Users/jonan/AppData/Local/Programs/Python/Python312/python.exe d:/main Traceback (most recent call last): File "d:\main", line 3, in from dotenv import load_dotenv ModuleNotFoundError: No module named 'dotenv' what did i do wrong and how do i fix it
The bot should not be able to send a ddos attack because Discord will rate limit your bot, which is a HTTP error forcing your bot to disconnect and go offline.