Answer the question
In order to leave comments, you need to log in
How to catch an event in a specific VK group through wall.get?
There is a bot written in python, vkbot_longpoll. I can’t figure out how to make the bot follow a certain group and if a new entry appears there, send me a message to the console.
Here is part of the code:
while True:
try:
for event in longPoll.listen():
if event.type == VkBotEventType.MESSAGE_NEW:
from_id = event.obj['from_id'] # id пользователя, который отправил сообщение
peer_id = event.obj['peer_id'] # peer_id беседы или ЛС, откуда пришло сообщение
if "Кулл" == message and (from_id in ids_admins):
cool()
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