Skip to content

$(repeat)

Syntax
$(repeat <count> <phrase>)
Arguments
Required

The $(repeat) variable allows you to repeat a specified phrase multiple times in your StreamElements Chatbot messages. This can be useful for creating emphasis, generating patterns, or simply for fun interactions in chat.

!command add !hype $(repeat 5 HYPE)
Example chat
ViewerName:!hype
partner badgemoderator badgeStreamElements:HYPE HYPE HYPE HYPE HYPE

The basic syntax for using the $(repeat) variable is:

$(repeat <count> <phrase>)

Where <count> is the number of times you want to repeat the phrase, and <phrase> is the text you want to repeat. The repetitions are joined with single spaces.

You can combine $(repeat) with other variables:

$(repeat 2 "$(user) is awesome!")
Example chat
partner badgemoderator badgeStreamElements:StreamerPro is awesome! StreamerPro is awesome!

The $(repeat) variable requires two parameters:

  1. Count: The number of times to repeat the phrase. Must be a positive integer; capped at 100.
  2. Phrase: The text or variable to be repeated.
  • $(queryescape): Escapes text for use in URL query parameters.
  • $(random): Generates random numbers or selects random items, which can be used with $(repeat).

Q: Is there a limit to how many times I can repeat a phrase?

A: Yes. The repeat count is capped at 100, and the total output is limited to roughly 1,000 characters — whichever is reached first.

Q: Can I use $(repeat) within other variables?

A: Yes, you can nest $(repeat) within other variables or use other variables within $(repeat).

Q: Why doesn’t my command respond at all?

A: A missing or invalid repeat count suppresses the entire response. Double-check that the first parameter is a whole number of 1 or more.