Represents an attachment in a dpp::message.
More...
#include <message.h>
Represents an attachment in a dpp::message.
◆ attachment() [1/2]
dpp::attachment::attachment |
( |
struct message * |
o | ) |
|
Constructs a new attachment object.
- Parameters
-
◆ attachment() [2/2]
dpp::attachment::attachment |
( |
struct message * |
o, |
|
|
nlohmann::json * |
j |
|
) |
| |
Constructs a new attachment object from a JSON object.
- Parameters
-
◆ ~attachment()
dpp::attachment::~attachment |
( |
| ) |
|
|
default |
Destructs the attachment object.
◆ download()
Download this attachment.
- Parameters
-
callback | A callback which is called when the download completes. |
- Note
- The content of the file will be in the http_info.body parameter of the callback parameter.
- Exceptions
-
◆ content_type
std::string dpp::attachment::content_type |
MIME type of the attachment, if applicable
◆ ephemeral
bool dpp::attachment::ephemeral |
Whether this attachment is ephemeral, if applicable
◆ filename
std::string dpp::attachment::filename |
File name of the attachment
◆ height
uint32_t dpp::attachment::height |
Height of the attachment, if applicable
◆ id
◆ owner
struct message* dpp::attachment::owner |
◆ proxy_url
std::string dpp::attachment::proxy_url |
Proxied URL which points to the attachment
◆ size
uint32_t dpp::attachment::size |
Size of the attachment in bytes
◆ url
std::string dpp::attachment::url |
URL which points to the attachment
◆ width
uint32_t dpp::attachment::width |
Width of the attachment, if applicable