Command: !followage¶
Sagt wie lange ein User dem Kanal folgt. Mit oder ohne Target.
Patterns: Set Argument + If/Else (Fallback) + Get Follow Age Info for Target + Send Message Sub-Actions: 6 Cooldown: User 30s / Global 0s
Action: [Cmd] !followage¶
Sub-Action 1: Set Argument — Target-Login säubern¶
| Feld | Wert |
|---|---|
| Variable Name | targetLogin |
| Value | $replace(%input0%, @, )$ |
Sub-Action 2: If/Else — Fallback auf Sender¶
| Feld | Wert |
|---|---|
| Input | %targetLogin% |
| Operation | Is Null or Empty |
Then-Branch:
Sub-Action 3 (im Then von 2): Set Argument¶
| Feld | Wert |
|---|---|
| Variable Name | targetLogin |
| Value | %userName% |
Sub-Action 4: Get Follow Age Info for Target¶
Pfad: Twitch → Followers → Get Follow Age Info for Target
| Feld | Wert |
|---|---|
| Source Type | Variable |
| Variable Name | targetLogin |
Setzt:
| Variable | Inhalt |
|---|---|
%followUser% |
Display Name |
%followUserName% |
Login |
%isFollowing% |
bool |
%followAgeShort% |
"1y, 10m, 5d" |
%followAgeLong% |
"1 year, 10 months, 5 days" |
%followDate% |
Original Follow-Datum |
Sub-Action 5: If/Else — Folgt nicht¶
| Feld | Wert |
|---|---|
| Input | %isFollowing% |
| Operation | Equals |
| Value | false |
Then-Branch:
Sub-Action 6 (im Then von 5): Send Message + Break¶
| Feld | Wert |
|---|---|
| Message | @%user% — @%followUser% folgt dem Kanal nicht. |
Plus Core → Logic → Break.
Sub-Action 7: Send Message — Erfolg¶
| Feld | Wert |
|---|---|
| Message | 💜 @%followUser% folgt seit %followAgeShort%. |
| Send using bot account | aktiv |
Action-Tree¶
[Cmd] !followage
├── 1. Set Argument: targetLogin = $replace(%input0%, @, )$
├── 2. If/Else: %targetLogin% Is Null or Empty
│ └── 3. Set Argument: targetLogin = %userName%
├── 4. Get Follow Age Info for Target (Variable = targetLogin)
├── 5. If/Else: %isFollowing% Equals false
│ ├── 6a. Send Message: "@%user% — @%followUser% folgt dem Kanal nicht."
│ └── 6b. Break
└── 7. Send Message: "💜 @%followUser% folgt seit %followAgeShort%."
Command-Einstellungen¶
| Feld | Wert |
|---|---|
| Name | !followage |
| Group | AzaCraft Standard |
| Commands | !followage!fa |
| Sources | Twitch Message |
| Global Cooldown | 0 |
| User Cooldown | 30 |
Verwendungsbeispiele¶
| Chat | Resultat |
|---|---|
!followage |
"💜 @MeinName folgt seit 2y, 4m, 10d." |
!followage @bob |
"💜 @Bob folgt seit 5d, 3h." |
!followage @nichtfolger |
"@%user% — @Nichtfolger folgt dem Kanal nicht." |
Long-Format Variante¶
Wenn du längere Schreibweise willst:
| Feld | Wert |
|---|---|
| Message | 💜 @%followUser% folgt seit %followAgeLong%. |
Output: "💜 @Bob folgt seit 5 days, 3 hours."
Import-Code¶
Streamer.bot Export-String
Hier kommt der Export-String rein sobald exportiert.
Quellen¶
- Get Follow Age Info for Target: https://docs.streamer.bot/api/sub-actions/twitch/followers/get-follow-age-info-for-target