Skip to main content

SleepyDiscord::Message

Inherits from SleepyDiscord::IdentifiableDiscordObject< Message >, SleepyDiscord::DiscordObject

inherited members​

Public Types inherited from SleepyDiscord::IdentifiableDiscordObject< Message >

Name
using IdentifiableDiscordObject< Derived >Parent
using Snowflake< Derived >Identifier

Public Functions inherited from SleepyDiscord::IdentifiableDiscordObject< Message >

Name
IdentifiableDiscordObject() =default
IdentifiableDiscordObject(Snowflake< Derived > id)
operator Snowflake< Derived > &()
boolempty() const
voidmerge(Derived & changes)
template <class DiscordObject >
bool
operator==(const Snowflake< DiscordObject > & right) const
template <class DiscordObject >
bool
operator!=(const Snowflake< DiscordObject > & right) const
booloperator==(const Snowflake< Derived > & right) const
booloperator!=(const Snowflake< Derived > & right) const
booloperator==(const IdentifiableDiscordObject< Derived > & right) const
booloperator!=(const IdentifiableDiscordObject< Derived > & right) const
const TimegetTimestamp()

Public Attributes inherited from SleepyDiscord::IdentifiableDiscordObject< Message >

Name
Snowflake< Derived >ID

Public Types Documentation​

enum MessageType​

EnumeratorValueDescription
DEFAULT0
RECIPIENT_ADD1
RECIPIENT_REMOVE2
CALL3
CHANNEL_NAME_CHANGE4
CHANNEL_ICON_CHANGE5
CHANNEL_PINNED_MESSAGE6
GUILD_MEMBER_JOIN7
USER_PREMIUM_GUILD_SUBSCRIPTION8
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_19
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_210
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_311
CHANNEL_FOLLOW_ADD12
GUILD_DISCOVERY_DISQUALIFIED14
GUILD_DISCOVERY_REQUALIFIED15
REPLY19

enum Flags​

EnumeratorValueDescription
DEFAULT0
CROSSPOSTED1 << 0
IS_CROSSPOST1 << 1
SUPPRESS_EMBEDS1 << 2
SOURCE_MESSAGE_DELETED1 << 3
URGENT1 << 4
EPHEMERAL64

Public Functions Documentation​

function Message​

Message() =default

function ~Message​

~Message() =default

function Message​

Message(
json::Value & json
)

function Message​

inline Message(
const nonstd::string_view & json
)

function startsWith​

bool startsWith(
const std::string & test
)

function length​

std::size_t length()

function isMentioned​

bool isMentioned(
Snowflake< User > ID
)

function isMentioned​

bool isMentioned(
User & _user
)

function send​

Message send(
BaseDiscordClient * client
)

function reply​

Message reply(
BaseDiscordClient * client,
std::string message,
Embed embed =Embed()
)

function std::make_tuple​

JSONStructStart std::make_tuple(
json::pair &::, "", ::REQUIRIED_FIELD ,
json::pair &::, "", ::REQUIRIED_FIELD ,
json::pair &::, "", ::OPTIONAL_FIELD ,
json::pair &::, "", ::REQUIRIED_FIELD ,
json::pair &::, "", ::REQUIRIED_FIELD ,
json::pair &::, "", ::OPTIONAL_FIELD ,
json::pair &::, "", ::REQUIRIED_FIELD ,
json::pair &::, "", ::NULLABLE_FIELD ,
json::pair &::, "", ::REQUIRIED_FIELD ,
json::pair &::, "", ::REQUIRIED_FIELD ,
json::pair< json::ContainerTypeHelper > &::, "", ::REQUIRIED_FIELD ,
json::pair< json::ContainerTypeHelper > &::, "", ::REQUIRIED_FIELD ,
json::pair< json::ContainerTypeHelper > &::, "", ::REQUIRIED_FIELD ,
json::pair< json::ContainerTypeHelper > &::, "", ::REQUIRIED_FIELD ,
json::pair< json::ContainerTypeHelper > &::, "", ::OPTIONAL_FIELD ,
json::pair &::, "", ::REQUIRIED_FIELD ,
json::pair &::, "", ::OPTIONAL_FIELD ,
json::pair< json::EnumTypeHelper > &::, "", ::REQUIRIED_FIELD ,
json::pair< json::ContainerTypeHelper > &::, "", ::OPTIONAL_FIELD ,
json::pair &::, "", ::OPTIONAL_FIELD ,
json::pair< json::SmartPtrTypeHelper > &::, "", ::OPTIONAL_FIELD ,
json::pair< json::EnumTypeHelper > &::, "", ::OPTIONAL_FIELD ,
json::pair &::, "", ::OPTIONAL_FIELD ,
json::pair &::, "", ::OPTIONAL_FIELD ,
json::pair< json::ContainerTypeHelper > &::, "", ::OPTIONAL_FIELD
)

Public Attributes Documentation​

variable channelID​

Snowflake< Channel > channelID;

variable serverID​

Snowflake< Server > serverID;

variable author​

User author;

variable member​

ServerMember member;

variable content​

std::string content;

variable timestamp​

std::string timestamp;

variable editedTimestamp​

std::string editedTimestamp;

variable tts​

bool tts = false;

variable mentionEveryone​

bool mentionEveryone = false;

variable mentions​

std::vector< User > mentions;

variable mentionRoles​

std::vector< Snowflake< User > > mentionRoles;

variable attachments​

std::vector< Attachment > attachments;

variable embeds​

std::vector< Embed > embeds;

variable reactions​

std::vector< Reaction > reactions;

variable pinned​

bool pinned = false;

variable webhookID​

Snowflake< Webhook > webhookID;

variable type​

enum SleepyDiscord::Message::MessageType type = DEFAULT;

variable stickers​

std::vector< Sticker > stickers;

variable messageReference​

MessageReference messageReference;

variable referencedMessage​

std::shared_ptr< Message > referencedMessage;

variable flags​

enum SleepyDiscord::Message::Flags flags = Flags::DEFAULT;

variable interaction​

Interaction interaction;

variable applicationID​

Snowflake< DiscordObject > applicationID;

variable components​

std::vector< std::shared_ptr< BaseComponent > > components;

Updated on 13 April 2022 at 18:39:59 UTC