Skip to content

$(uptime)

Syntax
$(uptime [username])
Arguments
Optional

The $(uptime) variable displays how long a channel’s current stream has been live.

!command add !uptime The stream has been live for $(uptime)
Example chat
ViewerName:!uptime
partner badgemoderator badgeStreamElements:The stream has been live for 2 hours 15 mins

To use the $(uptime) variable, simply include it in a custom command or message. You can optionally specify a username to check the uptime for a particular streamer.

$(uptime [username])

The duration is written out in full words: secs, mins, hours, days — for example 2 hours 15 mins or 45 mins. When the channel is offline, the variable outputs <not live> instead.

Check uptime for a specific streamer:

!command add !shroud shroud has been live for $(uptime shroud)
Example chat
ViewerName:!shroud
partner badgemoderator badgeStreamElements:shroud has been live for 3 hours 45 mins
  • username (optional): The name of the streamer whose uptime you want to check. If omitted, the variable will default to the current stream’s uptime. Cross-channel lookups are supported on Twitch.
  • $(game): Displays the current game being played on the stream
  • $(title): Shows the current stream title

Q: Will $(uptime) work for offline channels?

A: No, the $(uptime) variable only works for currently live streams. For offline channels, it outputs <not live>.

Q: Can I customize the uptime format?

A: The default format spells out the units, e.g. “2 hours 15 mins”. While you can’t directly change this format within the variable, you can create custom commands that parse and reformat the output as needed.