forked from rcxpony/sparkle
fixes
This commit is contained in:
parent
d5bb8377ed
commit
2e0d5d5b70
@ -1,7 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(sparkle)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(RapidJSON)
|
||||
find_path(IXWEBSOCKET_INCLUDE_DIR ixwebsocket)
|
||||
find_library(IXWEBSOCKET_LIBRARY ixwebsocket)
|
||||
if(NOT IXWEBSOCKET_INCLUDE_DIR OR NOT IXWEBSOCKET_LIBRARY)
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
string msg_id() {
|
||||
return data["d"]["id"];
|
||||
}
|
||||
inline bool isPinned() {
|
||||
bool isPinned() {
|
||||
return data["d"]["pinned"];
|
||||
}
|
||||
string avatar() {
|
||||
|
@ -129,7 +129,7 @@ private:
|
||||
};
|
||||
ix::initNetSystem();
|
||||
webSocket.setUrl("wss://gateway.discord.gg/?v=10&encoding=json");
|
||||
webSocket.setOnMessageCallback([this, res = json(""), heartbeat_interval = 0, connected = false](const ix::WebSocketMessagePtr& msg) mutable {
|
||||
webSocket.setOnMessageCallback([this, res = json(), heartbeat_interval = 0, connected = false](const ix::WebSocketMessagePtr& msg) mutable {
|
||||
if (msg->type == ix::WebSocketMessageType::Message) {
|
||||
res = json::parse(msg->str);
|
||||
chngcol(std::string("WEBSOCKET: " + res["op"].dump() + " " + res["t"].dump()), 0, 0, 120);
|
||||
|
Loading…
x
Reference in New Issue
Block a user