File

discord_http.file module

class discord_http.file.File(data: BufferedIOBase | str, *, filename: str | None = None, spoiler: bool = False, description: str | None = None)[source]

Bases: object

close() → None[source]

Close the file buffer

property filename: str

The filename of the file

Type:

str

reset(*, seek: int | bool = True) → None[source]

Reset the file buffer to the original position

to_dict(index: int) → dict[source]

dict: The file as a dictionary