add guild role update, create, delete events

This commit is contained in:
ouwou
2020-12-14 01:40:22 -05:00
parent 1f19efc90e
commit 33ed25b2f6
4 changed files with 93 additions and 0 deletions

View File

@@ -46,6 +46,9 @@ enum class GatewayEvent : int {
CHANNEL_UPDATE,
CHANNEL_CREATE,
GUILD_UPDATE,
GUILD_ROLE_UPDATE,
GUILD_ROLE_CREATE,
GUILD_ROLE_DELETE,
};
struct GatewayMessage {
@@ -251,3 +254,24 @@ struct ResumeMessage : GatewayMessage {
friend void to_json(nlohmann::json &j, const ResumeMessage &m);
};
struct GuildRoleUpdateObject {
Snowflake GuildID;
Role Role;
friend void from_json(const nlohmann::json &j, GuildRoleUpdateObject &m);
};
struct GuildRoleCreateObject {
Snowflake GuildID;
Role Role;
friend void from_json(const nlohmann::json &j, GuildRoleCreateObject &m);
};
struct GuildRoleDeleteObject {
Snowflake GuildID;
Snowflake RoleID;
friend void from_json(const nlohmann::json &j, GuildRoleDeleteObject &m);
};