L
L
Lenn2021-04-01 23:08:22
Bots
Lenn, 2021-04-01 23:08:22

Can the bot respond to chat messages?

There is a bot that sends messages to the chat, can it react to the responses of the chat participants in a certain way? For example, having received a response to your message, find it by ID and delete it. If yes, how to implement it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor, 2021-04-02
@IgorPI

Can the bot respond to chat messages?

Maybe.
Delete message
Use this method to delete a message, including service messages, with the following restrictions:
- A message can only be deleted if it was sent less than 48 hours ago.
- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.
- Bots can delete outgoing messages in private chats, groups and supergroups.
- Bots can delete incoming messages in private chats.
- Bots with can_post_messages permission can delete outgoing messages in channels.
- If the bot is the administrator of the group, it can delete any message there.
- If the bot has permission can_delete_messagesin a supergroup or channel, he can delete any message there.
On this topic

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question