mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-19 20:11:59 +03:00
basic avatars
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
#include "user.hpp"
|
||||
|
||||
bool User::HasAvatar() const {
|
||||
return Avatar.size() > 0;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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