discord.py send image
await channel.send(file=discord.File('path/to/image.png'))
discord.py send image
await channel.send(file=discord.File('path/to/image.png'))
send image discord.py
await channel.send(file=discord.File('my_image.png'))
discord.py send image from url
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'))
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us