From 2798bf96d5ec788cf7ecbcb7fbc53198ce2e5569 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Wed, 7 Oct 2020 17:22:20 -0400 Subject: store emoji data --- discord/emoji.hpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 discord/emoji.hpp (limited to 'discord/emoji.hpp') diff --git a/discord/emoji.hpp b/discord/emoji.hpp new file mode 100644 index 0000000..e4839f2 --- /dev/null +++ b/discord/emoji.hpp @@ -0,0 +1,22 @@ +#pragma once +#include +#include +#include "json.hpp" +#include "snowflake.hpp" +#include "user.hpp" + +struct Emoji { + Snowflake ID; // null + std::string Name; // null (in reactions) + std::vector Roles; // opt + User Creator; // opt + bool NeedsColons = false; // opt + bool IsManaged = false; // opt + bool IsAnimated = false; // opt + bool IsAvailable = false; // opt + + friend void from_json(const nlohmann::json &j, Emoji &m); + + std::string GetURL() const; + static std::string URLFromID(std::string emoji_id); +}; -- cgit v1.2.3