Toast/TriviaBot/bot/TriviaBot.cpp
Jack b31eaef6d6 Bot is now basically functional
Big tidy up, new question source.
2016-07-10 01:18:13 +01:00

29 lines
524 B
C++

#include <curl/curl.h>
#include "ClientConnection.hpp"
int main() {
curl_global_init(CURL_GLOBAL_DEFAULT);
std::string uri = "wss://gateway.discord.gg/?v=5&encoding=json";
try {
ClientConnection endpoint;
endpoint.start(uri);
}
catch (const std::exception & e) {
std::cout << e.what() << std::endl;
}
catch (websocketpp::lib::error_code e) {
std::cout << e.message() << std::endl;
}
catch (...) {
std::cout << "other exception" << std::endl;
}
std::getchar();
curl_global_cleanup();
return 0;
}