import requests
import vk_api
vk_session = vk_api.VkApi(token='c53db34bc26565940cbe189830e75eee81a6e0ff431696ef4990df21049da26c11f7bb76b8f56f98e9a33')
from vk_api.longpoll import VkLongPoll, VkEventType
longpoll = VkLongPoll(vk_session)
vk = vk_session.get_api()
for event in longpoll.listen():
if event.type == VkEventType.MESSAGE_NEW and event.to_me and event.text:
if event.text == 'Привет' or event.text == 'привет':
if event.from_user:
vk.messages.send(
user_id=event.user_id
message(message выделяется красным)='Дороу'
)
elif event.from_chat:
vk.messages.send(
chat_id=event.chat_id
message='Die'
)
vk.messages.send(
user_id=event.user_id
message(message выделяется красным)='Дороу'
)
vk.messages.send(
chat_id=event.chat_id
message='Die'
)