-`msg` - The message object, used in functions, should not be sent to chat
-`permitTimeout` - Value of `permit_timeout` in seconds
-`username` - The username of the message author
Additionally there are some functions available in the templates:
-`arg <idx>` - Takes the message sent to the channel, splits by space and returns the Nth element
-`counterValue <counter name>` - Returns the current value of the counter which identifier was supplied
-`fixUsername <username>` - Ensures the username no longer contains the `@` prefix
-`group <idx>` - Gets matching group specified by index from `match_message` regular expression
-`recentGame <username> [fallback]` - Returns the last played game name of the specified user (see shoutout example) or the `fallback` if the game could not be fetched. If no fallback was supplied the message will fail and not be sent.
-`tag <tagname>` - Takes the message sent to the channel, returns the value of the tag specified
## Rule examples
### Game death counter with dynamic name
```yaml
- actions:
- counter: '{{ recentGame "mychannel" }}'
- respond: 'I already died {{ counterValue (recentGame "mychannel") }} times in {{ recentGame "mychannel" }}'
cooldown: 60s
enable_on: [broadcaster, moderator]
match_channels: ['#mychannel']
match_message: '^!death'
```
### Link-protection while allowing Twitch clips
```yaml
- actions:
- timeout: 1s
- respond: '@{{ .username }}, please ask for permission before posting links.'