diff options
Diffstat (limited to 'include/emotespp/emotes.hpp')
| -rw-r--r-- | include/emotespp/emotes.hpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/include/emotespp/emotes.hpp b/include/emotespp/emotes.hpp new file mode 100644 index 0000000..5a5e172 --- /dev/null +++ b/include/emotespp/emotes.hpp @@ -0,0 +1,48 @@ +#pragma once + +#include <functional> +#include <optional> +#include <string> + +namespace emotespp { + struct Emote { + std::string id; + std::string code; + std::optional<std::string> original_code; + }; + + template <typename T> + class RetrieveEmoteWebsocket { + public: + void on_emote_create( + std::function<void(std::string, std::optional<std::string>, T)> + func) { + this->emote_create = func; + } + + void on_emote_delete( + std::function<void(std::string, std::optional<std::string>, T)> + func) { + this->emote_delete = func; + } + + void on_emote_update( + std::function<void(std::string, std::optional<std::string>, T)> + func) { + this->emote_update = func; + } + + protected: + std::optional< + std::function<void(std::string, std::optional<std::string>, T)>> + emote_create; + + std::optional< + std::function<void(std::string, std::optional<std::string>, T)>> + emote_delete; + + std::optional< + std::function<void(std::string, std::optional<std::string>, T)>> + emote_update; + }; +}
\ No newline at end of file |
