Simple Discord Bot in Python
Vložit
- čas přidán 25. 07. 2024
- Today we learn how to code a simple Discord bot in Python.
Get Tabnine Pro for 50% off here: www.tabnine.com/pricing/check...
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
💻 The Algorithm Bible Book: www.neuralnine.com/books/
🐍 The Python Bible Book: www.neuralnine.com/books/
👕 Programming Merch: www.neuralnine.com/shop
🌐 Social Media & Contact 🌐
📱 Website: www.neuralnine.com/
📷 Instagram: / neuralnine
🐦 Twitter: / neuralnine
🤵 LinkedIn: / neuralnine
📁 GitHub: github.com/NeuralNine
🎵 Outro Music From: www.bensound.com/
Timestamps:
(0:00) Intro
(2:21) Setting Up Discord Bot
(6:36) Installation & Authentication
(10:16) Sending Basic Messages
(14:18) Sending DMs
(15:35) Sending Message On Connect
(16:56) On Member Join
(18:51) Stock Price Bot
(25:51) Outro - Věda a technologie
Your videos are so great! Would love to see another code wars video, you could make it a series :D
Another usefull tutorial !
I see that your pycharm is well customed, can you do an overview of the main plugins and themes you have ?
Thanks again for all your videos !
Nice video! Well explained :)
well explained, thanks
Can you show us how to add more things? i couldn't figure out
for those who can't find Copy ID option you just need to turn on developer mode feature
You're one of the reason I started my channel. Great content as always.
Well explained and innovative.
@CRACKED 😌
Awesome!
YES, BEEN WAITING FOR THIS VIDEO! THANKS! neuralnine fire no cap
Great content thanks
I did exactly what your tutorial shows and i keep getting "RuntimeError: Event loop is closed"
The discord dev portal has lots of poorly explained options. I don't understand what im doing wrong
Two questions..
1) How do I get the bot to be online all the time. Kinda seems like it just runs an event loop which closes when the program closes?
2) Is there a bug in your code, keep getting this " File "c:\Users\post\Documents\Python Coding\TKBOT\tkbot.py", line 27, in on_connect
await channel.send("Just connected to channel")
AttributeError: 'NoneType' object has no attribute 'send'"
Thank you nice video
Yay!, thanks for this amazing video!. I hope we can get more in depth in the future. ;)
can i ask why im doing like you but i get error message
Yeaaaaa man pls do every part for discord bot thankssssssss fianly
If any1 is having trouble copying the channel id you need to have dev mode enabled you can goto setting>advanced then check deveoper mode
this guy is really good
Great bro
Your Are really Great :)
Thanks, I was able to leverage a bot from 0 within 15 munites
@neuralnine Please make a video about backend tiktok clone, please my guy
Hi nerualnine if I disconnect my internet connection then my bot will go offline? Do I need to host my bot to keep bot online?
You need to keep your computer connected to internet for the bot to work, also if you turn off your pc the bot goes offline
Oooh i wanted this so bad
Ayyyy nice!!
*Great* 💕
This event loop is already running
During handling of the above exception, another exception occurred:
How do I actually host the bot ? I can't really have that running on my machine the whole time.
You have to either rent a server to run it on or have your computer run it 24/7
Stonks
can you also make video for Telegram bot in python too? ^^
Can someone tell me why my code still tells me "no module named discord" after i pip install it?
same problem here
" 'pip' is not recognized as a external or a internal command " how to fix?
use pip3 then
plz make video on json
6:04 that's what a robot would say
nice
Makes bot:
Me: ok and now?
Make a tutorial on Ursina or panda3d🥺
I’m pretty sure he may, coz Ursina is very easy and powerful
@@ananthramvijayaraj4554 he didn't have any interest in 3d cause he had said it in his previous videos
Telegram bot next tutorial ?
Can u make video of telegram Bot
Yey
saw this video just as i was coding a bot for my discord server... what are the odds?
google is spying on you
I was literally trying to relearn this yesterday
it usually not online it offline
Yo!!
Can you please upload videos on deep learning algorithms like CNN's and RNN's .. bytheway love your content ❤️ you always bring something new ❤️
❤️
client.run(TOKEN) didnt work
me too, did u solve?
im not early but im here :)
client = discord.Client()
Did you ever find a solution to this problem? I am having something similar.
@@useless7497 No.
@@useless7497 here:
client = discord.Client(intents=discord.Intents.default())
intents = discord.Intents.all()
intents.members = True
intents.message_content = True
client = discord.Client(intents=intents)
ah you must use discord.ext.commands otherwise newbies gonna use on_message 🤣
u r doing it the hard way... try @client.command()
for anybody having trouble with # Define your intents
intents = discord.Intents.default()
intents.typing = False # For example, you can customize the intents as needed
# Create the Client instance with the intents
client = discord.Client(intents=intents)
With the new API update they changed how it works so replace "Client = discord.Client()" With
# Define your intents
intents = discord.Intents.default()
intents.typing = False # For example, you can customize the intents as needed
# Create the Client instance with the intents
client = discord.Client(intents=intents)
# Rest of your code