aboutsummaryrefslogtreecommitdiff
path: root/modules/mmanager/mmanager.cpp
blob: fda8b3c3b539ded5fe5339d4d36c54693b12e643 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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)