Hey @Vanderbeam!
You can easily do this by using the power of JSON!
First go to Pastebin, create an account in order to be able to add more games in the future.
Next create your JSON file, here’s how to do it:
{
"game name": "description",
"second game": "description",
"third game": "description",
"nth game": "description"
}
Click here for more explanation on the JSON format.
Note: if you need to add a "
, a /
, or a \
in your text, you’ll need to precede it by a back slash \
, so for example \"text\"
will give you "text"
, or https:\/\/nightbot.tv
will give you https://nightbot.tv
, I’m specifying it because it’s a common mistake.
So for example:
{
"Disco Elysium": "Disco Elysium is a groundbreaking role playing game. You’re a detective with a unique skill system at your disposal and a whole city to carve your path across. Interrogate unforgettable characters, crack murders or take bribes. Become a hero or an absolute disaster of a human being.",
"NieR: Automata": "NieR: Automata tells the story of androids 2B, 9S and A2 and their battle to reclaim the machine-driven dystopia overrun by powerful machines."
}
It’s important for the game names to match how Twitch refers to them, otherwise it won’t work.
Save the paste with the expiration date set to Never
and the exposure set to Unlisted
.
When you’ll need to add more games you’ll just have to come back to that file and edit it.
Finally take note of the paste ID and replace it in the following command:
$(eval p=$(urlfetch json https://pastebin.com/raw/XXXXXXXX); g=`$(twitch $(channel) "{{game}}")`; d=p[`${g}`]; d?d:`${g}'s description not found.`)