Add annna say feature. - annna - Annna the nice friendly bot.
HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
---
DIR commit 06b1eb38a83f9b558c7c30818cc3587e2443fd24
DIR parent f39af3442312b974fcf7552b9d24224ef2011d59
HTML Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Sat, 13 Mar 2021 11:41:49 +0100
Add annna say feature.
Diffstat:
M annna-message-common | 7 +++++++
1 file changed, 7 insertions(+), 0 deletions(-)
---
DIR diff --git a/annna-message-common b/annna-message-common
@@ -3,6 +3,8 @@
# If this gets too unmaintainable, consider adding some directory structure.
#
+export PATH="/br/bin:$PATH"
+
modbase="/home/annna/bin/modules/"
hashtagfile="${modbase}/hashtags/hashtags.txt"
printnhashtags=2
@@ -290,6 +292,11 @@ case "${text}" in
annna-say -c "${channel}" "${puri}"
;;
+"${botname}, please say "*)
+ word="$(printf "%s\n" "${text}" | cut -c 19- | sed 's,\t, ,g')"
+ suri="$(printf "%s\n" "${word}" | bitreich-speak)"
+ annna-say -c "${channel}" "${suri}"
+ ;;
"${botname}, wolfram is "*)
word="$(printf "%s\n" "${text}" | cut -c 19- | sed 's,\t, ,g')"
case "$word" in