Initial commit

This commit is contained in:
Midgard 2024-11-22 23:38:50 +01:00
commit bff8b3bd1e
Signed by: midgard
GPG key ID: 511C112F1331BBB4
4 changed files with 19 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
builtin_emoji.txt
emoji.txt

13
bot.sh Executable file
View file

@ -0,0 +1,13 @@
#!/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

1
builtin_emoji.json Normal file

File diff suppressed because one or more lines are too long

3
filter_builtin_emoji.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
jq -r 'map(.aliases[0]) | .[]' < builtin_emoji.json | grep -v '_skin_tone' > builtin_emoji.txt