Skip to content

$(setgame)

Syntax
$(setgame "<game name>")
Arguments
Required

The $(setgame) variable allows you to change the current game or category for your stream directly through the StreamElements Chatbot. On success, it outputs the full name of the category that was set.

!command add !setgame Game updated to $(setgame ${1:})
Example chat
moderator badgeModUser:!setgame rocket league
partner badgemoderator badgeStreamElements:Game updated to Rocket League

To use this variable, include it in a command or message with the desired game name as a parameter.

$(setgame "<game name>")
  1. Changing the game to World of Warcraft:

    $(setgame "World of Warcraft")
  2. Updating the stream category to Just Chatting:

    $(setgame "Just Chatting")
  3. Using an abbreviation:

    $(setgame "OSRS")

The $(setgame) variable accepts one parameter:

  • "Game Name": The title of the game you want to set for your stream. This parameter supports fuzzy searching, allowing for slight misspellings or common abbreviations.

On success, the variable outputs the resolved category name (for example, setting "rocket league" outputs Rocket League). If the bot doesn’t have the necessary channel authorization, it outputs invalid channel. If the platform rejects the change, the raw error message is shown instead.

Q: Can I use this variable in any chat message?

A: Typically, this variable is used within custom commands or bot responses. Make sure to set appropriate permission levels to prevent misuse.

Q: Will this work for all streaming platforms?

A: The $(setgame) variable is designed to work with platforms that support game/category changes through the StreamElements API. It’s primarily used for Twitch streams.

Q: Why does the output say “invalid channel”?

A: The bot is missing authorization for your channel. Reconnect your account on the StreamElements dashboard so the bot can update your category.