By TeaLeafShark • Category: events
# Event: @chat
# Description: Automatically shouts out creators from shoutout_list.json once per stream
# 1. Look up if the sender is on the shoutout list (returns "0" if not found)
READ isVip FROM JSON "shoutout_list.json" KEY "{username}"
# IF {isVip} == 0 EXIT
# 2. Check stream cooldown (8 hours = 28,800,000 ms)
TIME now
READ lastTime FROM JSON "shoutout_history.json" KEY "{username}"
MATH diff = {now} - {lastTime}
IF {diff} < 28800000 EXIT
# 3. Update their shoutout timestamp
WRITE {now} TO JSON "shoutout_history.json" KEY "{username}"
# 4. Send shoutout message (default or custom text)
IF {shoutoutMsg} != 1 THEN
REPLY "{isVip} https://twitch.tv/{username}"
ELSE
REPLY "Shoutout to the amazing @{sender}! Check them out at https://twitch.tv/{username}"
END IF
yip:// protocol.