for event in longpoll.listen():
if event.type == VkBotEventType.MESSAGE_NEW and event.from_chat and event.object['photos'] !="": #Получение сигнала на то, что пришло сообщение
msg = event.object['photos']
id = event.chat_id
print("plant A")
#удаляем данное сообщение...
KeyError: 'photos'