diff options
Diffstat (limited to 'modules/reactions')
-rw-r--r-- | modules/reactions/reactions.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/reactions/reactions.cpp b/modules/reactions/reactions.cpp index 6455840..3f698b0 100644 --- a/modules/reactions/reactions.cpp +++ b/modules/reactions/reactions.cpp @@ -4,6 +4,7 @@ #include <142bot/modules.hpp> #include <142bot/util.hpp> #include <fmt/format.h> +#include <sentry.h> using std::to_string; class ReactionsModule : public Module { @@ -12,6 +13,9 @@ public: ReactionsModule(Bot* creator, ModuleLoader* ml): Module(creator, ml) { ml->attach({I_OnMessage}, this); + sentry_value_t crumb = sentry_value_new_breadcrumb("default", "Loaded module reactions"); + sentry_add_breadcrumb(crumb); + std::ifstream f("resources/reactions.json"); json reactions = json::parse(f); @@ -28,6 +32,7 @@ public: return "Auto-reactions based on keyword"; } virtual bool OnMessage(const dpp::message_create_t &message, const std::string& clean_message, bool mentioned, const std::vector<std::string> &stringmentions) { + sentry_set_tag("module", "reactions"); for (auto i = reactionMap.begin(); i != reactionMap.end(); i++) { if (lowercase(clean_message).find(i->first) != std::string::npos) { bot->core->message_add_reaction(message.msg, i->second); |