mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-12-01 08:07:08 +01:00
Update WIP discord and some vendors.
CPR has features disabled and PCRE is fully disabled until updated to new code.
This commit is contained in:
1 parent
e0761bf3b9
commit
9298065cef
1562 files changed
+55070
-76299
No files matched your search
Vendored
+28
-11
@@ -523,7 +523,7 @@ public:
|
||||
struct DPP_EXPORT embed_footer {
|
||||
/** Footer text */
|
||||
std::string text;
|
||||
/** Footer icon url */
|
||||
/** Footer icon url (only supports http(s) and attachments) */
|
||||
std::string icon_url;
|
||||
/** Proxied icon url */
|
||||
std::string proxy_url;
|
||||
@@ -577,9 +577,9 @@ struct DPP_EXPORT embed_provider {
|
||||
struct DPP_EXPORT embed_author {
|
||||
/** Author name */
|
||||
std::string name;
|
||||
/** Author url */
|
||||
/** Author url (only supports http(s)) */
|
||||
std::string url;
|
||||
/** Author icon url */
|
||||
/** Author icon url (only supports http(s) and attachments) */
|
||||
std::string icon_url;
|
||||
/** Proxied icon url */
|
||||
std::string proxy_icon_url;
|
||||
@@ -589,9 +589,9 @@ struct DPP_EXPORT embed_author {
|
||||
* @brief A dpp::embed may contain zero or more fields
|
||||
*/
|
||||
struct DPP_EXPORT embed_field {
|
||||
/** Name of field */
|
||||
/** Name of field (max length 256) */
|
||||
std::string name;
|
||||
/** Value of field (max length 1000) */
|
||||
/** Value of field (max length 1024) */
|
||||
std::string value;
|
||||
/** True if the field is to be displayed inline */
|
||||
bool is_inline;
|
||||
@@ -659,7 +659,7 @@ struct DPP_EXPORT embed {
|
||||
|
||||
/** Set the footer of the embed. Returns the embed itself so these method calls may be "chained"
|
||||
* @param text string to set as footer text. It will be truncated to the maximum length of 2048 UTF-8 characters.
|
||||
* @param icon_url an url to set as footer icon url
|
||||
* @param icon_url an url to set as footer icon url (only supports http(s) and attachments)
|
||||
* @return A reference to self
|
||||
*/
|
||||
embed& set_footer(const std::string& text, const std::string& icon_url);
|
||||
@@ -698,8 +698,8 @@ struct DPP_EXPORT embed {
|
||||
|
||||
/** Set embed author. Returns the embed itself so these method calls may be "chained"
|
||||
* @param name The name of the author. It will be truncated to the maximum length of 256 UTF-8 characters.
|
||||
* @param url The url of the author
|
||||
* @param icon_url The icon URL of the author
|
||||
* @param url The url of the author (only supports http(s))
|
||||
* @param icon_url The icon URL of the author (only supports http(s) and attachments)
|
||||
* @return A reference to self
|
||||
*/
|
||||
embed& set_author(const std::string& name, const std::string& url, const std::string& icon_url);
|
||||
@@ -712,7 +712,7 @@ struct DPP_EXPORT embed {
|
||||
embed& set_provider(const std::string& name, const std::string& url);
|
||||
|
||||
/** Set embed image. Returns the embed itself so these method calls may be "chained"
|
||||
* @param url The embed image URL
|
||||
* @param url The embed image URL (only supports http(s) and attachments)
|
||||
* @return A reference to self
|
||||
*/
|
||||
embed& set_image(const std::string& url);
|
||||
@@ -724,7 +724,7 @@ struct DPP_EXPORT embed {
|
||||
embed& set_video(const std::string& url);
|
||||
|
||||
/** Set embed thumbnail. Returns the embed itself so these method calls may be "chained"
|
||||
* @param url The embed thumbnail url
|
||||
* @param url The embed thumbnail url (only supports http(s) and attachments)
|
||||
* @return A reference to self
|
||||
*/
|
||||
embed& set_thumbnail(const std::string& url);
|
||||
@@ -784,6 +784,10 @@ struct DPP_EXPORT attachment {
|
||||
std::string content_type;
|
||||
/** Whether this attachment is ephemeral, if applicable */
|
||||
bool ephemeral;
|
||||
/** The duration of the audio file (currently for voice messages) */
|
||||
double duration_secs;
|
||||
/** base64 encoded bytearray representing a sampled waveform (currently for voice messages) */
|
||||
std::string waveform;
|
||||
/** Owning message */
|
||||
struct message* owner;
|
||||
|
||||
@@ -981,6 +985,8 @@ enum message_flags : uint16_t {
|
||||
m_thread_mention_failed = 1 << 8,
|
||||
/// this message will not trigger push and desktop notifications
|
||||
m_suppress_notifications = 1 << 12,
|
||||
/// this message is a voice message
|
||||
m_is_voice_message = 1 << 13,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1183,6 +1189,9 @@ struct DPP_EXPORT message : public managed {
|
||||
/** File content to upload (raw binary) */
|
||||
std::vector<std::string> filecontent;
|
||||
|
||||
/** Mime type of files to upload */
|
||||
std::vector<std::string> filemimetype;
|
||||
|
||||
/**
|
||||
* @brief Reference to another message, e.g. a reply
|
||||
*/
|
||||
@@ -1411,6 +1420,13 @@ struct DPP_EXPORT message : public managed {
|
||||
*/
|
||||
bool suppress_notifications() const;
|
||||
|
||||
/**
|
||||
* @brief True if the message is a voice message
|
||||
*
|
||||
* @return True if voice message
|
||||
*/
|
||||
bool is_voice_message() const;
|
||||
|
||||
/**
|
||||
* @brief Add a component (button) to message
|
||||
*
|
||||
@@ -1466,9 +1482,10 @@ struct DPP_EXPORT message : public managed {
|
||||
*
|
||||
* @param filename filename
|
||||
* @param filecontent raw file content contained in std::string
|
||||
* @param filemimetype optional mime type of the file
|
||||
* @return message& reference to self
|
||||
*/
|
||||
message& add_file(const std::string &filename, const std::string &filecontent);
|
||||
message& add_file(const std::string &filename, const std::string &filecontent, const std::string &filemimetype = "");
|
||||
|
||||
/**
|
||||
* @brief Set the message content
|
||||
|
||||
Reference in new issue
Block a user