0

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"}}] }

1 Answers1

0

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.

0stone0
  • 34,288
  • 4
  • 39
  • 64
  • requests.post("https://api.telegram.org/bot(TOKENBOT)/getUpdates",{'offset': update_id}) This command delete, i just dont know how to edit. – Pablo Vinicius May 17 '22 at 16:40