diff options
author | Cara Salter <cara@devcara.com> | 2023-03-30 12:52:19 -0400 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2023-03-30 12:52:19 -0400 |
commit | 527b7ab2df126bb2f480999049ed05b057a6ef83 (patch) | |
tree | 8edb7c72d7fae0e7d2c768f5f5dd65c2268c75a0 /modules/mmanager | |
parent | c8befe7c95b18869f995c4f2cbc2f4cf9c91924f (diff) | |
download | 142bot-527b7ab2df126bb2f480999049ed05b057a6ef83.tar.gz 142bot-527b7ab2df126bb2f480999049ed05b057a6ef83.zip |
modules!
Diffstat (limited to 'modules/mmanager')
-rw-r--r-- | modules/mmanager/mmanager.cpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/modules/mmanager/mmanager.cpp b/modules/mmanager/mmanager.cpp new file mode 100644 index 0000000..fda8b3c --- /dev/null +++ b/modules/mmanager/mmanager.cpp @@ -0,0 +1,52 @@ +/* + * ===================================================================================== + * + * Filename: mmanager.cpp + * + * Description: + * + * Version: 1.0 + * Created: 03/30/2023 11:30:55 AM + * Revision: none + * Compiler: gcc + * + * Author: Cara Salter (muirrum), cara@devcara.com + * Organization: Worcester Polytechnic Institute + * + * ===================================================================================== + */ +#include <dpp/message.h> +#include <stdlib.h> +#include <string> +#include <142bot/modules.hpp> +#include <dpp/dpp.h> + +class MManagerModule : public Module { + double microseconds_ping; +public: + MManagerModule(Bot* creator, ModuleLoader* ml) : Module(creator, ml) { + ml->attach({ I_OnMessage, I_OnReady }, this); + creator->core->log(dpp::ll_info, "ModuleManager online!"); + } + + virtual std::string version() { + return "0.1.0"; + } + + virtual std::string description() { + return "module manager"; + } + + virtual bool OnReady(const dpp::ready_t &ready) { + bot->core->log(dpp::ll_info, "Got ready event"); + return true; + } + + virtual bool OnMessage(const dpp::message_create_t &message, const std::string& clean_message, bool mentioned, const std::vector<std::string> &stringmentions) { + bot->core->log(dpp::ll_info, "Got message!"); + + return true; + } +}; + +ENTRYPOINT(MManagerModule) |