Answer the question
In order to leave comments, you need to log in
How to make the bot not react to messages in which there is a part of the word to which it should react?
@bot.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
@bot.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith("привет"):
await message.channel.send('привет')
Answer the question
In order to leave comments, you need to log in
So chtol?
Or if you need a few words, then
if message.content == "привет":
my_list = ["привет", "ку", "дарова"]
if message.content in my_list:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question