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: data (BufferedIOBase | str) filename (str | None) spoiler (bool) title (str | None) description (str | None) duration_secs (int | None) waveform (str | None) 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