L
L
LordOftheCode2021-09-19 17:55:46
Python
LordOftheCode, 2021-09-19 17:55:46

How to send aiogram python photo?

I have a photo, I don’t know how to send it through aiogram python
, I googled it and didn’t find it,
please tell me the

code:

img = requests.get('https:' + src, headers=headers)
out = open('../Gdz/img/gdz.png', 'wb')
out.write(img.content)


@dp.message_handler(commands=['start', 'help'])
async def send_welcome(message: types.Message):
    await bot.send_photo(admin_id, out)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Bl4ckm45k, 2021-09-19
@Bl4ckm45k

from aiogram import types


await bot.send_photo(admin_id, types.InputFile('путь к файлу'))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question