This repository has been archived on 2025-03-15. You can view files and clone it, but cannot push or open issues or pull requests.
sparkle/sources/main.cpp

14 lines
560 B
C++
Raw Normal View History

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;
2025-01-20 00:03:53 +05:00
WebSocket* bot = &WebSocket::getInstance(argv[2], GatewayIntents::AllIntents);
2025-01-20 03:09:27 +05:00
bot->on(GatewayEvents::READY, [](const Discord<Message, User>&a) {
2025-01-20 00:03:53 +05:00
cout << DiscordEndpoints::details::latest << endl;
});
2025-01-20 03:09:27 +05:00
bot->on(GatewayEvents::MESSAGE_CREATE, [bot](const Discord<Message, User, Author>& msg) {
2025-01-20 04:03:27 +05:00
msg.get<0>().send("939957962972229634", msg.get<0>().pack({ "content", msg.get<2>().id }));
2025-01-18 00:13:18 +05:00
});
2024-12-31 02:20:56 +05:00
bot->start();
return 0;
2025-01-20 00:03:53 +05:00
}