From e63f88aa3f8fe1c0cf8366ee09188a4b18ede166 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Thu, 30 Mar 2023 15:58:57 -0400 Subject: Finish reactions module --- modules/reactions/reactions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/reactions/reactions.cpp') diff --git a/modules/reactions/reactions.cpp b/modules/reactions/reactions.cpp index 3818d0d..6455840 100644 --- a/modules/reactions/reactions.cpp +++ b/modules/reactions/reactions.cpp @@ -2,6 +2,7 @@ #include #include #include <142bot/modules.hpp> +#include <142bot/util.hpp> #include using std::to_string; @@ -28,7 +29,7 @@ public: } virtual bool OnMessage(const dpp::message_create_t &message, const std::string& clean_message, bool mentioned, const std::vector &stringmentions) { for (auto i = reactionMap.begin(); i != reactionMap.end(); i++) { - if (clean_message.find(i->first) != std::string::npos) { + if (lowercase(clean_message).find(i->first) != std::string::npos) { bot->core->message_add_reaction(message.msg, i->second); bot->core->log(dpp::ll_debug, "Adding reaction based on keyword"); } -- cgit v1.2.3