Collection of tools to be executed through the twitch-bot script actor
Find a file
Knut Ahlers d5e3cdf7c3
Use common go module
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2023-09-01 19:04:52 +02:00
automod-debug Use common go module 2023-09-01 19:04:52 +02:00
dice Use common go module 2023-09-01 19:04:52 +02:00
go.mod Use common go module 2023-09-01 19:04:52 +02:00
go.sum Use common go module 2023-09-01 19:04:52 +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})