Any Way to Grab the First Word in the Title Somehow?


#1

I wanted to check if it’s possible to grab the first word of the title and use that as a response.
Me and my friends share a channel and put our individual names first in the title when we stream. So wanted to add that in the auto response for the command if that works.

Command example: !commands add !uptime $firsttitleword has been live for “{{uptimeLength}}”)
Response example: Nightbot: Menteroth has been live for 2 hours 43 minutes 41 seconds


#2

@Menteroth I added a second response ("[first word of title] is offline.") in case anyone uses the command while the channel isn’t streaming. Copy and paste this into chat:

!commands !add !uptime $(eval a=`$(twitch $(channel) "{{title}}")`.split(` `)[0];b=`$(twitch $(channel) "{{uptimeLength}}")`;b!=`channel is not live`?a+` has been live for `+b:a+` is offline.`)

#3

Damn. Thank you so much for helping out. Very much appreciated. Have an awesome weekend, what’s left of it.