Represents a class for all image endpoints.
- url (
str
): The URL of the image.
Retrieves the image data asynchronously.
- If
bytesio
isTrue
(default), returns anio.BytesIO
object containing the image data. - If
bytesio
isFalse
, returns the raw image data asbytes
.
- bytesio (
Optional
[bool
]): Whether to return the data as anio.BytesIO
object. Defaults toTrue
.
io.BytesIO
orbytes
: The image data in the requested format.
Converts the image into a file-like object, suitable for uploading or further processing.
- cls (
FileLike
): The file-like class or object to use (e.g.,discord.File
from discord.py). - filename (
Optional
[str
]): The filename to assign to the image. Defaults to"image.png"
.
FileLike
: The image wrapped in the specified file-like object.