Thank you for the series Ajay, such a great work. Just a quick question I´m not finding any docs for... how can you listen all the channels (or at least several channels)? I mean, is there a way to let the bot check for those command on more than one channel? I´m gonna keep searching for, but if you have any comment about this, just let me know. Thanks again.
is there a way to make it send in all channels of a server not just one like if the keyword is triggered in channel a it will respond in channel and if the keyword is triggered in channel b it will respond in channel b it wont just respond in one channel for all messages
hi, really liking the tutorial so far : ) Very useful. I'm trying to make it so my bot will delete messages in most channels that have a certain ping (an @role) also message the sender with a warning and deleted chatter in specific channels that are designated for those pings Is this possible? I've seen a couple other big servers that have bots that do this, I'm just not sure how they did it
I'm new to python and when I ran the first program i got a bunch of errors containing links to a python file that i didn't write. I'm sorry that I sound like a noob but can someone pls help?
Whenever I try to run the first hello command it doesn't show the async in blue and the on ready is just treated as the normal text is there any way I can fix this problem
I got it too, that means it couldn't find the channel u were looking for in "general_channel = client.get_channel([Integer])".. And that variable is then empty.. Check the integer is right and also, if you use some external bot(like Yui) to like clear the messages of the all channel (nuke for yui) make sure that after nuking you check the id again.. Also, for the on_message instead of sending to general_channel and needing the id every time, you can use message.channel and it will get the channel the message was written into.. To send something there use "await message.channel.send(" Hello") and it will send text to the channel was sent into
how would I make it so no mater how they type it in, the message.content is modified to all lower case or all upper case? example "What is the Version" or "what is the VERSION" gets changed before the if statement to "what is the version"?
When i run my bot it only reacts to one event so one of my commands is ?version and the other is ?modcontent and the bot only responds to ?version and ignores ?modcontent
guys i need help i don use client i use @bot.event this code does not say error but it also does not do anything @bot.event async def on_message(message): if message == "hello": general_channel = bot.get_channel(id)#question: what id is this exactly await ctx.send("Hola") i took off general_channel = bot.get_channel(id) and it also did not work it just does nor run
I found this Error Traceback(most recent call last): File "C:\ProgramData\Anaconda3\lib\site-pakages\discord\client.py", line 333, in _run_event await coro(*args, **kwargs) File "new.py", line 15, in on_message if message.content == 'hello': NameError: name 'message' is not defined Ignoring exception in on_message File "C:\ProgramData\Anaconda3\lib\site-pakages\discord\client.py", line 333, in _run_event await coro(*args, **kwargs) File "new.py", line 15, in on_message if message.content == 'hello': NameError: name 'message' is not defined Anyone any suggestions please.
Hey Ajay!
Keep on doing this great job, I'm learning a lot.
This is one of the only places I found updated tutorial for discord bots.
I don't usually comment but man you are so good at teaching and explaining stuff! Mad respect my dude, Subbed and liked!
Thank you so much! I've been wanting to try this for ages!
THANK YOU AJAY THIS IS EXCATLY WHAT I NEREDED
You are a great teacher. You review import concepts which a lot of youtuber teachers neglect to do
This guy is very underrated
woah..ur the first person who's code actually works and thx for the link of the documentation! Love from india
Excellent explanations Ajay!
Thank you for the series Ajay, such a great work.
Just a quick question I´m not finding any docs for... how can you listen all the channels (or at least several channels)? I mean, is there a way to let the bot check for those command on more than one channel? I´m gonna keep searching for, but if you have any comment about this, just let me know. Thanks again.
No video can be better than this video
You told that you will provide the links but I think you totally forgot about it. By the way, you teach very nicely and I am loving this series.
You are so helpful! Thank you so much!
is there a way to make it send in all channels of a server not just one like if the keyword is triggered in channel a it will respond in channel and if the keyword is triggered in channel b it will respond in channel b it wont just respond in one channel for all messages
good tutorial !! I'm waiting for the nexts
ajay god
I want to try to make my own bot. Your video is so great for the beginner like me! Thank you for such a detail explanation!
It says .send is not found
heyy my bot doesnt work when i say the message
it doesnt reply
same!!
how do i make the commands accesible in any channel?
Your channel helpful so much. good videos
Anyone know why async def is being syntax errored?
This is what I was actually looking for thanks
how to make discord bot that gives roles when you join voice channel and removes when left !
Great Videos!
love the series sir
hi, really liking the tutorial so far : ) Very useful.
I'm trying to make it so my bot will delete messages in most channels that have a certain ping (an @role) also message the sender with a warning
and deleted chatter in specific channels that are designated for those pings
Is this possible? I've seen a couple other big servers that have bots that do this, I'm just not sure how they did it
THANK U SO MUCH DUDE! :)
I'm new to python and when I ran the first program i got a bunch of errors containing links to a python file that i didn't write. I'm sorry that I sound like a noob but can someone pls help?
E, I was doing message == "Hello", but not message.content == "Hello"
Half an hour until I realiesed
GG, good video
Best Ytuber
Whenever I try to run the first hello command it doesn't show the async in blue and the on ready is just treated as the normal text is there any way I can fix this problem
I keep getting this error.
AttributeError: 'NoneType' object has no attribute 'send'
I got it too, that means it couldn't find the channel u were looking for in "general_channel = client.get_channel([Integer])".. And that variable is then empty.. Check the integer is right and also, if you use some external bot(like Yui) to like clear the messages of the all channel (nuke for yui) make sure that after nuking you check the id again.. Also, for the on_message instead of sending to general_channel and needing the id every time, you can use message.channel and it will get the channel the message was written into.. To send something there use "await message.channel.send(" Hello") and it will send text to the channel was sent into
get rid of ' or " mark and it will work because it consdried it a string
why do you sensor your username but in the middle you not.
how would I make it so no mater how they type it in, the message.content is modified to all lower case or all upper case? example "What is the Version" or "what is the VERSION" gets changed before the if statement to "what is the version"?
plz help, it shows me an unexpected intend error on await although I did the same intend as you!!
my @on_message is trigger too many tines i am cannot handle this help me
When i run my bot it only reacts to one event so one of my commands is ?version and the other is ?modcontent and the bot only responds to ?version and ignores ?modcontent
Same here, One command works, and one doesn't.
When I run my bot, I get this error: AttributeError: 'NoneType' object has no attribute 'send'
yeah I had this issue as well...turns out I fat fingered the last digit of the channel ID lol
Did you put await before general_channel.send?
At least that’s how I fixed it after I forgot to put it
you cant use
async def on_message(message):
two times pls help
add an if statement within the same function
thank u ur getting a sub
guys i need help i don use client i use @bot.event
this code does not say error but it also does not do anything
@bot.event
async def on_message(message):
if message == "hello":
general_channel = bot.get_channel(id)#question: what id is this exactly
await ctx.send("Hola")
i took off general_channel = bot.get_channel(id) and it also did not work it just does nor run
bot.get_channel(id)
#write the channel ID between the brackets instead of id
I found this Error
Traceback(most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-pakages\discord\client.py", line 333,
in _run_event
await coro(*args, **kwargs)
File "new.py", line 15, in on_message
if message.content == 'hello':
NameError: name 'message' is not defined
Ignoring exception in on_message
File "C:\ProgramData\Anaconda3\lib\site-pakages\discord\client.py", line 333,
in _run_event
await coro(*args, **kwargs)
File "new.py", line 15, in on_message
if message.content == 'hello':
NameError: name 'message' is not defined
Anyone any suggestions please.
damn ur a highschooler thats impressive
im comment #69 pog :o
:))
#NotificationGang
.