maubot_reactbot/samples/random-reaction.yaml

26 lines
572 B
YAML
Raw Normal View History

2021-06-16 19:24:52 +00:00
templates:
random_reaction:
type: m.reaction
variables:
react_to_event: '{{event.event_id}}'
reaction: '{{ variables.reaction_choices | random }}'
content:
m.relates_to:
rel_type: m.annotation
event_id: $${react_to_event}
key: $${reaction}
default_flags:
- ignorecase
rules:
random:
matches:
- hmm
template: random_reaction
variables:
reaction_choices:
- 🤔
- 🧐
- 🤨