8000 В каком виде должно быть изображение в attachment? · Issue #4 · yilbegan/vbio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Oct 4, 2019. It is now read-only.

В каком виде должно быть изображение в attachment? #4

Open
NeatKoala opened this issue Aug 25, 2019 · 1 comment

Comments

@NeatKoala
Copy link

У меня сейчас такой код и вылетает исключение, отправляется только сообщение без вложения:

def picture_prepare:
    image = Image.open(BytesIO(image_bytes))
    #работа с картинкой
    return image

@bot.message_handler()
def no_command(m):
    m.answer(message='Привет!',
             attachment = picture_prepare())

Как правильно прикреплять изображение?

@prostomarkeloff
Copy link

тут пример отправки аттачмента: https://github.com/yilbegan/vbio/blob/master/examples/attachment.py

А так - сначала ты должен загрузить изображение на сервер ВКонтакте, через методы, указанные в доке, после уже отправлять сможешь

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0