2024-11-22 23:38:50 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
2024-11-23 01:09:25 +01:00
|
|
|
cat \
|
|
|
|
<(jq -r 'map(.aliases[0]) | .[]' < builtin_emoji.json | grep -v '_skin_tone') \
|
|
|
|
<(mmcli listcustomemoji | jq -r '.name') \
|
|
|
|
> emoji.txt
|
2024-11-22 23:38:50 +01:00
|
|
|
|
|
|
|
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
|