alias CheckNewDonations {
//echo checking for new tips from streamtip!
var %lasttipURL = E:\Other Files\Google Drive\Public\projects\twitch\bot\private\streamtip_checkerURL.txt
var %link = $read(%lasttipURL)
var %v = twc_ $+ $ticks
JSONOpen -ud %v %link
var %currentTipCount = $JSON(%v,_count)
var %currentTipID = $JSON(%v,tips,0,_id)
var %previousTipID = %currentTipID
var %tipName = $JSON(%v,tips,0,username)
var %tipCount = $JSON(%v,tips,0,amount)
var %tipSymbol = $JSON(%v,tips,0,currencySymbol)
var %tipDate = $JSON(%v,tips,0,date)
if (%currentTipCount != %previousTipID) {
msg $chan /me %tipName just tipped %tipSymbol $+ %tipCount $+ . thanks for the support! <3 <3
return
}
else if (%currentTipCount == %previousTipID) {
return
}
:end
JSONClose %v
}