'How to update a message text on telegram api ? (Python)
I'm developing a telegram bot using telepot, I'm trying to ask the user a question for example: What's your name? Then wait for the user to type the name, and save it in a variable, but this is not a library method, I think. So I decided to create my own method. When asking the question "What is your name?" I will go to the telegram api and I will change the text field to empty so in the next function I will use a loop that does not break until the user's last message is different from empty, understand?
I access: https://api.telegram.org/bot/(enter image description heretoken)getUpdates
and I want to change this session: (Change a message send by user)enter image description here
"message":{"message_id":1133,"from":{"id":5296812825,"is_bot":false,"first_name":"Vinicius","language_code":"pt-br"},"chat" :{"id":5296812825,"first_name":"Vinicius","type":"private"},"date":1652800679,"text":"Mensagem from User"}}] }
for
"message":{"message_id":1133,"from":{"id":5296812825,"is_bot":false,"first_name":"Vinicius","language_code":"pt-br"},"chat" :{"id":5296812825,"first_name":"Vinicius","type":"private"},"date":1652800679,"text":"EMPTY"}}] }
Solution 1:[1]
No; Bot's can't alter messages send by an user
A Telegram bot can only alter/delete his own messages.
Luckily, otherwise every message you send could be altered by some random bot, this would lead to insecure behaviour for sure.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | 0stone0 |
