#include <Message.h>
|
std::string | get_token () const |
|
json | api_call (const std::string &url, const std::string &method="GET", const json &data=json(), const std::string &content_type="", const bool cache=true) |
| helper function to communicate with the http api
|
|
◆ Type
Enumerator |
---|
DEFAULT | |
RECIPIENT_ADD | |
RECIPIENT_REMOVE | |
CALL | |
CHANNEL_NAME_CHANGE | |
CHANNEL_ICON_CHANGE | |
CHANNEL_PINNED_MESSAGE | |
GUILD_MEMBER_JOIN | |
◆ Message() [1/3]
DiscordCPP::Message::Message |
( |
const json & | data, |
|
|
const std::string & | token ) |
- Parameters
-
[in] | data | raw JSON data |
[in] | token | discord token for the API |
- Returns
- Message object
◆ Message() [2/3]
DiscordCPP::Message::Message |
( |
const Message & | old | ) |
|
- Parameters
-
- Returns
- copied Message object
◆ Message() [3/3]
DiscordCPP::Message::Message |
( |
| ) |
|
|
default |
◆ ~Message()
DiscordCPP::Message::~Message |
( |
| ) |
|
◆ delete_msg()
void DiscordCPP::Message::delete_msg |
( |
| ) |
|
◆ edit()
Edit this message.
- Parameters
-
[in] | content | New message-content. |
- Returns
- Updated message object.
◆ get_author()
User DiscordCPP::Message::get_author |
( |
| ) |
|
|
inline |
- Returns
- The author of this message
◆ get_channel()
- Returns
- The Channel the message was sent in
◆ get_channel_id()
std::string DiscordCPP::Message::get_channel_id |
( |
| ) |
|
|
inline |
- Returns
- The id of the Channel the message was sent in
◆ get_content()
std::string DiscordCPP::Message::get_content |
( |
| ) |
|
|
inline |
- Returns
- The content of this message
◆ get_edited_timestamp()
std::string DiscordCPP::Message::get_edited_timestamp |
( |
| ) |
|
|
inline |
- Returns
- When the message was edited
◆ get_embeds()
std::vector< Embed > DiscordCPP::Message::get_embeds |
( |
| ) |
|
|
inline |
◆ get_guild()
- Returns
- The Guild the message was sent in
◆ get_guild_id()
std::optional< std::string > DiscordCPP::Message::get_guild_id |
( |
| ) |
|
|
inline |
- Returns
- The id of the Guild the message was sent in
◆ get_mentions()
std::vector< User > DiscordCPP::Message::get_mentions |
( |
| ) |
|
|
inline |
- Returns
- Array of mentioned users
◆ get_timestamp()
std::string DiscordCPP::Message::get_timestamp |
( |
| ) |
|
|
inline |
- Returns
- When the message was created
◆ get_type()
Type DiscordCPP::Message::get_type |
( |
| ) |
|
|
inline |
- Returns
- The type of the messsage
◆ is_mention_everyone()
bool DiscordCPP::Message::is_mention_everyone |
( |
| ) |
|
|
inline |
- Returns
- True, if everyone is mentioned
◆ is_pinned()
bool DiscordCPP::Message::is_pinned |
( |
| ) |
|
|
inline |
- Returns
- True, if this message has been pinned
◆ is_tts()
bool DiscordCPP::Message::is_tts |
( |
| ) |
|
|
inline |
- Returns
- True, if this is a tts message
◆ reply() [1/2]
DiscordCPP::Message DiscordCPP::Message::reply |
( |
const std::string & | content, |
|
|
const bool | tts = false ) |
Send a reply to this message.
- Parameters
-
[in] | content | The string message to send. |
[in] | tts | (optional) Wether to send as tts-message or not. Default is false. |
- Returns
- The message that was sent.
◆ reply() [2/2]
Send an Embed as reply to this message.
- Parameters
-
[in] | embed | The Embed to send. |
- Returns
- The message that was sent.
The documentation for this class was generated from the following files: