Hello, I'd like an automated message to be sent every hour or so that shows how long i've been streaming. This site connects to twitch's api i believe and should be able to extract the text and put it into a message.

https://decapi.me/twitch/uptime.php?channel=obeewnn
I would also like to have the uptime displayed on command, !uptime

This is another script I was using that didn't work out for me:

Code:
[script]
n0=; --- settings ------
n1=
n2=alias uptime_chan return obeewnn
n3=; change this to your twitch channel (without # in front of the name)
n4=; example: starladder5
n5=
n6=alias uptime_offline_info return 1
n7=; if you change the 1 to 0 then when the stream of the channel that you set is offline the bot will not give any uptime message.
n8=
n9=alias uptime_check_secs return 5400
n10=; change this if you want to increase/decrease the checking uptime for you channel.
n11=; 900 seconds = 10 minutes
n12=
n13=; --- end of settings ----
n14=
n15=ON *:CONNECT: { .timer[UPTIME] 0 $iif($uptime_check_secs,$v1,900) uptime }
n16=
n17=alias uptime {
n18=  sockclose uptime
n19=  sockopen uptime nightdev.com 80
n20=}
n21=
n22=ON *:SOCKOPEN:uptime: {
n23=  if ($sockerr) { sockclose $sockname | halt }
n24=  sockwrite -n $sockname GET /hosted/uptime.php?channel= $+ $uptime_chan HTTP/1.1
n25=  sockwrite -n $sockname Host: $sock($sockname).addr
n26=  sockwrite -n $sockname $crlf
n27=}
n28=
n29=ON *:SOCKREAD:uptime: {
n30=  if ($sockerr) { sockclose $sockname }
n31=  var %data
n32=  sockread %data
n33=  if ($gettok(%data,1,32) isnum) && ($gettok(%data,2,32)) {
n34=    var %c = $chr(35) $+ $uptime_chan
n35=    if ($me !ison %c) { return }
n36=    .msg %c oBeE has been streaming for $qt(%data) $+ .
n37=  }
n38=  elseif (*not live.* iswm %data) {
n39=    if ($uptime_offline_info) {
n40=      var %c = $chr(35) $+ $uptime_chan
n41=      if ($me !ison %c) { return }
n42=      .msg %c The streaming is currently offline.
n43=    }
n44=  }
n45=}