mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-21 23:25:08 +00:00
fix split message arguments
read into array
This commit is contained in:
parent
89ac61afe7
commit
90d3d7551d
@ -291,7 +291,7 @@ process_message() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# split message in command and args
|
# split message in command and args
|
||||||
[[ "${MESSAGE[0]}" == "/"* ]] && read -r CMD <<<"${MESSAGE[0]}" && CMD[0]="${CMD[0]%%@*}"
|
[[ "${MESSAGE[0]}" == "/"* ]] && read -ra CMD <<<"${MESSAGE[0]}" && CMD[0]="${CMD[0]%%@*}"
|
||||||
# everything went well
|
# everything went well
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user