view and delete invites, more tweaking

This commit is contained in:
ouwou
2021-01-21 23:49:42 -05:00
parent 7b6fb861ac
commit 547124c94f
17 changed files with 477 additions and 104 deletions

View File

@@ -57,6 +57,8 @@ enum class GatewayEvent : int {
TYPING_START,
GUILD_BAN_REMOVE,
GUILD_BAN_ADD,
INVITE_CREATE,
INVITE_DELETE,
};
struct GatewayMessage {
@@ -370,3 +372,27 @@ struct GuildBanAddObject {
friend void from_json(const nlohmann::json &j, GuildBanAddObject &m);
};
struct InviteCreateObject {
Snowflake ChannelID;
std::string Code;
std::string CreatedAt;
std::optional<Snowflake> GuildID;
std::optional<UserData> Inviter;
int MaxAge;
int MaxUses;
UserData TargetUser;
std::optional<ETargetUserType> TargetUserType;
bool IsTemporary;
int Uses;
friend void from_json(const nlohmann::json &j, InviteCreateObject &m);
};
struct InviteDeleteObject {
Snowflake ChannelID;
std::optional<Snowflake> GuildID;
std::string Code;
friend void from_json(const nlohmann::json &j, InviteDeleteObject &m);
};