def send_photo(url):
vk_session.method('messages.send', {'user_id': id, 'attachment': url, 'random_id': 0})
vk.method("messages.send", {"peer_id": id, "message": "TEST", "attachment": "photo-57846937_457307562", "random_id": 0})
for event in longpoll.listen():
if event.type == VkBotEventType.MESSAGE_NEW:
vk.messages.send(
key = ('0b2726f36c1010184240301d8684459c0dc2a5ce'),
server = ('
https://lp.vk.com/wh204823014'),
ts=('1'),
sender(msg),
random_id = get_random_id(),
chat_id = event.chat_id,
attachment=','.join(attachments),
msg = event.text.lower(),
massege=vk.method("messages.send", {"peer_id": id, "message": "TEST", "attachment": "photo-57846937_457307562", "random_id": 0})
)