W
W
Wearant2021-11-30 01:11:12
Python
Wearant, 2021-11-30 01:11:12

How do I reply to a message in a conversation on behalf of a bot?

event.message

{'date': 1638223595, 'from_id': 160***741, 'id': 0, 'out': 0, 'peer_id': 2000000001, 'text': '@all', 'attachments': [], 'conversation_message_id': 2824, 'fwd_messages': [], 'important': False, 'is_hidden': False, 'random_id': 0}


def send_replyls(peer_id,message,idls):
        vk_session.method("messages.send",{
        "message" : message , 
        "peer_id" : peer_id,
        "reply_to" : idls,
        "random_id" : round(random() * 10 ** 9)
        })


This is how it works in private messages of the community (bot)
I can’t understand what needs to be sent to answer the conversation, on behalf of the bot

def send_reply(message,conversation_message_id,peer_id):
        vk_session.method("messages.send",{
        "message" : message ,            
        "peer_id" : peer_id,
        "reply_to" : conversation_message_id,
        "random_id" : round(random() * 10 ** 9)
        })

[10] Internal server error


https://vk.com/dev/messages.send
tried everything, either I'm tight or I'm tight

VK_API library

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question