Answer the question
In order to leave comments, you need to log in
Why doesn't the attachment function work?
Here is the actual code:
if msg == 'Рандом фото':
vk.messages.send(
chat_id = event.chat_id,
attachment = "photo585191239_457239077",
random_id = 0,
)
Answer the question
In order to leave comments, you need to log in
1) To display the response from the api, you need to save and output the response,
like this:
response = vk.messages.send( chat_id = event.chat_id, attachment = "photo585191239_457239077", random_id = 0,)
print(response)
import random
random_id = random.randrange(1, 10000)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question