import random, vk_api
from vk_api.utils import get_random_id
vk_session = vk_api.VkApi(token = token)
from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType
longpoll = VkBotLongPoll(vk_session)
vk = vk_session.get_api()
for event in longpoll.listen():
if event.type == VkBotEventType.MESSAGE_NEW:
if event.from_chat:
users_message = event.object.message['text'].lower()
if users_message == 'привет':
vk.messages.send(random_id = get_random_id(), message = 'Приветствую', chat_id = event.chat_id)