Answer the question
In order to leave comments, you need to log in
How can I send graffiti to VK?
I don’t know how to send graffiti to VK
, my approximate code is:
def primer():
commands
for event in longpoll.listen():
if event.type == VkEventType.MESSAGE_NEW and event.from_me:
try:
if event.text == "пример":
commands ()
Answer the question
In order to leave comments, you need to log in
Just like I answered you here , but instead of audio_message you put graffiti, like this:
upload = VkUpload(vk)
graffiti = upload.graffiti(image='filename.png', peer_id=peer_id)
owner_id = graffiti['graffiti']['owner_id']
graffiti_id = graffiti['graffiti']['id']
attachment = 'doc{}_{}'.format(owner_id, graffiti_id)
vk.messages.send(peer_id=peer_ids, attachment=attachment, random_id=get_random_id())
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question