Learn How to Make a Python Discord Bot in 17 Minutes. Host for Free!

  Рет қаралды 20,383

ClarityCoders

ClarityCoders

Күн бұрын

Understand how to code a discord bot without spending an hour watching a tutorial. Our goal is to cut all the fat from learning and allow you to move onto bigger and better things!
After this python tutorial you will be able to create a custom discord bot from scratch. In this video we will cover responding to message events and creating bot commands. As well as how to get an API key and creating your server.
@CSDojo
00:00 Intro
00:30 Create Server
01:17 Create Bot and Get API Key
03:27 Code Bot
12:35 Witty Responses
💾 Check out the code!
replit.com/@JacobLower3/Repli...
🌎Free hosting!
repl.it/claim?code=claritycod...
🔑Get your API Key
/ discord
Want to chat with me and other programmers join our discord!
/ discord
#pythontutorial #discordbot #claritycoders

Пікірлер: 109
@mikitaslabysh8271
@mikitaslabysh8271 2 жыл бұрын
Man you got some amazing tutorials, thank you, you deserve more views and subscribers
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks! As long as someone is watching and learning I'll keep doing them no worries.
@ELDhouse
@ELDhouse 3 жыл бұрын
Great job on walking through the code and explaining the components!
@ClarityCoders
@ClarityCoders 3 жыл бұрын
Glad it was helpful!
@MohammedUsaid
@MohammedUsaid 3 жыл бұрын
Thank you so much for this video, I had requested this on CS Dojo's vid on the Telegram bot and you had said it was a good idea. Thanks a lot for listening to the request. I randomly had a thought of visiting your channel to check if you may have done it and I was in luck, fabulous timing! I will try to make a bot fosure
@ClarityCoders
@ClarityCoders 3 жыл бұрын
Glad you stopped by! Keep the good ideas coming.
@MohammedUsaid
@MohammedUsaid 3 жыл бұрын
@@ClarityCoders Haha thanks, subscribed! I had a question, how would I use the bot to mention users using @? For eg: trigger code is $Hello DiscUser: $Hello Bot: Hello @DiscUser or trigger: !hello DiscUser: !hello @AnotherUser Bot: Hello @AnotherUser
@ralphcalzada4767
@ralphcalzada4767 2 жыл бұрын
YOU, MY MANNN, ARE UNDERATED. cant wait for your channel to blow up!!
@ClarityCoders
@ClarityCoders 2 жыл бұрын
I hope your right haha. At any rate I appreciate the comment and views!
@cosmxcsneaky8490
@cosmxcsneaky8490 2 жыл бұрын
THANK YOU holy crap I suck at coding you made it so easy! Another sub
@ilikelobsters.2376
@ilikelobsters.2376 2 жыл бұрын
who else doesn't know anything about coding and python but wants to make a bot?
@missie8574
@missie8574 Жыл бұрын
Finally, a video where I actually have my Bot responding. Thank you ever so much. 100% appreciated!
@ClarityCoders
@ClarityCoders Жыл бұрын
Great to hear! Thanks for watching and commenting.
@stormmllertolshave5968
@stormmllertolshave5968 2 жыл бұрын
I like your voice! Its quite calming!
@shnitzellink4833
@shnitzellink4833 2 жыл бұрын
Ur channel is great I was very surprised to see that you're not more popular! I guess I'm part of the OG club
@ClarityCoders
@ClarityCoders 2 жыл бұрын
forever I won't forget schnitzel the OG! hahs
@hooker7459
@hooker7459 2 жыл бұрын
Thank goodness, the time had come i managed write my first accurate pythons coding
@GreenShadowRaul22
@GreenShadowRaul22 Жыл бұрын
Hey Bro thanks for the video!
@Rouja1
@Rouja1 2 жыл бұрын
I was stuck for ages trying to get me bot to turn on, thank you so much!
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thank you for watching and commenting.
@kalen8110
@kalen8110 2 жыл бұрын
Hello for me it says in lane nine list index out of range and its the same as it is in the video. Does anybody know how to fix this?
@HkLearnsAI
@HkLearnsAI 2 жыл бұрын
can you help me it says: Traceback (most recent call last): File "main.py", line 7, in async def on_ready(): TypeError: event() missing 1 required positional argument: 'coro'
@triambtalwar1393
@triambtalwar1393 3 жыл бұрын
Great video. Gonna make a bot tomorrow
@ClarityCoders
@ClarityCoders 3 жыл бұрын
Thanks! If you have any issues let me know.
@triambtalwar1393
@triambtalwar1393 3 жыл бұрын
@@ClarityCoders It's working perfectly. Thank you so much!
@dogalkaynaksu9385
@dogalkaynaksu9385 2 жыл бұрын
Hello, i want to make a Reddit bot for download saved pictures or videos on my Reddit account. How can i make it? Thanks!
@wonkft
@wonkft Жыл бұрын
hey! i tried it out and ran it then only the packages popped up but it didn't continue to run it stopped after how do i fix this?
@lolgaminghcr2498
@lolgaminghcr2498 2 жыл бұрын
it`s always showing "syntax error: invalid syntax" and my bot go offline
@KiNG-ef8we
@KiNG-ef8we 2 жыл бұрын
someone can help with this ? Traceback (most recent call last): File "main.py", line 4, in client = discord.client() TypeError: 'module' object is not callable
@petsdom
@petsdom 2 жыл бұрын
change the small c of the client to capital C that will fix it!
@toffeecoffee_dev
@toffeecoffee_dev Жыл бұрын
@@petsdom i tryed, it did'nt work? heres the code client = discord.Client()
@Tufted
@Tufted 2 жыл бұрын
hey the code says its already redeemed and i cannot turn on always on
@webrevolution.
@webrevolution. 2 жыл бұрын
Very cool video. I run New York btw.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Town I run is much smaller.
@webrevolution.
@webrevolution. 2 жыл бұрын
@@ClarityCoders Lucky you man. Running NY is exhausting. Also lonely island says it in their song.
@Nightdesert1202
@Nightdesert1202 2 жыл бұрын
Hey, it says Expected an indented block at the logged in now command, how do I fix this?
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Make sure your indents match mine exactly! They matter in Python.
@x9im
@x9im 2 жыл бұрын
I wish I could turn on the always on setting without hacker subscription
@trev110
@trev110 3 жыл бұрын
6:55 whenever I run the code after finishing this step, it claims that the “my_secret” line is invalid (invalid syntax)
@ClarityCoders
@ClarityCoders 3 жыл бұрын
Join our Discord and send something to our help channel we can get it figured out.
@trev110
@trev110 3 жыл бұрын
@@ClarityCoders I went ahead and just copied the code into another repl and it seems to work now, but thank you :)
@hmrajesh3
@hmrajesh3 3 жыл бұрын
Bro please create a tutorial with combination of Google spreadsheet (eg : stock screener) + telegram bot + python. Basic if we give input to bot it has to fetch the rows and columns from the spreadsheet and give us the data. There is no video related on internet. It's and humble request bro.
@ClarityCoders
@ClarityCoders 3 жыл бұрын
Thanks for the idea I'll put it on my todo list!
@Daniel-jg4wk
@Daniel-jg4wk Жыл бұрын
Great tutorial, although i got stuck due to an error: Traceback (most recent call last): File "main.py", line 4, in client = discord.Client() TypeError: __init__() missing 1 required keyword-only argument: 'intents'
@waterbottle195
@waterbottle195 Жыл бұрын
intents = discord.Intents.default() intents.message_content = True client = discord.Client(intents=intents) use that instead of client = discord.Client()
@geraltofrivia9719
@geraltofrivia9719 Жыл бұрын
Can I do it on pycharm?
@Dope-to5pi
@Dope-to5pi 3 жыл бұрын
How can I claim the free hosting
@amanroy1049
@amanroy1049 3 жыл бұрын
Works great. Thanks. Just can't get the subscription through your link.
@amanroy1049
@amanroy1049 3 жыл бұрын
Just checked it again. Everything's working fine. Thanks again.
@ClarityCoders
@ClarityCoders 3 жыл бұрын
Awesome did you get the free hosting if not let me know.
@demischi3018
@demischi3018 3 жыл бұрын
@@ClarityCoders tried to claim the free hosting link in the description, it doesn't work. Nothing happens on that screen after hitting enter.
@volle6400
@volle6400 2 жыл бұрын
How to dowland the csv?
@dosamigos3142
@dosamigos3142 2 жыл бұрын
Hey, I Love this Video But A Problem is Ocurring Please help me. File "main.py", line 23 elif "$Thought" in message.content: ^ IndentationError: unindent does not match any outer indentation level
@dosamigos3142
@dosamigos3142 2 жыл бұрын
Please tell Me The solution asap
@Dope-to5pi
@Dope-to5pi 3 жыл бұрын
How can I claim it
@tanlilian9925
@tanlilian9925 2 жыл бұрын
Uhm i kinda have a little issue here 😅 whenever i run it it says "Traceback (most recent call last): File "main.py", line 4, in cleint = discord.Cleint() AttributeError: module 'discord' has no attribute 'Cleint" Yea-
@ClarityCoders
@ClarityCoders 2 жыл бұрын
you spelled client wrong. 😂 It happens.
@tanlilian9925
@tanlilian9925 2 жыл бұрын
@@ClarityCoders Ouhhhh that makes more sense-
@waziegaming7422
@waziegaming7422 2 жыл бұрын
Traceback (most recent call last): File "main.py", line 11 in my_secret = os.environ['TOKEN'] NameErroe: name 'os' is not defined pls help
@ClarityCoders
@ClarityCoders 2 жыл бұрын
import os make sure thats at the top of your file.
@mihkelmalv946
@mihkelmalv946 2 жыл бұрын
Traceback (most recent call last): File "main.py", line 13, in print(dir(message)) NameError: name 'message' is not defined can someone help me
@idkwhatnicknametomake3787
@idkwhatnicknametomake3787 2 жыл бұрын
Did you import discord?
@kilnareth7970
@kilnareth7970 3 жыл бұрын
Anyone still has a fix regarding async def bein an invalid syntax?
@ClarityCoders
@ClarityCoders 2 жыл бұрын
share code in discord we can help!
@Dem4L
@Dem4L 2 жыл бұрын
It started working for like 20 seconds then said I was blocked from accessing the API because I clicked “Run” too many times /:
@Dem4L
@Dem4L 2 жыл бұрын
Note to self, don’t click “run” 5 times -_-
@fawl1273
@fawl1273 2 жыл бұрын
Could you make a kick and ban command
@Nekroz05
@Nekroz05 2 жыл бұрын
Is this deprecated? I saw a few video for making bots but when i try, it's no longer viable.
@light9808
@light9808 2 жыл бұрын
It shouldnt be. Works fine for me.
@philippurwoko
@philippurwoko 2 жыл бұрын
So Repl.it can host python 24/7 for free. Does it mean I can Host nodejs webserver in Repl.it 24/7 for free too ?
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Well it's only free for a couple months then you have to pay for the hacker plan. You could also use a ping script to host it for free after trial ends.
@Siggeeng
@Siggeeng Жыл бұрын
It says that it’s WRONG at ”on_ready”
@coldcoffeebutstilltired.4704
@coldcoffeebutstilltired.4704 2 жыл бұрын
i cant find the key can you help me? edit: aka link
@ananthsriram9722
@ananthsriram9722 2 жыл бұрын
can I get the CSV file
@Kaje376
@Kaje376 2 жыл бұрын
Hey, it tells me that the code has been already redeemed, would appreciate it you could add a new one :)
@ClarityCoders
@ClarityCoders 2 жыл бұрын
I'll hit them up and see what I can do.
@phantavius
@phantavius 2 жыл бұрын
Do one for role management.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Really good idea. I'm like 95% sure this will be in my next 5 videos.
@phantavius
@phantavius 2 жыл бұрын
@@ClarityCoders appreciate it. :)
@music-heart3121
@music-heart3121 2 жыл бұрын
Bhai all are saying thank you but my python says os not defined
@music-heart3121
@music-heart3121 2 жыл бұрын
Now working
@music-heart3121
@music-heart3121 2 жыл бұрын
import os
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Sorry Wish i had seen this earlier I would have helped you out!
@hanjiawang9507
@hanjiawang9507 2 жыл бұрын
DO you know how to make another @client.event async def on_message(message): if message.content.startswith("____"): await message.channel.send(f"______!") because when i make another, it just doesn't work
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Don't make another @client.event just nest them inside with if statements for example if message.content.startswith("$greet"): await message.channel.send(f"Hello! How are you {message.author}") elif message.content.startswith("something else remember case matters!"): response = phrases[random.randint(0, len(phrases) - 1)] await message.channel.send(response) elif "$thought" in message.content: response = phrases[random.randint(0, len(phrases) - 1)] await message.channel.send(response)
@masculine.brotherhood
@masculine.brotherhood Жыл бұрын
To Fix: TypeError: __init__() missing 1 required keyword-only argument: 'intents' Change: client = discord.Client() To: client = discord.Client(intents=discord.Intents.default()) You're welcome.
@LucasFromGuam
@LucasFromGuam 2 жыл бұрын
what does the csv file look like in excel?
@epicone8953
@epicone8953 2 жыл бұрын
Do that video
@AnthonyWho
@AnthonyWho 2 жыл бұрын
whats your discord server
@ClarityCoders
@ClarityCoders 2 жыл бұрын
discord.gg/cAWW5qq stop by and say hi!
@shaoliroy6469
@shaoliroy6469 2 жыл бұрын
bruh how do i get the csv file?
@shaoliroy6469
@shaoliroy6469 2 жыл бұрын
nvm i got it
@This_is_Fact7
@This_is_Fact7 2 жыл бұрын
how did you get it?
@joshuasimmons571
@joshuasimmons571 2 жыл бұрын
instead of mentioning the user can you @ everyone??
@kn1gh1f1re
@kn1gh1f1re 2 жыл бұрын
issue is there
@teceem
@teceem Жыл бұрын
Sorry, 1st use vs code or pycharm 2nd YOU NEED INTENTS!
@Dope-to5pi
@Dope-to5pi 3 жыл бұрын
It just shows the code
@ClarityCoders
@ClarityCoders 3 жыл бұрын
You sure you don't have it already? Try to turn always on - on
@MasonJerman
@MasonJerman 2 жыл бұрын
SIU?!? you must be near me. E or C?
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Maybe.... haha. My brother went there at one time. C
@rip_jxofvrr
@rip_jxofvrr 2 жыл бұрын
doesn't work
@ClarityCoders
@ClarityCoders 2 жыл бұрын
It does! Something must be off if you join our discord we should be able to help.
@RonnieBlaze281
@RonnieBlaze281 2 жыл бұрын
replit deactivated your code already
@toffeecoffee_dev
@toffeecoffee_dev Жыл бұрын
The Totorial is great! I only got stuck on line four, heres the code: client = discord.Client() Error message: Traceback (most recent call last): File "main.py", line 4, in client = discord.Client() TypeError: __init__() missing 1 required keyword-only argument: 'intents'
Dominating an Online Multiplayer Game using Python and OpenCV.
14:31
ClarityCoders
Рет қаралды 274 М.
Building a simple Instagram Bot in 2020
26:32
ClarityCoders
Рет қаралды 14 М.
Why You Should Always Help Others ❤️
00:40
Alan Chikin Chow
Рет қаралды 8 МЛН
Bot Plays Dino Run! Can our dinosaur bot be stopped?
11:30
ClarityCoders
Рет қаралды 50 М.
Host a Python Discord Bot on AWS Lambda (Free and Easy)
21:40
Code a Discord Bot with JavaScript - Host for Free in the Cloud
56:30
freeCodeCamp.org
Рет қаралды 425 М.
FastAI learns to play Fall Guys - Undetectable Fall Guys bot.
12:13
ClarityCoders
Рет қаралды 794 М.
How to make advanced image recognition bots using python
15:01
Kian Brose
Рет қаралды 1,3 МЛН
Code a Discord Bot with Python - Host for Free in the Cloud
1:08:28
freeCodeCamp.org
Рет қаралды 2,3 МЛН
Speed Up Your Home Wi-Fi by Changing ONE Simple Setting!
7:03
Maraksot78
Рет қаралды 1,5 МЛН
👎Главный МИНУС планшета Apple🍏
0:29
Demin's Lounge
Рет қаралды 514 М.
Carregando telefone com carregador cortado
1:01
Andcarli
Рет қаралды 2,1 МЛН
wyłącznik
0:50
Panele Fotowoltaiczne
Рет қаралды 23 МЛН
5 НЕЛЕГАЛЬНЫХ гаджетов, за которые вас посадят
0:59
Кибер Андерсон
Рет қаралды 1,1 МЛН