Discord.py Wyślij obraz
await channel.send(file=discord.File('path/to/image.png'))
await channel.send(file=discord.File('path/to/image.png'))
await channel.send(file=discord.File('my_image.png'))
import io
import aiohttp
async with aiohttp.ClientSession() as session:
async with session.get(my_url) as resp:
if resp.status != 200:
return await channel.send('Could not download file...')
data = io.BytesIO(await resp.read())
await channel.send(file=discord.File(data, 'cool_image.png'))