Answer the question
In order to leave comments, you need to log in
How to make the bot only respond to the admin command?
Hello! How to make the bot check if a message was sent from the group administrator and run a specific function?? Here is a part of the code, I used to do it through an array with admins' IDs, but it's too dreary. If you can send an example, I will be grateful.
This is how I checked:
if ('джейсон' in message) and ('согласен' in message) and (from_id in ids_admins):
send_message(peer_id, 'Да!')
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