#define RELEASE #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main(int argc, char* argv[]) { if (argc != 5) return -1; WebSocket* bot = WebSocket::getInstance(argv[2], stoi(argv[4]), true); bot->on(GatewayEvents::READY, [](const Bot& b) { cout << "started" << endl; }); bot->on(GatewayEvents::MESSAGE_CREATE, [bot](const Bot& msg) { if (g(2, msg.net)->isBot() == false) { g(1, msg.net)->send("939957962972229634", j("content", g(2, msg.net)->content())); } }); bot->on(GatewayEvents::MESSAGE_REACTION_REMOVE, [bot](const Bot& msg) { g(0, msg.net)->send("939957962972229634", j("content", "bye")); }); bot->on(GatewayEvents::MESSAGE_REACTION_ADD, [](const Bot& msg) { g(0, msg.net)->send("939957962972229634", j("content", "hello")); }); bot->start(); return 0; }