topkecleon / telegram-bot-bash

Telegram bot written in bash
Other
431 stars 123 forks source link

fix split message arguments #189

Closed enamp closed 2 years ago

enamp commented 2 years ago

read into array

gnadelwartz commented 2 years ago

if I understand correctly you proposal is not only to read the initial command string but also the arguments?

generally this should work as $CMD should be the same as $CMD[0], I have to check if CMD is already declared as an array.

enamp commented 2 years ago

yes, as noted in comment, split message in command and args without a there is no need in read. it works just like CMD=$MESSAGE[0]