mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-13 20:18:50 +03:00
some refactorage and add avatars to member list
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user