Answer the question
In order to leave comments, you need to log in
How to make the bot respond if there is a keyword in the text?
for example, a person writes hello to someone and the bot accepts hello as for himself
if textl.lower() == 'привет':
try:
vk.messages.send(
peer_id=peer_id,
message='привет',
random_id=get_random_id(),
)
except Exception as e:
print ("Сообщение не отправленно")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question