Zum Inhalt

Command: !quote (Random oder Specific)

Postet eine Quote aus der DB. Ohne Argument: zufällige Quote. Mit Zahl: spezifische Quote.

Patterns: If/Else (Input-Type) + Get Quote (Random/Specific) + Send Message Sub-Actions: 5-7

Action: [Cmd] !quote

Sub-Action 1: If/Else — Spezifische ID

Feld Wert
Input %input0%
Operation Regex Match
Value ^[0-9]+$

Wenn %input0% eine Zahl ist → Then-Branch (Specific Quote). Sonst → Random.

Then-Branch:

Sub-Action 2 (im Then von 1): Get Quote Specific + Send Message + Break

2a. Get Quote
    Type: Specific
    Quote Id: %input0%
2b. If/Else: %quoteId% Is Null or Empty
    ├── Send Message: "@%user% Quote #%input0% existiert nicht."
    └── Break
2c. Send Message: "📝 Quote #%quoteId%: \"%quote%\" — %quoteUser%, %quoteGame% (%quoteTime%)"
2d. Break

Sub-Action 3: Get Quote Random

Pfad: Core → Quotes → Get Quote

Feld Wert
Type Random

Setzt:

Variable Inhalt
%quote% Quote-Text
%quoteId% ID
%quoteUser% Display Name
%quoteGame% Game zum Zeitpunkt der Quote
%quoteTime% Datum

Sub-Action 4: If/Else — Keine Quotes vorhanden

4. If/Else: %quoteId% Is Null or Empty
   ├── Send Message: "@%user% Noch keine Quotes vorhanden. Sei der/die Erste mit !addquote"
   └── Break

Sub-Action 5: Send Message — Erfolg

Feld Wert
Message 📝 Quote #%quoteId%: "%quote%" — %quoteUser%, %quoteGame% (%quoteTime%)

Action-Tree

[Cmd] !quote
├── 1. If/Else: %input0% Regex Match ^[0-9]+$
│   ├── 2a. Get Quote (Specific, Quote Id = %input0%)
│   ├── 2b. If/Else: %quoteId% Is Null or Empty
│   │   ├── Send Message: "Quote nicht existent"
│   │   └── Break
│   ├── 2c. Send Message: "📝 Quote #%quoteId%..."
│   └── 2d. Break
├── 3. Get Quote (Random)
├── 4. If/Else: %quoteId% Is Null or Empty
│   ├── Send Message: "Noch keine Quotes vorhanden"
│   └── Break
└── 5. Send Message: "📝 Quote #%quoteId%..."

Command-Einstellungen

Feld Wert
Name !quote
Group AzaCraft Quotes
Commands !quote
!zitat
Sources Twitch Message
Global Cooldown 5
User Cooldown 15

Permissions: leer = alle dürfen Quotes lesen.

Verwendungsbeispiele

Chat Resultat
!quote "📝 Quote #42: \"Diesmal nicht der Boss-Fight Fail.\" — Streamer, Elden Ring (15.05.2025)"
!quote 42 (gleiche Quote #42 fest)
!quote 99999 "@user Quote #99999 existiert nicht."
!quote (leere DB) "@user Noch keine Quotes vorhanden..."

Erweiterung: Suche nach Text

!findquote <suchwort> — alle Quotes mit dem Wort finden. Aktuell gibts keine native Search-Sub-Action. Workaround:

  • Iterate alle Quotes via Get Quote Count + Loop von 1 bis count
  • Pro Quote Get Quote Specific + Contains-Check
  • Bei Match → posten

Komplexer Pattern mit While-Loop. Pragmatisch: ohne native Search, nicht implementieren. Stattdessen Quotes alle paar Monate manuell durchschauen.

Erweiterung: Quote-Format vereinfachen

Wenn Game-Info nervt:

Feld Wert
Message 📝 #%quoteId%: "%quote%"

Oder noch kürzer: | Feld | Wert | |------|------| | Message | "%quote%" (#%quoteId%) |

Erweiterung: Auto-Quote alle X Minuten

Timer-Trigger der alle 30 Min eine Random-Quote postet:

Action: [Timer] Random Quote

Trigger: Core → Uncategorized → Timed Actions (Timer alle 30 Min)

Sub-Actions wie oben (Get Quote Random + Send Message).

Nice für Stream-Filler.

Häufige Fallen

  • Specific-ID 0 — Streamer.bot zählt ab 1. ID 0 existiert nicht. Empty-Check fängt das ab
  • Sehr lange Quotes — Twitch hat 500-Zeichen-Limit für Chat. Mit Game-Info + User + ID kann's eng werden. Bei sehr langen Quotes kürzeres Format nutzen
  • Quote-DB sehr groß — bei mehreren Tausend Quotes ist Get Quote (Random) weiter okay-performant. Bei zigtausend evtl. langsamer

Quellen