mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-20 20:01:17 +00:00
[docs] Add "VIP of the Month" example rule (thanks to @Breitling1992)
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
d92824a892
commit
f79152159a
1 changed files with 36 additions and 0 deletions
|
@ -157,3 +157,39 @@ title: "Rule Examples"
|
||||||
match_message: '^!so ([@\w]+)'
|
match_message: '^!so ([@\w]+)'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## VIP of the Month
|
||||||
|
|
||||||
|
In this example a channel-point reward for one month of VIP status exists which is automated through the bot. To get the `.reward_id` you can use the [Debug-Overlay]({{< ref "../overlays/_index.md" >}}) or just use the `.reward_title` variable and check against the name of the reward.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- description: 'Channel-Point-Reward: VIP of the month'
|
||||||
|
actions:
|
||||||
|
- type: vip
|
||||||
|
attributes:
|
||||||
|
channel: '{{ .channel }}'
|
||||||
|
user: '{{ .user }}'
|
||||||
|
- type: customevent
|
||||||
|
attributes:
|
||||||
|
fields: |-
|
||||||
|
{{
|
||||||
|
toJson (
|
||||||
|
dict
|
||||||
|
"targetChannel" .channel
|
||||||
|
"targetUser" .user
|
||||||
|
"type" "timed_unvip"
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
schedule_in: 744h
|
||||||
|
match_event: channelpoint_redeem
|
||||||
|
disable_on_template: '{{ ne .reward_id "aaa66d18-8dab-46f4-a222-6ff228f2fdfb" }}'
|
||||||
|
disable_on: [moderator, vip]
|
||||||
|
|
||||||
|
- description: 'Channel-Point-Reward: Remove VIP of the month'
|
||||||
|
actions:
|
||||||
|
- type: unvip
|
||||||
|
attributes:
|
||||||
|
channel: '{{ .targetChannel }}'
|
||||||
|
user: '{{ .targetUser }}'
|
||||||
|
match_event: custom
|
||||||
|
disable_on_template: '{{ ne .type "timed_unvip" }}'
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in a new issue