Answer the question
In order to leave comments, you need to log in
How to mention a conversation participant in a message via vk API?
I'm trying to send a message from the chatbot, which contains mentions of the participants in the conversation. Used the message.send method. Forms like [id|name], @ or * didn't work. Using domain does not change anything, maybe I'm using it incorrectly, if possible, please explain how it works
Code:
def write_msg(session,user_id, message,domain):
rand=random.randint(-9223372036854775807,9223372036854775807)
session.method('messages.send', {'peer_id': user_id,'random_id':rand ,'message': str(message),"domain":str(domain)})
Answer the question
In order to leave comments, you need to log in
[id|name] should work - 100%. Do you specify exactly in the format: [id12312412|Vasya]?
What sends when it doesn't work?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question