T
T
trv_752019-02-13 08:42:49
Python
trv_75, 2019-02-13 08:42:49

How to delete an entry from the database when deleting a message in a telegram bot?

I am making a telegram bot in python that writes to the database. Please tell me how to make it so that when deleting a message in a chat with a bot, the entry in the database is deleted? Communication is conducted directly with the bot.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey, 2019-02-15
@Allepta

If the message is deleted by the client, then most likely nothing, although I can suggest checking the message using the message_id filter, if the id is missing, then delete the entry from the database, but I'm not sure that after deleting the message by the client, the telegram deletes the message itself from the server, However, I think it's worth checking out.
In case you delete a message by a bot, then everything should be clear anyway.

V
VasokKiselicya, 2019-02-13
@VasokKiselicya

Telegram has the ability to track message changes, but deletion is not tracked in any way using their API.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question