From fd81f463156b026d37bdc6c8308ffdf50af2cb60 Mon Sep 17 00:00:00 2001 From: fluttershy Date: Mon, 20 Jan 2025 15:01:44 +0500 Subject: [PATCH 1/4] readme update --- README.md | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index c665cdf..f553d09 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,27 @@ # Sparkle -Library for creating discord bots -# ToDo - - [x] Websocket support - - [x] Minimal discord api support - - [x] Selfbot support - - [x] Easy to use - - [ ] Support json extraction from server response - - [ ] Optimised for high loads - - [ ] Full api support - - [ ] Fixes for known bugs - - [ ] Windows support - - [ ] Sharding -# How to build +Library for creating Discord bots. + +## How to Build + +### Required Libraries +- `curl` +- `ixwebsocket` + +### Build Instructions ```sh git clone http://applejack.ygg/fluttershy/sparkle.git mkdir sparkle/build && cd sparkle/build cmake .. && make -j$(nproc) ./sparkle -t ``` +# ToDo +- [x] Websocket support +- [x] Minimal discord api support +- [x] Selfbot support +- [x] Easy to use +- [x] Support json extraction from server response +- [ ] Optimised for high loads (not tested) +- [ ] Full api support +- [ ] Fixes for known bugs +- [ ] Windows support +- [ ] Sharding \ No newline at end of file From 64a43c935844a5b35da64e7e1e9d39bd7ed2473a Mon Sep 17 00:00:00 2001 From: fluttershy Date: Mon, 20 Jan 2025 15:02:08 +0500 Subject: [PATCH 2/4] cmake update --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d8de76b..6600001 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,5 +60,4 @@ target_link_libraries(tests gtest set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED True) -set(CMAKE_CXX_FLAGS "-march=native -O2 -pipe") -#set(CMAKE_CXX_FLAGS "-O0 -pipe") \ No newline at end of file +set(CMAKE_CXX_FLAGS "-march=native -O2 -pipe") \ No newline at end of file From 63d325e715ff21df286b247a901b6843ee06a0ee Mon Sep 17 00:00:00 2001 From: fluttershy Date: Mon, 20 Jan 2025 15:03:03 +0500 Subject: [PATCH 3/4] readme update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f553d09..e3f55e0 100644 --- a/README.md +++ b/README.md @@ -24,4 +24,4 @@ cmake .. && make -j$(nproc) - [ ] Full api support - [ ] Fixes for known bugs - [ ] Windows support -- [ ] Sharding \ No newline at end of file +- [ ] Sharding \ No newline at end of file From 8e506ecd2271b2f1124ec2bf83072acef6b775e6 Mon Sep 17 00:00:00 2001 From: fluttershy Date: Mon, 20 Jan 2025 15:07:30 +0500 Subject: [PATCH 4/4] default --- sources/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/main.cpp b/sources/main.cpp index dec23db..2d59b94 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -2,11 +2,11 @@ #include int main(int argc, char* argv[]) { if (argc != 3) return -1; - WebSocket* bot = &WebSocket::getInstance(argv[2], GatewayIntents::AllIntents, false); - bot->on(GatewayEvents::READY, [](const Discorda) { + WebSocket* bot = &WebSocket::getInstance(argv[2], GatewayIntents::AllIntents); + bot->on(GatewayEvents::READY, [](const Discord& a) { cout << DiscordEndpoints::details::latest << endl; }); - bot->on(GatewayEvents::MESSAGE_CREATE, [](const Discord msg) { + bot->on(GatewayEvents::MESSAGE_CREATE, [](const Discord& msg) { g(0, msg.net)->send("939957962972229634", j("content", g(2, msg.net)->content())); }); bot->start();