Collection of tools to be executed through the twitch-bot script actor
Find a file
Knut Ahlers 1eb949520c
Remove unused cli flag
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2023-09-01 18:51:49 +02:00
automod-debug Import automod-debug and dice 2023-09-01 18:45:25 +02:00
dice Remove unused cli flag 2023-09-01 18:51:49 +02:00
go.mod Import automod-debug and dice 2023-09-01 18:45:25 +02:00
README.md Import automod-debug and dice 2023-09-01 18:45:25 +02:00

Luzifer / twitch-bot-tools

This repository contains a collection of tools to be executed through the twitch-bot script actor.

automod-debug

Pretty-print issues Twitch AutoMod had with the message

- description: AutoMod Debug
  actions:
    - type: script
      attributes:
        command:
            - /data/scripts/automod-debug/automod-debug
  match_message: '!autodebug (.+)'

dice

Throw N M-sided dices and print the result into the chat

- description: 'Mini-Game: Flip a Coin'
  actions:
    - type: script
      attributes:
        command:
          - /data/scripts/dice/dice
          - -b
          - --sides=2
          - --count=1
          - --template
          - '{{ mention .user }} {{ "Deine Münze ist gefallen: Du hast {{ range .results }} {{ if eq . 1 }}Kopf{{ else }}Zahl{{ end }}{{ end }}" }}'
  match_message: ^!(?:coin|m(?:ue|ü)nze)$

- description: 'Mini-Game: Throw a Dice'
  actions:
    - type: script
      attributes:
        command:
          - /data/scripts/dice/dice
          - -b
          - --sides=6
          - --count=1
          - --template
          - '{{ mention .user }} {{ "Deine Würfel sind gefallen: {{ .count }}w{{ .sides }} ergab{{ if gt .count 1 }}en{{ end }}:{{ range $i, $v := .results }}{{ if gt $i 0 }},{{ end }} {{ $v }}{{ end }} {{ if gt .count 1 }}(Summe {{ .sum }}){{ end }}" }}'
  match_message: ^!(?:dice|w(?:ue|ü)rfel)$

- description: 'Mini-Game: Throw a specific Dice'
  actions:
    - type: script
      attributes:
        command:
          - /data/scripts/dice/dice
          - -b
          - --sides={{ group 2 }}
          - --count={{ if eq (group 1) "" }}1{{else}}{{ group 1 }}{{end}}
          - --template
          - '{{ mention .user }} {{ "Deine Würfel sind gefallen: {{ .count }}w{{ .sides }} ergab{{ if gt .count 1 }}en{{ end }}:{{ range $i, $v := .results }}{{ if gt $i 0 }},{{ end }} {{ $v }}{{ end }} {{ if gt .count 1 }}(Summe {{ .sum }}){{ end }}" }}'
  match_message: ^!(?:dice|w(?:ue|ü)rfel) ([1-9]|)w([0-9]{1,3})