13 lines
440 B
C++
13 lines
440 B
C++
#include <api.h>
|
|
#include <includes.h>
|
|
int main(int argc, char* argv[]) {
|
|
if (argc != 3) return -1;
|
|
WebSocket* bot = &WebSocket::getInstance(argv[2], 131071);
|
|
bot->on(GatewayEvents::MESSAGE_CREATE, [](const Bot<Message, User, Author>& msg) {
|
|
if (!g(2, msg.net)->isBot()) {
|
|
g(0, msg.net)->send("939957962972229634", j("content", g(2, msg.net)->content()));
|
|
}
|
|
});
|
|
bot->start();
|
|
return 0;
|
|
}
|