diff --git a/triggers/keywords/keywords.sh b/triggers/keywords/keywords.sh index 0e96a1b..8b69feb 100755 --- a/triggers/keywords/keywords.sh +++ b/triggers/keywords/keywords.sh @@ -21,6 +21,8 @@ fi done # Example of dealing with multi word triggers. -if [[ "${wordList//[[:space:]]/}" =~ nowplaying ]]; then -act "$chan" "cranks the volume up to 11!" +# Reset wordList without sorting it and with spaces removed. +wordList="$(echo "${@,,}" | tr -d '[:space:]')" +if [[ "$wordList" =~ .*nowplaying:.*-.* ]]; then +act "$chan" "$(shuf -n1 -e "cranks the volume up to 11" "got soooo high at that show" "boogies down the the sound of the band")!" fi