This commit is contained in:
fluttershy 2025-02-02 00:11:39 +05:00
parent 2a9297a3b2
commit 61e59be26e
10 changed files with 11 additions and 10 deletions

View File

@ -1,6 +1,6 @@
#ifndef INTERFACE_AUTHOR_HPP_ #ifndef INTERFACE_AUTHOR_HPP_
#define INTERFACE_AUTHOR_HPP_ #define INTERFACE_AUTHOR_HPP_
#include <includes.hpp> #include <pch.hpp>
#include <network.hpp> #include <network.hpp>
class Author { class Author {
private: private:

View File

@ -1,6 +1,6 @@
#ifndef INTERFACE_BOT_HPP_ #ifndef INTERFACE_BOT_HPP_
#define INTERFACE_BOT_HPP_ #define INTERFACE_BOT_HPP_
#include <includes.hpp> #include <pch.hpp>
template<typename...Args> template<typename...Args>
class Discord { class Discord {
private: private:

View File

@ -1,6 +1,6 @@
#ifndef INTERFACE_CHANNEL_HPP_ #ifndef INTERFACE_CHANNEL_HPP_
#define INTERFACE_CHANNEL_HPP_ #define INTERFACE_CHANNEL_HPP_
#include <includes.hpp> #include <pch.hpp>
#include <network.hpp> #include <network.hpp>
class Channel { class Channel {
private: private:

View File

@ -1,6 +1,6 @@
#ifndef INTERFACE_EMBED_HPP_ #ifndef INTERFACE_EMBED_HPP_
#define INTERFACE_EMBED_HPP_ #define INTERFACE_EMBED_HPP_
#include <includes.hpp> #include <pch.hpp>
class EmbedBuilder { class EmbedBuilder {
private: private:
nlohmann::json embed = { nlohmann::json embed = {

View File

@ -1,6 +1,6 @@
#ifndef INTERFACE_GUILD_HPP_ #ifndef INTERFACE_GUILD_HPP_
#define INTERFACE_GUILD_HPP_ #define INTERFACE_GUILD_HPP_
#include <includes.hpp> #include <pch.hpp>
#include <network.hpp> #include <network.hpp>
class Guild { class Guild {
private: private:

View File

@ -1,6 +1,6 @@
#ifndef INTERFACE_MESSAGE_HPP_ #ifndef INTERFACE_MESSAGE_HPP_
#define INTERFACE_MESSAGE_HPP_ #define INTERFACE_MESSAGE_HPP_
#include <includes.hpp> #include <pch.hpp>
#include <network.hpp> #include <network.hpp>
class Message { class Message {
private: private:

View File

@ -1,6 +1,6 @@
#ifndef INTERFACE_USER_HPP_ #ifndef INTERFACE_USER_HPP_
#define INTERFACE_USER_HPP_ #define INTERFACE_USER_HPP_
#include <includes.hpp> #include <pch.hpp>
#include <network.hpp> #include <network.hpp>
#include <vector> #include <vector>
class User { class User {

View File

@ -1,6 +1,6 @@
#ifndef TLS_NETWORK_HPP_ #ifndef TLS_NETWORK_HPP_
#define TLS_NETWORK_HPP_ #define TLS_NETWORK_HPP_
#include <includes.hpp> #include <pch.hpp>
#include <network/websocket.hpp> #include <network/websocket.hpp>
#include <curl/curl.h> #include <curl/curl.h>
class NetworkManager { class NetworkManager {

View File

@ -1,6 +1,6 @@
#ifndef NETWORK_WEBSOCKET_HPP_ #ifndef NETWORK_WEBSOCKET_HPP_
#define NETWORK_WEBSOCKET_HPP_ #define NETWORK_WEBSOCKET_HPP_
#include <includes.hpp> #include <pch.hpp>
#include <ranges> #include <ranges>
#include <ixwebsocket/IXNetSystem.h> #include <ixwebsocket/IXNetSystem.h>
#include <ixwebsocket/IXWebSocket.h> #include <ixwebsocket/IXWebSocket.h>

View File

@ -1,6 +1,7 @@
#include <api.hpp> #include <api.hpp>
#include <includes.hpp> #include <includes.hpp>
#include <cxxopts.hpp> #include <cxxopts.hpp>
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
cxxopts::Options options("sparkle", "WIP discord bot library in C++"); cxxopts::Options options("sparkle", "WIP discord bot library in C++");
options.add_options() options.add_options()
@ -37,7 +38,7 @@ int main(int argc, char* argv[]) {
bot->on(GatewayEvents::MESSAGE_CREATE, [bot](const Discord<Message, User, Author>& msg) { bot->on(GatewayEvents::MESSAGE_CREATE, [bot](const Discord<Message, User, Author>& msg) {
auto& [message, user, author] = msg.ctx(); auto& [message, user, author] = msg.ctx();
if (!author->isBot) { if (!author->isBot) {
message->send("939957962972229634", message->pack("content", std::to_string(user->isBot))); message->send("1334963948767940648", message->pack("content", std::to_string(user->isBot)));
bot->getEvents(); bot->getEvents();
bot->sendPresenceUpdate(StatusType::DND, "meow", ActivityType::Listening); bot->sendPresenceUpdate(StatusType::DND, "meow", ActivityType::Listening);
} }