Need help combining !title and !game in one command using presets

Asked Feb 5, 2021·2 replies·Last activity 5 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

I know that there are commands for changing the title and the game seperately. But since I mostly use default titles for each game I thought it would be handy to set this up in one command:

$(eval var input = decodeURIComponent("$(querystring)").toLowerCase(); input.includes("game1")? -a=!title $(twitch $(channel) "title1"): input.includes("game2")? -a=!title $(twitch $(channel) "title2"))

I haven't added in the code for changing the game, haven't found the code for that yet. But when that is added I will only need to use one command and use 1 keyword to change the title and game at the same time.

right now I'm getting this error:

Invalid left-hand side in assignment

I would also like to add a comment like: "update succesfull", but do I just add this behind the actual function like so:
input.includes("game1")? -a=!title $(twitch $(channel) "title1") "update succesfull":

2 replies

A command can only be set as an alias of one other command.

You could set a timer that automatically updates the title to be the same as the game every five minutes. So you’d only ever have to change the game.