$(title)
- Syntax
$(title [username])- Arguments
- Optional
The $(title) variable displays the current title of a Twitch channel. This variable is useful for creating commands that show the stream’s title or for integrating the title information into other chatbot responses.
Use it
Section titled “Use it”!command add !title The current stream title is: $(title)To use the $(title) variable, simply include it in your custom command or message response. The chatbot will replace the variable with the channel’s current title when the command is executed.
Examples
Section titled “Examples”Incorporating the title into a welcome message:
!command add !welcome Welcome to the stream, $(user)! We're currently $(title). Enjoy your stay!Parameters
Section titled “Parameters”The $(title) variable accepts one optional parameter:
username: The username of the channel whose title you want to check. If not provided, it defaults to the current channel.
Example usage with a parameter:
$(title OtherStreamer)This would return the title of the channel “OtherStreamer” instead of the current channel. Cross-channel lookups are supported on Twitch.
Aliases
Section titled “Aliases”$(status) can also be used as an alias for $(title), as can the sub-variable form $(channel.title).
Errors
Section titled “Errors”- If fetching your own channel’s title fails, the output is
<error>. - For cross-channel lookups, a channel that doesn’t exist outputs
<error not_found>, and other API failures output an error code such as<error unknown>.
Related Variables
Section titled “Related Variables”$(game): Displays the current game or category of the stream$(uptime): Shows how long the current stream has been live$(settitle): Changes the stream title
Q: How often does the title information update?
A: The title information is typically updated in real-time, but there might be a slight delay (usually a few seconds) between changing the title on Twitch and the chatbot reflecting the new title.