diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-09-09 23:59:40 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-09-09 23:59:40 -0400 |
commit | 6ae9cc915d8bba9415910f4c9745e1158a7e1f68 (patch) | |
tree | 0ebce2462d4358be0f322e05726cf4a2de666293 /discord/discord.cpp | |
parent | 51cf8fd2df3cf7a602d05540627a5ad8af6baa58 (diff) | |
download | abaddon-portaudio-6ae9cc915d8bba9415910f4c9745e1158a7e1f68.tar.gz abaddon-portaudio-6ae9cc915d8bba9415910f4c9745e1158a7e1f68.zip |
MessageData -> Message (whoops)
Diffstat (limited to 'discord/discord.cpp')
-rw-r--r-- | discord/discord.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/discord/discord.cpp b/discord/discord.cpp index 63722fe..470088b 100644 --- a/discord/discord.cpp +++ b/discord/discord.cpp @@ -115,7 +115,7 @@ void DiscordClient::FetchMessagesInChannel(Snowflake id, std::function<void(cons m_http.MakeGET(path, [this, id, cb](cpr::Response r) { if (!CheckCode(r)) return; - std::vector<MessageData> msgs; + std::vector<Message> msgs; std::vector<Snowflake> ids; nlohmann::json::parse(r.text).get_to(msgs); @@ -136,7 +136,7 @@ void DiscordClient::FetchMessagesInChannelBefore(Snowflake channel_id, Snowflake m_http.MakeGET(path, [this, channel_id, cb](cpr::Response r) { if (!CheckCode(r)) return; - std::vector<MessageData> msgs; + std::vector<Message> msgs; std::vector<Snowflake> ids; nlohmann::json::parse(r.text).get_to(msgs); @@ -152,7 +152,7 @@ void DiscordClient::FetchMessagesInChannelBefore(Snowflake channel_id, Snowflake }); } -const MessageData *DiscordClient::GetMessage(Snowflake id) const { +const Message *DiscordClient::GetMessage(Snowflake id) const { return m_store.GetMessage(id); } @@ -362,7 +362,7 @@ void DiscordClient::HandleGatewayReady(const GatewayMessage &msg) { } void DiscordClient::HandleGatewayMessageCreate(const GatewayMessage &msg) { - MessageData data = msg.Data; + Message data = msg.Data; m_store.SetMessage(data.ID, data); AddMessageToChannel(data.ID, data.ChannelID); m_store.SetUser(data.Author.ID, data.Author); @@ -377,7 +377,7 @@ void DiscordClient::HandleGatewayMessageDelete(const GatewayMessage &msg) { void DiscordClient::HandleGatewayMessageUpdate(const GatewayMessage &msg) { // less than stellar way of doing this probably - MessageData data; + Message data; data.from_json_edited(msg.Data); auto *current = m_store.GetMessage(data.ID); |