#!/bin/sh cd "$(dirname "$0")" cat builtin_emoji.txt <(mmcli listcustomemoji | jq -r '.name') > emoji.txt mmcli tail -n0 -f "$1" | jq --unbuffered -r '.id' | while read msg_id; do randomemoji="$(shuf -n1 emoji.txt)" echo "Adding $randomemoji to $msg_id" mmcli addreaction "$msg_id" "$randomemoji" done