W
W
winniuss2020-01-21 17:46:01
Python
winniuss, 2020-01-21 17:46:01

How to mark messages as read in vk python bot?

I have a bot for the community in VK
, the connection goes like this:

import vk_api
import config
from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType

vk_session = vk_api.VkApi(token=config.token)
longpoll = VkBotLongPoll(vk_session, config.group_id)
vk = vk_session.get_api()

the response to the message looks like this:
vk.messages.send(peer_id=peer_id, random_id=random.getrandbits(32), message=message)

There is an exception when the bot does not find the command. In this case, it does nothing. How to make the bot mark the user's message as read?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Bibletoon, 2020-01-22
@winniuss

use it

A
Andrey, 2020-01-21
@anerev

Send for any message that is not being processed, they say the bot read it but did not understand anything.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question