diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-08-21 00:42:46 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-08-21 00:42:46 -0400 |
commit | 6f11aa4dae4c7334b150752f5cf8d270ce746d9c (patch) | |
tree | 45d7ed1776b9294ce5a0f89f872aff5e21a1f425 /discord/discord.hpp | |
parent | a201d5905ad9188e890eeb0cc0aee8d4fb9dcf3c (diff) | |
download | abaddon-portaudio-6f11aa4dae4c7334b150752f5cf8d270ce746d9c.tar.gz abaddon-portaudio-6f11aa4dae4c7334b150752f5cf8d270ce746d9c.zip |
shitty MESSAGE_CREATE handling
Diffstat (limited to 'discord/discord.hpp')
-rw-r--r-- | discord/discord.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/discord/discord.hpp b/discord/discord.hpp index 4ece752..051f715 100644 --- a/discord/discord.hpp +++ b/discord/discord.hpp @@ -7,6 +7,11 @@ #include <unordered_set> #include <mutex> +// bruh +#ifdef GetMessage +#undef GetMessage +#endif + struct Snowflake { Snowflake(); Snowflake(const Snowflake &s); @@ -64,6 +69,7 @@ enum class GatewayOp : int { enum class GatewayEvent : int { READY, + MESSAGE_CREATE, }; struct GatewayMessage { @@ -381,12 +387,14 @@ public: void UpdateSettingsGuildPositions(const std::vector<Snowflake> &pos); void FetchMessagesInChannel(Snowflake id, std::function<void(const std::vector<MessageData> &)> cb); + const MessageData *GetMessage(Snowflake id) const; void UpdateToken(std::string token); private: void HandleGatewayMessage(nlohmann::json msg); void HandleGatewayReady(const GatewayMessage &msg); + void HandleGatewayMessageCreate(const GatewayMessage &msg); void HeartbeatThread(); void SendIdentify(); |