Compare commits
5 Commits
c401269c4b
...
8e506ecd22
Author | SHA1 | Date | |
---|---|---|---|
8e506ecd22 | |||
830f2129b4 | |||
63d325e715 | |||
64a43c9358 | |||
fd81f46315 |
@ -60,5 +60,4 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||
|
||||
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")
|
||||
set(CMAKE_CXX_FLAGS "-march=native -O2 -pipe")
|
33
README.md
33
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 <BOT_TOKEN>
|
||||
```
|
||||
# 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
|
@ -3,10 +3,10 @@
|
||||
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<Message, User>a) {
|
||||
bot->on(GatewayEvents::READY, [](const Discord<Message, User>& a) {
|
||||
cout << DiscordEndpoints::details::latest << endl;
|
||||
});
|
||||
bot->on(GatewayEvents::MESSAGE_CREATE, [](const Discord<Message, User, Author> msg) {
|
||||
bot->on(GatewayEvents::MESSAGE_CREATE, [](const Discord<Message, User, Author>& msg) {
|
||||
g(0, msg.net)->send("939957962972229634", j("content", g(2, msg.net)->content()));
|
||||
});
|
||||
bot->start();
|
||||
|
Loading…
x
Reference in New Issue
Block a user