mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-19 20:11:59 +03:00
store emoji data
This commit is contained in:
20
discord/emoji.cpp
Normal file
20
discord/emoji.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "emoji.hpp"
|
||||
|
||||
void from_json(const nlohmann::json &j, Emoji &m) {
|
||||
JS_N("id", m.ID);
|
||||
JS_N("name", m.Name);
|
||||
JS_O("roles", m.Roles);
|
||||
JS_O("user", m.Creator);
|
||||
JS_O("require_colons", m.NeedsColons);
|
||||
JS_O("managed", m.IsManaged);
|
||||
JS_O("animated", m.IsAnimated);
|
||||
JS_O("available", m.IsAvailable);
|
||||
}
|
||||
|
||||
std::string Emoji::GetURL() const {
|
||||
return "https://cdn.discordapp.com/emojis/" + std::to_string(ID) + ".png";
|
||||
}
|
||||
|
||||
std::string Emoji::URLFromID(std::string emoji_id) {
|
||||
return "https://cdn.discordapp.com/emojis/" + emoji_id + ".png";
|
||||
}
|
||||
Reference in New Issue
Block a user