26 lines
448 B
C++
26 lines
448 B
C++
#include "botapp.h"
|
|
#include "module.h"
|
|
#include "message.h"
|
|
|
|
class CustomModule : public Module
|
|
{
|
|
CustomModule() : Module(), answer("coucou") {}
|
|
|
|
bool messageHandler(Message msg)
|
|
{
|
|
return msg.args.compare("plop ?") == 0;
|
|
}
|
|
|
|
QString getName()
|
|
{
|
|
return "custom";
|
|
}
|
|
};
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
BotApp app = BotApp(argc, argv);
|
|
app.addModule(new CustomModule());
|
|
return app.exec();
|
|
}
|