Help with creating an auto-updating search command?

Hi. I’m trying to create an automated command so that people can look up whatever game I’m playing on Is There Any Deal, so they can buy it if they like what they see, and I don’t want to have to update it myself every time I change games.

This is what I have so far (except I replaced actual link with SITEURL. that part is working.)
SITEURL/game/$(twitch koholos “{{game}}”)
This is what it’s giving me:
SITEURL/game/Kerbal Space Program

I have also tried:
SITEURL/game/$(querystring $(twitch $(channel) “{{game}}”))
which gives me:
SITEURL/game/Kerbal%20Space%20Program

So, basically, I need to get rid of the spaces or %20’s. Also, apparently I need to make everything lower case. If anyone could give me some assistance with that, I’d really appreciate it. I’ve tried using Javascript replace and trim commands, and that doesn’t seem to be the right choice.

You would need to use the eval variable and write custom javascript to format the game how you intend to. Someone may chime in here for a solution, but you could learn JavaScript and DIY it.

@koholos

Some eval code, fresh out of the oven.

SITEURL/game/$(eval `$(twitch $(channel) "{{game}}")`.replace(/ /g,``).toLowerCase())

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