Initial commit
This commit is contained in:
commit
bff8b3bd1e
4 changed files with 19 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
builtin_emoji.txt
|
||||
emoji.txt
|
13
bot.sh
Executable file
13
bot.sh
Executable 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
1
builtin_emoji.json
Normal file
File diff suppressed because one or more lines are too long
3
filter_builtin_emoji.sh
Executable file
3
filter_builtin_emoji.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
jq -r 'map(.aliases[0]) | .[]' < builtin_emoji.json | grep -v '_skin_tone' > builtin_emoji.txt
|
Loading…
Reference in a new issue