feat(eventsub): implement automod message hold (#6005)

This commit is contained in:
nerix
2025-03-01 08:32:50 +01:00
committed by GitHub
parent 95b97f42e6
commit 8f1f07d672
17 changed files with 1769 additions and 19 deletions
@@ -2,6 +2,7 @@
#include "messages/MessageBuilder.hpp"
#include "providers/twitch/TwitchChannel.hpp"
#include "twitch-eventsub-ws/payloads/automod-message-hold-v2.hpp"
#include "twitch-eventsub-ws/payloads/channel-moderate-v2.hpp"
#include <QDateTime>
@@ -20,7 +21,9 @@ namespace chatterino::eventsub {
class EventSubMessageBuilder : public MessageBuilder
{
public:
// builds a system message and adds a timestamp element
EventSubMessageBuilder(TwitchChannel *channel, const QDateTime &time);
EventSubMessageBuilder(TwitchChannel *channel);
~EventSubMessageBuilder();
EventSubMessageBuilder(const EventSubMessageBuilder &) = delete;
@@ -145,4 +148,12 @@ void makeModerateMessage(
const lib::payload::channel_moderate::v2::Event &event,
const lib::payload::channel_moderate::v2::Unraid &action);
MessagePtr makeAutomodHoldMessageHeader(
TwitchChannel *channel, const QDateTime &time,
const lib::payload::automod_message_hold::v2::Event &event);
MessagePtr makeAutomodHoldMessageBody(
TwitchChannel *channel, const QDateTime &time,
const lib::payload::automod_message_hold::v2::Event &event);
} // namespace chatterino::eventsub