Skip to content

Helpers on this page: {target}, {target.*}.

The target is the person a reply is about when that person is not the one who used it. These helpers work in commands, event responses, pipelines and webhooks. A timer has no target, so they are not offered there.

In a command, the target is the first word typed after the command, with any @ removed. In !hug @someone, the target is someone. The bot never fills in the caller when no name is given, so !hug on its own has no target at all. In an event response, the target is the person the event is about, such as the viewer who followed.

Write a reply about someone else

For a command used as !hug @someone, try this reply:

{user} sends a hug to {target.displayname}.

The caller’s name fills {user}, and the named person’s display name fills {target.displayname}. If the bot has never seen that person, it asks Twitch for the display name. It shows the word as typed only when no Twitch account has that name or the lookup fails.

Now someone types !hug with no name. {target.displayname} is empty, so the reply reads “ViewerOne sends a hug to .” To cover both cases, check {target} first with the if helper:

{if:{target}|{user} sends a hug to {target.displayname}.|{user} sends a hug to the whole chat.}

When nobody is named

Without a target, the helpers give these results:

  • {target}, {target.displayname} and the three message helpers are empty.
  • {target.known} is false.
  • The pronoun helpers use the neutral words they, them, their, person and are, and {target.verb:<sing|plur>} takes the second form.
  • {target.mention}, {target.shoutoutLink} and {target.link} stay in the reply as written, braces and all.
  • {target.data.<key>} is empty.
  • These stats read as nothing recorded: {target.messages}, {target.commands}, {target.botpercent}, {target.redemptions}, {target.songrequests}, {target.days} and {target.avgperday} are 0, {target.watchtime} is 0m and {target.firstseen} is unknown.
  • {target.stats.bits}, {target.stats.streak}, {target.stats.lastSeen} and {target.activity.level} stay in the reply as written, with no viewer data read at all.
  • {target.name}, {target.id}, {target.followAge} and the helpers that read the person’s Twitch account, channel, points or channel record stay in the reply as written.

Who the bot can read

The account, channel, points and stats helpers read what the bot has stored about the person. They work for someone the bot has a record of, which is when {target.known} is true. For a Twitch account the bot has not stored yet, {target.id}, {target.name} and {target.displayname} are filled in from Twitch. {target.mention}, {target.link} and {target.shoutoutLink} are built from the name. {target.known} is false. The Twitch profile and channel helpers read the Twitch ID in the stored record, which this person lacks, so {target.avatar}, {target.bio}, {target.color}, {target.createdAt}, {target.accountAge}, {target.game} and {target.title} are empty, {target.isLive} and {target.isFollower} are false and {target.viewers} is 0. The stats that count activity give 0, 0m or unknown, and {target.followAge} stays in the reply as written.

The points helpers read the named person’s balance in the bot’s channel currency. That balance is separate from Twitch Channel Points.

The examples show possible values; your results depend on the channel and the person. Use in lists the template fields that accept each helper.

Pronouns and grammar

These read the pronouns saved for the target. When the target has none saved, they use the neutral words. To learn where the bot gets pronouns and how to write a reply that fits he, she and they, read Pronouns in templates.

HelperWhat it givesExampleUse in
{target.subject}The subject pronountheyCommands, event responses, pipelines, webhooks
{target.object}The object pronounthemCommands, event responses, pipelines, webhooks
{target.possessive}The possessive pronountheirCommands, event responses, pipelines, webhooks
{target.presentTense}is or are, to agree with the pronounareCommands, event responses, pipelines, webhooks
{target.tense}is or are while your channel is live, was or were while it is offline. In a shoutout it follows the live state of the person shouted outareCommands, event responses, pipelines, webhooks
{target.genderedTerm}A gendered word for the personpersonCommands, event responses, pipelines, webhooks
{target.verb:<sing|plur>}The first form for a singular pronoun such as he or she, the second for they{target.verb:has|have} gives haveCommands, event responses, pipelines, webhooks
HelperWhat it givesExampleUse in
{target}The name as typed, without the @. In an event response, the login of the person the event is aboutexample_viewerCommands, event responses, pipelines, webhooks
{target.name}The login name. For a person the bot has not seen, the Twitch login; the typed word when no Twitch account has that nameexample_viewerCommands, event responses, pipelines, webhooks
{target.displayname}The display name: the stored one, else the one on Twitch, else the word as typedExample_ViewerCommands, event responses, pipelines, webhooks
{target.mention}An @ and the display name@ViewerTwoCommands, event responses, pipelines, webhooks
{target.id}The Twitch user ID. Empty when no Twitch account has that name123456789Commands, event responses, pipelines, webhooks
{target.known}true when the bot has a record of this person, else falsetrueCommands, event responses, pipelines, webhooks
{target.link}A short profile link, in lower casetwitch.tv/example_viewerCommands, event responses, pipelines, webhooks
{target.shoutoutLink}The full link to the person’s Twitch channelhttps://twitch.tv/viewertwoCommands, event responses, pipelines, webhooks
{target.avatar}The link to the Twitch profile picturehttps://static-cdn.jtvnw.net/jtv_user_pictures/viewertwo.pngCommands, event responses, pipelines, webhooks
{target.bio}The Twitch profile descriptionI build castlesCommands, event responses, pipelines, webhooks
{target.color}The chat color set on Twitch. Empty when none is set#FF4500Commands, event responses, pipelines, webhooks

Account, follow and subscription

HelperWhat it givesExampleUse in
{target.createdAt}The date the Twitch account was made, as year, month and day2019-05-02Commands, event responses, pipelines, webhooks
{target.accountAge}How old the Twitch account is, in years and months7 years, 5 monthsCommands, event responses, pipelines, webhooks
{target.followAge}How long the person has followed your channel. not following when they do not follow, unknown when Twitch cannot be asked. Stays as written for a person the bot has not stored1 yearCommands, event responses, pipelines, webhooks
{target.isFollower}true when the person follows your channel, else falsetrueCommands, event responses, pipelines, webhooks
{target.isSub}true when the person is subscribed to your channel, else falsefalseCommands, event responses, pipelines, webhooks

The target’s own channel

HelperWhat it givesExampleUse in
{target.isLive}true when the person is live now, else falsefalseCommands, event responses, pipelines, webhooks
{target.viewers}How many viewers their stream has now. 0 when they are offline18Commands, event responses, pipelines, webhooks
{target.game}The category set on their channelMinecraftCommands, event responses, pipelines, webhooks
{target.title}The stream title set on their channelBuilding castlesCommands, event responses, pipelines, webhooks

Points and saved data

HelperWhat it givesExampleUse in
{target.points}The person’s balance, with thousands separators. 0 when they have no balance800Commands, event responses, pipelines, webhooks
{target.points.rank}Their place on your channel’s points ranking. Empty when they are not on it17Commands, event responses, pipelines, webhooks
{target.data.<key>}The value saved under that key for this person. Empty when nothing is saved{target.data.deaths} gives 5Commands, event responses, pipelines, webhooks

Chat and watch stats

These count what the bot recorded in your channel only.

HelperWhat it givesExampleUse in
{target.messages}Chat messages sent250Commands, event responses, pipelines, webhooks
{target.commands}Commands used40Commands, event responses, pipelines, webhooks
{target.botpercent}The share of their messages that were commands, as a whole percent5Commands, event responses, pipelines, webhooks
{target.redemptions}Channel Point rewards redeemed8Commands, event responses, pipelines, webhooks
{target.songrequests}Songs requested3Commands, event responses, pipelines, webhooks
{target.stats.bits}Bits cheered, with thousands separators0Commands, event responses, pipelines, webhooks
{target.watchtime}Time spent watching, in hours and minutes12h 0mCommands, event responses, pipelines, webhooks
{target.firstseen}The date the bot first saw them. unknown when it never has2025-03-01Commands, event responses, pipelines, webhooks
{target.days}Whole days since first seen, at least 1 once seen30Commands, event responses, pipelines, webhooks
{target.avgperday}Messages per day since first seen, as a whole number8Commands, event responses, pipelines, webhooks
{target.stats.lastSeen}The date the bot last saw them. Empty when it never has2026-10-25Commands, event responses, pipelines, webhooks
{target.activity.level}new, casual, regular or veteran, from their message count. A channel starts with these steps at 10, 100 and 500 messagesveteranCommands, event responses, pipelines, webhooks
{target.stats.streak}The watch streak Twitch reported the last time they shared one in your chat: how many of your streams in a row they watched. 0 when they never shared one2Commands, event responses, pipelines, webhooks

The three message helpers read the person’s chat in your channel and skip commands and deleted messages.

HelperWhat it givesExampleUse in
{target.lastmessage}Their most recent message. Over 80 characters, it is cut to 77 and ends in ...see you tomorrowCommands, event responses, pipelines, webhooks
{target.lastmessage.full}Their most recent message that is not empty and does not start with a link, never cutsee you tomorrowCommands, event responses, pipelines, webhooks
{target.randommessage}A random message longer than 5 characters that does not start with a link. Over 200 characters, it is cut to 197 and ends in ...nice playCommands, event responses, pipelines, webhooks

Back to Template helpers. For the places helpers work, special characters and HTML, read Variables and templates. The helpers about the person who used the command are in User helpers.