From 8cf95fce0cb233125334482149c2c9f4219da52b Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Thu, 7 Jan 2021 02:41:49 -0500 Subject: improve build process, add github actions --- discord/channel.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'discord/channel.cpp') diff --git a/discord/channel.cpp b/discord/channel.cpp index 7a62953..68e73e9 100644 --- a/discord/channel.cpp +++ b/discord/channel.cpp @@ -1,7 +1,7 @@ #include "../abaddon.hpp" #include "channel.hpp" -void from_json(const nlohmann::json &j, Channel &m) { +void from_json(const nlohmann::json &j, ChannelData &m) { JS_D("id", m.ID); JS_D("type", m.Type); JS_O("guild_id", m.GuildID); @@ -23,7 +23,7 @@ void from_json(const nlohmann::json &j, Channel &m) { JS_ON("last_pin_timestamp", m.LastPinTimestamp); } -void Channel::update_from_json(const nlohmann::json &j) { +void ChannelData::update_from_json(const nlohmann::json &j) { JS_RD("type", Type); JS_RD("guild_id", GuildID); JS_RV("position", Position, -1); @@ -43,17 +43,17 @@ void Channel::update_from_json(const nlohmann::json &j) { JS_RD("last_pin_timestamp", LastPinTimestamp); } -std::optional Channel::GetOverwrite(Snowflake id) const { +std::optional ChannelData::GetOverwrite(Snowflake id) const { return Abaddon::Get().GetDiscordClient().GetPermissionOverwrite(ID, id); } -std::vector Channel::GetDMRecipients() const { +std::vector ChannelData::GetDMRecipients() const { const auto &discord = Abaddon::Get().GetDiscordClient(); if (Recipients.has_value()) return *Recipients; if (RecipientIDs.has_value()) { - std::vector ret; + std::vector ret; for (const auto &id : *RecipientIDs) { auto user = discord.GetUser(id); if (user.has_value()) @@ -63,5 +63,5 @@ std::vector Channel::GetDMRecipients() const { return ret; } - return std::vector(); + return std::vector(); } -- cgit v1.2.3