Answer the question
In order to leave comments, you need to log in
How to make a notification about new entries in VK in Python?
Hello, I would like my community to notify the PM about new entries, but something does not work ...
Thanks in advance!
elif data["type"] == "wall_post_new":
object = data["object"]
peer_id = "Мой Id"
id = object["id"] #Id Записи
vk.method("messages.send", {"peer_id": peer_id, "message": "Новая запись!", "attachment": "wall-Id Сообщества_"+id, "random_id": random.randint(1, 2147483647)})
time.sleep(1)
return "ok"
Answer the question
In order to leave comments, you need to log in
Your id can be a str rather than an int. Perhaps the problem is this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question