Appearance
discohook.attachment
Classes
Attachment
discohook.attachment.Attachment
Represents a discord file attachment.
Attributes
- id (
str): ID of attachment. - filename (
str): Filename of attachment. - description (
str): Description of attachment. - content_type (
str): Content type of attachment. - size (
int): Size of attachment. - url (
str): URL of attachment. - proxy_url (
str): Proxy URL of attachment. - height (
int): Height of attachment. - width (
int): Width of attachment. - ephemeral (
bool): Whether attachment is ephemeral. - duration_secs (
int): Duration of attachment. - waveform (
str): Waveform of attachment. - flags (
int): Flags of attachment. - placeholder (
str): Placeholder of attachment. - placeholder_version (
int): Placeholder version of attachment.
Method Index
Methods
iter
python
async iter(self) -> aiohttp.streams.StreamReaderCreates an asynchronous generator.
Returns
- Type:
aiohttp.StreamReader- Asynchronous generator.
read
python
async read(self) -> bytesReads content of attachment.
Returns
- Type:
bytes- Content of attachment in bytes.
