feat(eventsub): implement mode changes (#5992)

This commit is contained in:
nerix
2025-02-26 12:52:49 +01:00
committed by GitHub
parent 5ea420b7ae
commit 1bf87e46cd
14 changed files with 2000 additions and 1 deletions
@@ -6,6 +6,15 @@
#include <QDateTime>
#include <concepts>
namespace chatterino::eventsub::detail {
template <typename T, typename... Types>
concept AnyOf = (std::same_as<T, Types> || ...);
} // namespace chatterino::eventsub::detail
namespace chatterino::eventsub {
class EventSubMessageBuilder : public MessageBuilder
@@ -54,4 +63,51 @@ void makeModerateMessage(
const lib::payload::channel_moderate::v2::Event &event,
const lib::payload::channel_moderate::v2::Unban &action);
// mode changes
void makeModerateMessage(
EventSubMessageBuilder &builder,
const lib::payload::channel_moderate::v2::Event &event,
const lib::payload::channel_moderate::v2::Followers &action);
void makeModerateMessage(
EventSubMessageBuilder &builder,
const lib::payload::channel_moderate::v2::Event &event,
const lib::payload::channel_moderate::v2::FollowersOff &action);
void makeModerateMessage(
EventSubMessageBuilder &builder,
const lib::payload::channel_moderate::v2::Event &event,
const lib::payload::channel_moderate::v2::EmoteOnly &action);
void makeModerateMessage(
EventSubMessageBuilder &builder,
const lib::payload::channel_moderate::v2::Event &event,
const lib::payload::channel_moderate::v2::EmoteOnlyOff &action);
void makeModerateMessage(
EventSubMessageBuilder &builder,
const lib::payload::channel_moderate::v2::Event &event,
const lib::payload::channel_moderate::v2::Slow &action);
void makeModerateMessage(
EventSubMessageBuilder &builder,
const lib::payload::channel_moderate::v2::Event &event,
const lib::payload::channel_moderate::v2::SlowOff &action);
void makeModerateMessage(
EventSubMessageBuilder &builder,
const lib::payload::channel_moderate::v2::Event &event,
const lib::payload::channel_moderate::v2::Subscribers &action);
void makeModerateMessage(
EventSubMessageBuilder &builder,
const lib::payload::channel_moderate::v2::Event &event,
const lib::payload::channel_moderate::v2::SubscribersOff &action);
void makeModerateMessage(
EventSubMessageBuilder &builder,
const lib::payload::channel_moderate::v2::Event &event,
const lib::payload::channel_moderate::v2::Uniquechat &action);
void makeModerateMessage(
EventSubMessageBuilder &builder,
const lib::payload::channel_moderate::v2::Event &event,
const lib::payload::channel_moderate::v2::UniquechatOff &action);
} // namespace chatterino::eventsub