feat: notate power-up automatic reward redemptions (#5471)

This commit is contained in:
iProdigy
2024-06-22 06:03:49 -05:00
committed by GitHub
parent c01bfcfffe
commit 2ef3306d1d
7 changed files with 94 additions and 12 deletions
@@ -1594,6 +1594,15 @@ void TwitchMessageBuilder::appendChannelPointRewardMessage(
}
builder->emplace<TextElement>(redeemed,
MessageElementFlag::ChannelPointReward);
if (reward.id == "CELEBRATION")
{
const auto emotePtr =
getIApp()->getEmotes()->getTwitchEmotes()->getOrCreateEmote(
EmoteId{reward.emoteId}, EmoteName{reward.emoteName});
builder->emplace<EmoteElement>(emotePtr,
MessageElementFlag::ChannelPointReward,
MessageColor::Text);
}
builder->emplace<TextElement>(
reward.title, MessageElementFlag::ChannelPointReward,
MessageColor::Text, FontStyle::ChatMediumBold);
@@ -1602,6 +1611,12 @@ void TwitchMessageBuilder::appendChannelPointRewardMessage(
builder->emplace<TextElement>(
QString::number(reward.cost), MessageElementFlag::ChannelPointReward,
MessageColor::Text, FontStyle::ChatMediumBold);
if (reward.isBits)
{
builder->emplace<TextElement>(
"bits", MessageElementFlag::ChannelPointReward, MessageColor::Text,
FontStyle::ChatMediumBold);
}
if (reward.isUserInputRequired)
{
builder->emplace<LinebreakElement>(