def sender (id, text):
vk_session.method('messages.send', {'chat_id' : id, 'message' : text, 'random_id' : 0})
for event in longpoll.listen():
if event.type == VkBotEventType.MESSAGE_NEW:
if event.from_chat:
id = event.chat_id
user_id = event.object.user_id
msg = event.object.message['text'].lower()
if msg == 'а':
sender(id, f'{user_id} кто ты?')