allow annna to help with difficult life decisions - annna - Annna the nice friendly bot.
(HTM) git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
---
(DIR) commit 189d98b009ac7f3a5c1321f6c9c9f2a8bc6df53f
(DIR) parent 2fc543ac58a8584c49ad2f90366d0ce84366fb06
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Sun, 17 Oct 2021 21:12:40 +0200
allow annna to help with difficult life decisions
Signed-off-by: Annna Robert-Houdin <annna@bitreich.org>
Diffstat:
M annna-message-common | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/annna-message-common b/annna-message-common
@@ -814,6 +814,9 @@ case "${text}" in
} &
exit 0
;;
+"${botname}, please pick one of: ")
+ pick="$(printf '%s\n' "${text}" | sed 's/.*please pick one of://' | tr ',' '\n' | sort -R | head -n 1)"
+ annna-say -c "${channel}" "${user}, I think ${pick} is the best option."
"${botname}, please help.")
# Help Message.
# TODO: Add multiple line support to annna-say -c(1) with sleep.