2025-01-15 13:34:41 +05:00
|
|
|
#include <api.h>
|
|
|
|
#include <includes.h>
|
2024-12-31 04:46:39 +05:00
|
|
|
int main(int argc, char* argv[]) {
|
2025-01-13 14:40:21 +05:00
|
|
|
if (argc != 3) return -1;
|
|
|
|
WebSocket* bot = &WebSocket::getInstance(argv[2], 131071);
|
2025-01-14 05:18:08 +05:00
|
|
|
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()));
|
2024-12-31 02:20:56 +05:00
|
|
|
}
|
|
|
|
});
|
|
|
|
bot->start();
|
|
|
|
return 0;
|
2025-01-15 13:34:41 +05:00
|
|
|
}
|