This commit is contained in:
fluttershy 2025-01-14 16:14:01 +05:00
parent 7c55f71596
commit 7f6b7e4bb6
11 changed files with 9 additions and 22 deletions

View File

@ -18,4 +18,5 @@ target_link_libraries(sparkle PRIVATE
)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -O2 -flto -pipe")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -O2 -flto -fomit-frame-pointer -pipe")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -pipe")

View File

@ -3,7 +3,6 @@
#include <utils/types.hpp>
#include <api/Channel.hpp>
#include <string>
#include <exception>
#include <iostream>
using std::string;
using std::cout;
@ -19,8 +18,8 @@ public:
try {
return data["d"]["content"];
}
catch (std::exception& e) {
return e.what();
catch (...) {
return "";
}
}
string channel_id() {

View File

@ -2,7 +2,6 @@
#define API_BOT_HPP_
#include <utils/types.hpp>
#include <string>
#include <exception>
#include <iostream>
#include <tuple>
using std::string;

View File

@ -1,7 +1,6 @@
#ifndef API_CHANNEL_HPP_
#define API_CHANNEL_HPP_
#include <string>
#include <exception>
#include <iostream>
#include <tls/Network.hpp>
#include <api/Author.hpp>

View File

@ -2,7 +2,6 @@
#define API_EMBED_HPP_
#include <utils/types.hpp>
#include <string>
#include <exception>
#include <iostream>
using std::string;
using std::cout;

View File

@ -2,7 +2,6 @@
#define API_GUILD_HPP_
#include <utils/types.hpp>
#include <string>
#include <exception>
#include <iostream>
using std::string;
using std::cout;

View File

@ -2,8 +2,6 @@
#define API_MESSAGE_HPP_
#include <utils/types.hpp>
#include <string>
#include <exception>
#include <iostream>
#include <tls/Network.hpp>
#include <gateway/Websocket.hpp>
using std::string;

View File

@ -1,13 +1,10 @@
#ifndef GATEWAY_WEBSOCKET_HPP_
#define GATEWAY_WEBSOCKET_HPP_
#include <utils/enums.hpp>
#include <string>
#include <utils/json.hpp>
#include <thread>
#include <iostream>
#include <chrono>
#include <utils/types.hpp>
#include <utils/logs.hpp>
#include <ixwebsocket/IXNetSystem.h>
#include <ixwebsocket/IXWebSocket.h>
using json = nlohmann::json;

View File

@ -2,14 +2,12 @@
#define TLS_NETWORK_HPP_
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <memory>
#include <iostream>
#include <string>
#include <net/if.h>
#include <netdb.h>
#include <utils/types.hpp>
#include <gateway/Websocket.hpp>
#include <utils/logs.hpp>
using std::cout;
using std::cerr;
using std::endl;

View File

@ -5,7 +5,9 @@
#define je(...) {__VA_ARGS__}
#define g(x, y) (std::get<x>(y))
#define ALL_INTENTS 131071
#define RELEASE
#include <utils/json.hpp>
#include <utils/logs.hpp>
#include <utils/enums.hpp>
using json = nlohmann::json;
#include <iostream>
#endif

View File

@ -1,15 +1,11 @@
#define RELEASE
#include <utils/json.hpp>
#include <utils/enums.hpp>
#include <tls/Network.hpp>
#include <gateway/Websocket.hpp>
#include <utils/types.hpp>
#include <api/Bot.hpp>
#include <api/Channel.hpp>
#include <api/Message.hpp>
#include <api/Embed.hpp>
#include <api/Author.hpp>
#include <api/User.hpp>
#include <gateway/Websocket.hpp>
#include <tls/Network.hpp>
#include <utils/types.hpp>
int main(int argc, char* argv[]) {
if (argc != 3) return -1;