feat: indicate which mods start and cancel raids (#5563)

This commit is contained in:
iProdigy
2024-08-31 03:12:25 -07:00
committed by GitHub
parent af309b726f
commit 956186d1a1
8 changed files with 121 additions and 5 deletions
+34
View File
@@ -648,6 +648,40 @@ void TwitchIrcServer::initialize()
});
});
this->connections_.managedConnect(
getApp()->getTwitchPubSub()->moderation.raidStarted,
[this](const auto &action) {
auto chan = this->getChannelOrEmptyByID(action.roomID);
if (chan->isEmpty())
{
return;
}
auto msg = MessageBuilder(action).release();
postToThread([chan, msg] {
chan->addMessage(msg, MessageContext::Original);
});
});
this->connections_.managedConnect(
getApp()->getTwitchPubSub()->moderation.raidCanceled,
[this](const auto &action) {
auto chan = this->getChannelOrEmptyByID(action.roomID);
if (chan->isEmpty())
{
return;
}
auto msg = MessageBuilder(action).release();
postToThread([chan, msg] {
chan->addMessage(msg, MessageContext::Original);
});
});
this->connections_.managedConnect(
getApp()->getTwitchPubSub()->pointReward.redeemed, [this](auto &data) {
QString channelId = data.value("channel_id").toString();