#include #include int main(int argc, char* argv[]) { if (argc != 3) return -1; WebSocket* bot = &WebSocket::getInstance(argv[2], GatewayIntents::AllIntents); bot->on(GatewayEvents::READY, [](const Discord& b) { auto& [user] = b.ctx(); std::cout << nlohmann::json::parse(user->me())["username"].get() << std::endl; }); bot->on(GatewayEvents::MESSAGE_CREATE, [](const Discord& msg) { const auto& [message, user, author, _] = msg.ctx(); if (!author->isBot) { message->send("939957962972229634", message->pack("content", author->avatar)); } }); bot->start(); return 0; }