From 6b72931ba729bf6ede33cfa6877a5ad21e913c45 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Fri, 21 Aug 2020 22:25:23 -0400 Subject: send chat messages --- discord/discord.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'discord/discord.hpp') diff --git a/discord/discord.hpp b/discord/discord.hpp index 051f715..ab390dc 100644 --- a/discord/discord.hpp +++ b/discord/discord.hpp @@ -9,7 +9,7 @@ // bruh #ifdef GetMessage -#undef GetMessage + #undef GetMessage #endif struct Snowflake { @@ -341,6 +341,12 @@ struct HeartbeatMessage : GatewayMessage { friend void to_json(nlohmann::json &j, const HeartbeatMessage &m); }; +struct CreateMessageObject { + std::string Content; + + friend void to_json(nlohmann::json &j, const CreateMessageObject &m); +}; + // https://stackoverflow.com/questions/29775153/stopping-long-sleep-threads/29775639#29775639 class HeartbeatWaiter { public: @@ -389,6 +395,8 @@ public: void FetchMessagesInChannel(Snowflake id, std::function &)> cb); const MessageData *GetMessage(Snowflake id) const; + void SendChatMessage(std::string content, Snowflake channel); + void UpdateToken(std::string token); private: -- cgit v1.2.3