File

discord_http.file module

class discord_http.file.File(data, filename=None, *, spoiler=False, title=None, description=None, duration_secs=None, waveform=None)

Bases: object

Parameters:
close() None

Close the file buffer.

Return type:

None

property filename: str

The filename of the file.

reset(*, seek=True) None

Reset the file buffer to the original position.

Return type:

None

Parameters:

seek (int | bool)

to_dict(index) dict

The file as a dictionary.

Parameters:

index (int) – The index of the file

Return type:

dict

Returns:

The file as a dictionary