Commands based on category

Asked May 11, 2023·1 reply·Last activity 3 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.

Idea/Concept: In order for a certain command to work, the stream would need to be in a certain category.

Example: While playing Fortnite, the command !streamwins says "[Streamer] has gotten [amount] wins on Fortnite this stream, GGs!" But if the streamer is playing Minecraft and someone types !streamwins, it does nothing or says "Must be in the Fortnite category in order to work."

1 reply

Hey @Swift Pig!

Here's how you do it:

$(eval g = '$(twitch $(channel) "{{game}}"); g === 'Fortnite' ? '$(channel) has gotten X wins on Fortnite this stream, GGs!' : ' ';)
$(eval g = '$(twitch $(channel) "{{game}}"); g === 'Fortnite' ? '$(channel) has gotten X wins on Fortnite this stream, GGs!' : 'Must be in the Fortnite category in order to work.';)