Answer the question
In order to leave comments, you need to log in
How to send messages to the chat using the vk library?
I am writing a bot using the vk library .
Using this code, the bot wrote messages, but it could only send messages to a specific person, not to a chat (in the chat, it simply did not respond to commands):
api.messages.send(access_token=config.token, user_id=str(user_id), message=msg)
api.messages.send(access_token=config.token, peer_id=str(peer_id), message=msg)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question