# Luzifer / twitch-bot-tools This repository contains a collection of tools to be executed through the [twitch-bot](https://github.com/Luzifer/twitch-bot) [`script` actor](https://luzifer.github.io/twitch-bot/configuration/actors/#execute-script--command). ## automod-debug Pretty-print issues Twitch AutoMod had with the message ```yaml - 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 ```yaml - 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}) ```