> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streame.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# $(random)

> Eine Zufallszahl, optional mit Bereich.

Gibt eine Zufallszahl aus. Ohne Angabe zwischen **0 und 100**, mit Bereich innerhalb der angegebenen Grenzen (die Grenzen zählen mit).

Als Trenner für den Bereich funktionieren sowohl **Bindestrich `-`** als auch **Komma `,`**. Negative Zahlen sind erlaubt.

| Antwort-Text        | Output (Beispiel)                                         |
| ------------------- | --------------------------------------------------------- |
| `$(random)`         | `73`                                                      |
| `$(random 1-10)`    | `7`                                                       |
| `$(random 1,10)`    | `4`                                                       |
| `$(random -10-10)`  | `-3`                                                      |
| `$(random -50--10)` | `-33`                                                     |
| `$(random -10,10)`  | `5`                                                       |
| `$(random 10-5)`    | funktioniert — die Reihenfolge wird automatisch getauscht |
| `$(random 5)`       | leer — ein Bereich braucht zwei Zahlen                    |
| `$(random abc)`     | leer — keine gültige Zahl                                 |

<Warning>
  Bei ungültigen Angaben (z.B. `$(random abc)` oder nur eine einzelne Zahl) wird die Variable still durch **nichts** (leeren Text) ersetzt. Es erscheint keine Fehlermeldung im Chat.
</Warning>
