diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-09-12 19:35:24 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-09-12 19:35:24 -0400 |
commit | 2822add5fe791a120c160e188cecac7ce29d9961 (patch) | |
tree | 8477cbfcca9fd7db802685229e591b6a43753aa2 /discord/user.cpp | |
parent | e68f8ef8f45987ab0caa5a05d53980a3556547f3 (diff) | |
download | abaddon-portaudio-2822add5fe791a120c160e188cecac7ce29d9961.tar.gz abaddon-portaudio-2822add5fe791a120c160e188cecac7ce29d9961.zip |
some refactorage and add avatars to member list
Diffstat (limited to 'discord/user.cpp')
-rw-r--r-- | discord/user.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/discord/user.cpp b/discord/user.cpp index cfc9e34..2e136e1 100644 --- a/discord/user.cpp +++ b/discord/user.cpp @@ -1,4 +1,5 @@ #include "user.hpp" +#include "../abaddon.hpp" bool User::HasAvatar() const { return Avatar.size() > 0; @@ -8,6 +9,10 @@ std::string User::GetAvatarURL(std::string ext, std::string size) const { return "https://cdn.discordapp.com/avatars/" + std::to_string(ID) + "/" + Avatar + "." + ext + "?size=" + size; } +Snowflake User::GetHoistedRole(Snowflake guild_id, bool with_color) const { + return Abaddon::Get().GetDiscordClient().GetMemberHoistedRole(guild_id, ID, with_color); +} + void from_json(const nlohmann::json &j, User &m) { JS_D("id", m.ID); JS_D("username", m.Username); |