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

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

@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.`)
1 Like

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

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.