feat(eventsub): add automod.message.* and channel.suspicious_user.* (#6003)

This commit is contained in:
nerix
2025-02-27 21:53:48 +01:00
committed by GitHub
parent d2c158098d
commit 95b97f42e6
38 changed files with 2357 additions and 748 deletions
@@ -0,0 +1,50 @@
#pragma once
#include "twitch-eventsub-ws/payloads/automod-message.hpp"
#include "twitch-eventsub-ws/payloads/structured-message.hpp"
#include "twitch-eventsub-ws/payloads/subscription.hpp"
#include <boost/json.hpp>
#include <string>
namespace chatterino::eventsub::lib::payload::automod_message_update::v2 {
struct Event {
// Broadcaster of the channel the message was sent in
std::string broadcasterUserID;
std::string broadcasterUserLogin;
std::string broadcasterUserName;
// User who sent the message
std::string userID;
std::string userLogin;
std::string userName;
// Moderator who updated the message (possibly empty)
std::string moderatorUserID;
std::string moderatorUserLogin;
std::string moderatorUserName;
std::string messageID;
chat::Message message;
// "Approved", "Denied", or "Expired"
std::string status;
// TODO: use chrono?
std::string heldAt;
/// json_tag=reason
std::variant<automod::AutomodReason, automod::BlockedTermReason> reason;
};
struct Payload {
subscription::Subscription subscription;
Event event;
};
#include "twitch-eventsub-ws/payloads/automod-message-update-v2.inc"
} // namespace chatterino::eventsub::lib::payload::automod_message_update::v2