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 > &() | |
bool | empty() const |
void | merge(Derived & changes) |
template <class DiscordObject > bool | operator==(const Snowflake< DiscordObject > & right) const |
template <class DiscordObject > bool | operator!=(const Snowflake< DiscordObject > & right) const |
bool | operator==(const Snowflake< Derived > & right) const |
bool | operator!=(const Snowflake< Derived > & right) const |
bool | operator==(const IdentifiableDiscordObject< Derived > & right) const |
bool | operator!=(const IdentifiableDiscordObject< Derived > & right) const |
const Time | getTimestamp() |
Public Attributes inherited from SleepyDiscord::IdentifiableDiscordObject< Message >
Name | |
---|---|
Snowflake< Derived > | ID |
Public Types Documentation​
enum MessageType​
Enumerator | Value | Description |
---|---|---|
DEFAULT | 0 | |
RECIPIENT_ADD | 1 | |
RECIPIENT_REMOVE | 2 | |
CALL | 3 | |
CHANNEL_NAME_CHANGE | 4 | |
CHANNEL_ICON_CHANGE | 5 | |
CHANNEL_PINNED_MESSAGE | 6 | |
GUILD_MEMBER_JOIN | 7 | |
USER_PREMIUM_GUILD_SUBSCRIPTION | 8 | |
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1 | 9 | |
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2 | 10 | |
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3 | 11 | |
CHANNEL_FOLLOW_ADD | 12 | |
GUILD_DISCOVERY_DISQUALIFIED | 14 | |
GUILD_DISCOVERY_REQUALIFIED | 15 | |
REPLY | 19 |
enum Flags​
Enumerator | Value | Description |
---|---|---|
DEFAULT | 0 | |
CROSSPOSTED | 1 << 0 | |
IS_CROSSPOST | 1 << 1 | |
SUPPRESS_EMBEDS | 1 << 2 | |
SOURCE_MESSAGE_DELETED | 1 << 3 | |
URGENT | 1 << 4 | |
EPHEMERAL | 64 |
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