Answer the question
In order to leave comments, you need to log in
How can I make the user send a text on the topic Prices to the bot and when other people ask the bot about the Tsuna, he would send this answer?
how to make it so that when the admin of the bot sent him, for example, Valuable, then when people wrote the word valuable to the bot, they would receive an admin response. And so that this text could be me without changing the text!
Answer the question
In order to leave comments, you need to log in
write the price to any place - a database or a file, and then read it when requested by users. How did you write a bot in python if you cannot write a variable? It's not entirely clear, or maybe I didn't understand the question.
Divide commands into user and admin commands.
The difference is that if the sender type is not in the list of admins, the command is ignored.
For example, to the admin, we make the command
set word_key the text of the response
in other cases, in the message we look for occurrences of keys, found, sent the answer
what you need
1. learn to receive updates from the telegram
2. form a response when calback or call get requests with the command to send a response when working on crown
3. to disassemble what has come.
4. work with the database
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question