From 2e2ed5fc8f5192f082603f108fbe9a1fdaf39707 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Tue, 22 Dec 2020 21:18:39 -0500 Subject: show slash command/APPLICATION_COMMAND messages --- discord/message.hpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'discord/message.hpp') diff --git a/discord/message.hpp b/discord/message.hpp index e2effc4..af6fb12 100644 --- a/discord/message.hpp +++ b/discord/message.hpp @@ -24,7 +24,7 @@ enum class MessageType { GUILD_DISCOVERY_DISQUALIFIED = 14, // nope GUILD_DISCOVERY_REQUALIFIED = 15, // nope INLINE_REPLY = 19, // kinda - APPLICATION_COMMAND, // nope + APPLICATION_COMMAND = 20, // yep }; enum class MessageFlags { @@ -151,6 +151,17 @@ struct ReactionData { friend void to_json(nlohmann::json &j, const ReactionData &m); }; +struct MessageApplicationData { + Snowflake ID; + std::optional CoverImage; + std::string Description; + std::string Icon; // null + std::string Name; + + friend void from_json(const nlohmann::json &j, MessageApplicationData &m); + friend void to_json(nlohmann::json &j, const MessageApplicationData &m); +}; + struct Message { Snowflake ID; Snowflake ChannelID; @@ -173,7 +184,7 @@ struct Message { std::optional WebhookID; MessageType Type; // std::optional Activity; - // std::optional Application; + std::optional Application; std::optional MessageReference; std::optional Flags = MessageFlags::NONE; std::optional> Stickers; -- cgit v1.2.3