diff --git a/bashbot.sh b/bashbot.sh index a64ec77..ff20a79 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -37,7 +37,7 @@ declare -A USER MESSAGE URLS CONTACT LOCATION send_message() { local chat="$1" local text="$(echo "$2" | sed 's/ mykeyboardstartshere.*//g;s/ myfilelocationstartshere.*//g;s/ mylatstartshere.*//g;s/ mylongstartshere.*//g')" - [ "$3" = "text" ] && { + [ "$3" != "text" ] && { local keyboard="$(echo "$2" | sed '/mykeyboardstartshere /!d;s/.*mykeyboardstartshere //g;s/ myfilelocationstartshere.*//g;s/ mylatstartshere.*//g;s/ mylongstartshere.*//g')" local file="$(echo "$2" | sed '/myfilelocationstartshere /!d;s/.*myfilelocationstartshere //g;s/ mykeyboardstartshere.*//g;s/ mylatstartshere.*//g;s/ mylongstartshere.*//g')"