mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-19 20:11:59 +03:00
animated avatars on hover
This commit is contained in:
@@ -5,6 +5,10 @@ bool User::HasAvatar() const {
|
||||
return Avatar.size() > 0;
|
||||
}
|
||||
|
||||
bool User::HasAnimatedAvatar() const {
|
||||
return Avatar.size() > 0 && Avatar[0] == 'a' && Avatar[1] == '_';
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ struct User {
|
||||
static void update_from_json(const nlohmann::json &j, User &m);
|
||||
|
||||
bool HasAvatar() const;
|
||||
bool HasAnimatedAvatar() const;
|
||||
std::string GetAvatarURL(std::string ext = "png", std::string size = "32") const;
|
||||
Snowflake GetHoistedRole(Snowflake guild_id, bool with_color = false) const;
|
||||
std::string GetMention() const;
|
||||
|
||||
Reference in New Issue
Block a user