Add one more Twitch chat tag temp var

This commit is contained in:
Przemek Pawlas 2024-10-05 16:04:01 +02:00 committed by WarmUpTill
parent 8ecee0070d
commit 62ce83a7f6
2 changed files with 7 additions and 0 deletions

View File

@ -1752,6 +1752,8 @@ AdvSceneSwitcher.tempVar.twitch.emotes.chatReceive="Chatter badges"
AdvSceneSwitcher.tempVar.twitch.emotes.chatReceive.description="A string describing all the emotes in the message - the emote ID and comma-separated all positions of emotes with that ID.\nFor example: 25:0-4,12-16/1902:6-10"
AdvSceneSwitcher.tempVar.twitch.timestamp.chatReceive="Chat message timestamp"
AdvSceneSwitcher.tempVar.twitch.timestamp.chatReceive.description="The Unix timestamp representing when the chat message was sent, in milliseconds."
AdvSceneSwitcher.tempVar.twitch.is_emotes_only.chatReceive="Is using only emotes"
AdvSceneSwitcher.tempVar.twitch.is_emotes_only.chatReceive.description="'true' if the message consists only of emotes, 'false' otherwise."
AdvSceneSwitcher.tempVar.twitch.is_first_message.chatReceive="Is chatter's first message"
AdvSceneSwitcher.tempVar.twitch.is_first_message.chatReceive.description="'true' if the chatter has never sent messages in the channel before, 'false' otherwise."
AdvSceneSwitcher.tempVar.twitch.is_mod.chatReceive="Is chatter a moderator"

View File

@ -418,6 +418,10 @@ bool MacroConditionTwitch::CheckChatMessages(TwitchToken &token)
SetTempVarValue("emotes", message->properties.emotesString);
SetTempVarValue("timestamp",
std::to_string(message->properties.timestamp));
SetTempVarValue("is_emotes_only",
message->properties.isUsingOnlyEmotes
? "true"
: "false");
SetTempVarValue("is_first_message",
message->properties.isFirstMessage ? "true"
: "false");
@ -1292,6 +1296,7 @@ void MacroConditionTwitch::SetupTempVars()
setupTempVarHelper("color", ".chatReceive");
setupTempVarHelper("emotes", ".chatReceive");
setupTempVarHelper("timestamp", ".chatReceive");
setupTempVarHelper("is_emotes_only", ".chatReceive");
setupTempVarHelper("is_first_message", ".chatReceive");
setupTempVarHelper("is_mod", ".chatReceive");
setupTempVarHelper("is_subscriber", ".chatReceive");