D++ (DPP)  10.0.30
C++ Discord API Bot Library
message.h File Reference
#include <dpp/export.h>
#include <dpp/queues.h>
#include <dpp/snowflake.h>
#include <dpp/managed.h>
#include <dpp/user.h>
#include <dpp/channel.h>
#include <dpp/guild.h>
#include <optional>
#include <variant>
#include <dpp/json_fwd.h>
#include <dpp/json_interface.h>
Include dependency graph for message.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  dpp::message::allowed_ref
 Allowed mentions details. More...
 
struct  dpp::poll_results::answer_count
 Represents a reference to an answer and its count of votes. More...
 
struct  dpp::attachment
 Represents an attachment in a dpp::message. More...
 
struct  dpp::cache_policy_t
 Represents the caching policy of the cluster. More...
 
class  dpp::component
 Represents the component object. More...
 
struct  dpp::component_default_value
 A Default value structure for components. More...
 
struct  dpp::embed
 A rich embed for display within a dpp::message. More...
 
struct  dpp::embed_author
 Author within a dpp::embed object. More...
 
struct  dpp::embed_field
 A dpp::embed may contain zero or more fields. More...
 
struct  dpp::embed_footer
 A footer in a dpp::embed. More...
 
struct  dpp::embed_image
 An video, image or thumbnail in a dpp::embed. More...
 
struct  dpp::embed_provider
 Embed provider in a dpp::embed. More...
 
struct  dpp::message
 Represents messages sent and received on Discord. More...
 
struct  dpp::message_file_data
 The data for a file attached to a message. More...
 
struct  dpp::message::message_interaction_struct
 Reference to an interaction. More...
 
struct  dpp::message::message_ref
 Reference to another message, e.g. More...
 
struct  dpp::partial_emoji
 An emoji reference for a component (select menus included) or a poll. More...
 
struct  dpp::poll
 Represents a poll. More...
 
struct  dpp::poll_answer
 Represents an answer in a poll. More...
 
struct  dpp::poll_media
 Structure representing a poll media, for example the poll question or a possible poll answer. More...
 
struct  dpp::poll_results
 Represents the results of a poll. More...
 
struct  dpp::reaction
 Represents a reaction to a dpp::message. More...
 
struct  dpp::select_option
 An option for a select component. More...
 
struct  dpp::sticker
 Represents stickers received in messages. More...
 
struct  dpp::sticker_pack
 Represents a sticker pack (the built in groups of stickers that all nitro users get to use) More...
 

Namespaces

 dpp
 The main namespace for D++ functions.
 
 dpp::cache_policy
 Contains a set of predefined cache policies for use when constructing a dpp::cluster.
 
 dpp::embed_type
 Represents possible values for the dpp::embed type field.
 

Typedefs

using dpp::component_emoji = partial_emoji
 An emoji for a component. More...
 
typedef std::unordered_map< snowflake, message > dpp::message_map
 A group of messages. More...
 
typedef std::unordered_map< snowflake, sticker > dpp::sticker_map
 A group of stickers. More...
 
typedef std::unordered_map< snowflake, sticker_pack > dpp::sticker_pack_map
 A group of sticker packs. More...
 

Enumerations

enum  dpp::attachment_flags : uint8_t { dpp::a_is_remix = 1 << 2 }
 Bitmask flags for a dpp::attachment. More...
 
enum  dpp::cache_policy_setting_t {
  dpp::cp_aggressive = 0,
  dpp::cp_lazy = 1,
  dpp::cp_none = 2
}
 Represents the caching policy of a cache in the library. More...
 
enum  dpp::component_default_value_type : uint8_t {
  dpp::cdt_user = 0,
  dpp::cdt_role = 1,
  dpp::cdt_channel = 2
}
 Represents the type of a dpp::component_default_value. More...
 
enum  dpp::component_style : uint8_t {
  dpp::cos_primary = 1,
  dpp::cos_secondary,
  dpp::cos_success,
  dpp::cos_danger,
  dpp::cos_link
}
 Represents the style of a button. More...
 
enum  dpp::component_type : uint8_t {
  dpp::cot_action_row = 1,
  dpp::cot_button = 2,
  dpp::cot_selectmenu = 3,
  dpp::cot_text = 4,
  dpp::cot_user_selectmenu = 5,
  dpp::cot_role_selectmenu = 6,
  dpp::cot_mentionable_selectmenu = 7,
  dpp::cot_channel_selectmenu = 8
}
 Represents the type of a component. More...
 
enum  dpp::message_flags : uint16_t {
  dpp::m_crossposted = 1 << 0,
  dpp::m_is_crosspost = 1 << 1,
  dpp::m_suppress_embeds = 1 << 2,
  dpp::m_source_message_deleted = 1 << 3,
  dpp::m_urgent = 1 << 4,
  dpp::m_has_thread = 1 << 5,
  dpp::m_ephemeral = 1 << 6,
  dpp::m_loading = 1 << 7,
  dpp::m_thread_mention_failed = 1 << 8,
  dpp::m_suppress_notifications = 1 << 12,
  dpp::m_is_voice_message = 1 << 13
}
 Bitmask flags for a dpp::message. More...
 
enum  dpp::message_type {
  dpp::mt_default = 0,
  dpp::mt_recipient_add = 1,
  dpp::mt_recipient_remove = 2,
  dpp::mt_call = 3,
  dpp::mt_channel_name_change = 4,
  dpp::mt_channel_icon_change = 5,
  dpp::mt_channel_pinned_message = 6,
  dpp::mt_guild_member_join = 7,
  dpp::mt_user_premium_guild_subscription = 8,
  dpp::mt_user_premium_guild_subscription_tier_1 = 9,
  dpp::mt_user_premium_guild_subscription_tier_2 = 10,
  dpp::mt_user_premium_guild_subscription_tier_3 = 11,
  dpp::mt_channel_follow_add = 12,
  dpp::mt_guild_discovery_disqualified = 14,
  dpp::mt_guild_discovery_requalified = 15,
  dpp::mt_guild_discovery_grace_period_initial_warning = 16,
  dpp::mt_guild_discovery_grace_period_final_warning = 17,
  dpp::mt_thread_created = 18,
  dpp::mt_reply = 19,
  dpp::mt_application_command = 20,
  dpp::mt_thread_starter_message = 21,
  dpp::mt_guild_invite_reminder = 22,
  dpp::mt_context_menu_command = 23,
  dpp::mt_auto_moderation_action = 24,
  dpp::mt_role_subscription_purchase = 25,
  dpp::mt_interaction_premium_upsell = 26,
  dpp::mt_stage_start = 27,
  dpp::mt_stage_end = 28,
  dpp::mt_stage_speaker = 29,
  dpp::mt_stage_topic = 31,
  dpp::mt_application_premium_subscription = 32
}
 Message types for dpp::message::type. More...
 
enum  dpp::poll_layout_type { dpp::pl_default = 1 }
 Poll layout types. More...
 
enum  dpp::sticker_format : uint8_t {
  dpp::sf_png = 1,
  dpp::sf_apng = 2,
  dpp::sf_lottie = 3,
  dpp::sf_gif = 4
}
 The file format (png, apng, lottie) of a sticker. More...
 
enum  dpp::sticker_type : uint8_t {
  dpp::st_standard = 1,
  dpp::st_guild = 2
}
 Represents the type of a sticker. More...
 
enum  dpp::text_style_type : uint8_t {
  dpp::text_short = 1,
  dpp::text_paragraph = 2
}
 Types of text input. More...
 

Variables

constexpr cache_policy_t dpp::cache_policy::cpol_balanced = { cp_lazy, cp_lazy, cp_lazy, cp_aggressive, cp_aggressive }
 A shortcut constant for a more balanced caching policy for use in dpp::cluster constructor. More...
 
constexpr cache_policy_t dpp::cache_policy::cpol_default = { cp_aggressive, cp_aggressive, cp_aggressive, cp_aggressive, cp_aggressive }
 A shortcut constant for all caching enabled for use in dpp::cluster constructor. More...
 
constexpr cache_policy_t dpp::cache_policy::cpol_none = { cp_none, cp_none, cp_none, cp_none, cp_none }
 A shortcut constant for all caching disabled for use in dpp::cluster constructor. More...
 
const std::string dpp::embed_type::emt_article = "article"
 Article. More...
 
const std::string dpp::embed_type::emt_automod = "auto_moderation_message"
 Auto moderation filter. More...
 
const std::string dpp::embed_type::emt_gifv = "gifv"
 Animated gif. More...
 
const std::string dpp::embed_type::emt_image = "image"
 Image. More...
 
const std::string dpp::embed_type::emt_link = "link"
 Link URL. More...
 
const std::string dpp::embed_type::emt_rich = "rich"
 Rich text. More...
 
const std::string dpp::embed_type::emt_video = "video"
 Video link. More...