From 6f11aa4dae4c7334b150752f5cf8d270ce746d9c Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Fri, 21 Aug 2020 00:42:46 -0400 Subject: shitty MESSAGE_CREATE handling --- discord/discord.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'discord/discord.hpp') 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 #include +// 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 &pos); void FetchMessagesInChannel(Snowflake id, std::function &)> 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(); -- cgit v1.2.3