fix some requests being fired for icons that dont exist

This commit is contained in:
ouwou
2020-10-02 23:40:54 -04:00
parent 08f304da1b
commit 86455b60ca
3 changed files with 28 additions and 15 deletions

View File

@@ -57,6 +57,10 @@ void from_json(const nlohmann::json &j, Guild &m) {
JS_O("approximate_presence_count", m.ApproximatePresenceCount);
}
bool Guild::HasIcon() const {
return Icon != "";
}
std::string Guild::GetIconURL(std::string ext, std::string size) const {
return "https://cdn.discordapp.com/icons/" + std::to_string(ID) + "/" + Icon + "." + ext + "?size=" + size;
}