diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-08-21 22:25:23 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-08-21 22:25:23 -0400 |
commit | 6b72931ba729bf6ede33cfa6877a5ad21e913c45 (patch) | |
tree | 83281f1a498b3cb855a68c78a4bb336b79e797bb /discord/discord.hpp | |
parent | 6f11aa4dae4c7334b150752f5cf8d270ce746d9c (diff) | |
download | abaddon-portaudio-6b72931ba729bf6ede33cfa6877a5ad21e913c45.tar.gz abaddon-portaudio-6b72931ba729bf6ede33cfa6877a5ad21e913c45.zip |
send chat messages
Diffstat (limited to 'discord/discord.hpp')
-rw-r--r-- | discord/discord.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
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<void(const std::vector<MessageData> &)> cb); const MessageData *GetMessage(Snowflake id) const; + void SendChatMessage(std::string content, Snowflake channel); + void UpdateToken(std::string token); private: |