$(game)
- Syntax
$(game [username])- Arguments
- Optional
The $(game) variable displays the game category a channel is currently playing.
Use it
Section titled “Use it”!command add !game We're currently playing $(game)!To use the $(game) variable, simply include it in your command or message:
$(game)You can also check the game of a specific channel by providing a username:
$(game [username])The variable is replaced with the name of the game or category, exactly as it appears on the platform.
Examples
Section titled “Examples”Check the game on another channel:
shroud is playing: $(game shroud)Parameters
Section titled “Parameters”username(optional): The Twitch username of the channel you want to check. If not provided, the variable will display the game of the current channel. Cross-channel lookups work on Twitch.
Related Variables
Section titled “Related Variables”$(title): Displays the current stream title$(channel): Shows information about the current channel$(uptime): Displays how long the current stream has been live
Q: How often does the game information update?
A: The game is fetched live each time the variable runs, so it reflects the platform’s current data. Changes typically show up within a few seconds of updating the game on Twitch.
Q: What happens if no game is set?
A: If no game is set for the channel, the $(game) variable returns <no game>.
Q: What happens if the lookup fails?
A: If the game can’t be retrieved for your own channel, the variable returns <error>. When checking another channel, a channel that doesn’t exist returns <error not_found>, and other failures return an <error ...> code.