support animated guild icon

This commit is contained in:
ouwou
2020-12-21 19:08:44 -05:00
parent 486d184c83
commit d8ff05ddf8
8 changed files with 77 additions and 11 deletions

View File

@@ -122,6 +122,10 @@ bool Guild::HasIcon() const {
return Icon != "";
}
bool Guild::HasAnimatedIcon() const {
return HasIcon() && Icon[0] == 'a' && Icon[1] == '_';
}
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;
}