Files
abaddon/src/discord/webhook.hpp
T
Dylam De La Torre a51a54bc59 Restructure source and resource files (#46)
importantly, res is now res/res and css is now res/css
2021-11-23 04:21:56 +00:00

25 lines
540 B
C++

#pragma once
#include <optional>
#include "json.hpp"
#include "snowflake.hpp"
#include "user.hpp"
enum class WebhookType {
Incoming = 1,
ChannelFollower = 2,
};
struct WebhookData {
Snowflake ID;
WebhookType Type;
std::optional<Snowflake> GuildID;
Snowflake ChannelID;
std::optional<UserData> User;
std::string Name; // null
std::string Avatar; // null
std::optional<std::string> Token;
Snowflake ApplicationID; // null
friend void from_json(const nlohmann::json &j, WebhookData &m);
};