N
N
Nikita228Gym2021-07-14 22:19:16
Python
Nikita228Gym, 2021-07-14 22:19:16

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 ()


I want to do that I could send voice sms, please help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
slikkness, 2021-07-14
@Nikita228gym

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 question

Ask a Question

731 491 924 answers to any question