Multipart¶
discord_http.multipart module¶
- class discord_http.multipart.MultipartData[source]¶
Bases:
object
- attach(name: str, data: File | BufferedIOBase | dict | str, *, filename: str | None = None, content_type: str | None = None) None [source]¶
Attach data to the multipart data
- Parameters:
name (str) – Name of the file data
data (Union[File, io.BufferedIOBase, dict, str]) – The data to attach
filename (Optional[str]) – Filename to be sent on Discord
content_type (Optional[str]) – The content type of the file data (Defaults to ‘application/octet-stream’ if not provided)
- property content_type: str¶
The content type of the multipart data
- Type:
str