mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-30 00:21:16 +00:00
[wiki] Remove deprecated concat
examples
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
aa420b4afd
commit
f562c2fec5
2 changed files with 6 additions and 19 deletions
|
@ -7,8 +7,8 @@
|
|||
- actions:
|
||||
- type: respond
|
||||
attributes:
|
||||
message: '{{ variable (concat ":" "genericcmd" .channel (group 1)) }}'
|
||||
disable_on_template: '{{ eq (variable (concat ":" "genericcmd" .channel (group 1))) "" }}'
|
||||
message: '{{ variable (list "genericcmd" .channel (group 1) | join ":") }}'
|
||||
disable_on_template: '{{ eq (variable (list "genericcmd" .channel (group 1) | joih ":")) "" }}'
|
||||
match_channels: ['#mychannel']
|
||||
match_message: '^!([^\s]+)(?: |$)'
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
- actions:
|
||||
- type: setvariable
|
||||
attributes:
|
||||
variable: '{{ concat ":" "genericcmd" .channel (group 1) }}'
|
||||
variable: '{{ list "genericcmd" .channel (group 1) | join ":" }}'
|
||||
set: '{{ group 2 }}'
|
||||
- type: respond
|
||||
attributes:
|
||||
|
@ -29,7 +29,7 @@
|
|||
- actions:
|
||||
- type: setvariable
|
||||
attributes:
|
||||
variable: '{{ concat ":" "genericcmd" .channel (group 1) }}'
|
||||
variable: '{{ list "genericcmd" .channel (group 1) | join ":" }}'
|
||||
clear: true
|
||||
- type: respond
|
||||
attributes:
|
||||
|
|
|
@ -69,19 +69,6 @@ Example:
|
|||
< 5
|
||||
```
|
||||
|
||||
#### `concat`
|
||||
|
||||
Join the given string parts with delimiter (⚠ this replaces the sprig `concat` function: sprig `concat` is not available!)
|
||||
|
||||
Syntax: `concat <delimiter> <...parts>`
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
# {{ concat ":" "test" .username }}
|
||||
< test:luziferus
|
||||
```
|
||||
|
||||
#### `counterValue`
|
||||
|
||||
Returns the current value of the counter which identifier was supplied
|
||||
|
@ -91,7 +78,7 @@ Syntax: `counterValue <counter name>`
|
|||
Example:
|
||||
|
||||
```
|
||||
# {{ counterValue (concat ":" .channel "test") }}
|
||||
# {{ counterValue (list .channel "test" | join ":") }}
|
||||
< 5
|
||||
```
|
||||
|
||||
|
@ -319,7 +306,7 @@ Syntax: `seededRandom <string-seed>`
|
|||
Example:
|
||||
|
||||
```
|
||||
# Your int this hour: {{ printf "%.0f" (multiply (seededRandom (concat ":" "int" .username (now "2006-01-02 15"))) 100) }}%
|
||||
# Your int this hour: {{ printf "%.0f" (multiply (seededRandom (list "int" .username (now "2006-01-02 15") | join ":")) 100) }}%
|
||||
< Your int this hour: 17%
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue