R
R
RINAMI2021-07-03 21:04:12
Python
RINAMI, 2021-07-03 21:04:12

How to make the bot reply to messages (reply)?

The messages.send method has a reply_to parameter, but this parameter does not work for me, it gives the following error:

vk_api.exceptions.ApiError: [100] One of the parameters specified was missing or invalid: reply_to not integer


Here is the function itself:
def chatsenderreply(id, text):
    vk.method("messages.send", {"chat_id": id, "message": text,"reply_to": event.object.message.(from_id), "random_id": 0})

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Bl4ckm45k, 2021-07-03
@Bl4ckm45k

According to the documentation you should not use from_id but message_id

reply_to is the ID of the message to be replied to.
integer, available since version 5.92

message_id — message identifier

messages.send

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question