fix typo in getusrname

This commit is contained in:
celso 2023-03-22 22:16:58 -03:00
parent f8935e75fc
commit e3eb2996f9
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ getusr_name(){
getusrname(){ getusrname(){
local username="$(tail -n 1 "${bot_tmpdir}${1}" | grep -om1\ local username="$(tail -n 1 "${bot_tmpdir}${1}" | grep -om1\
'"username":"\(\\"\|[^"]*\)*"\(,"language_code"\|},"chat"\)' | head -n1)" '"username":"\(\\"\|[^"]*\)*"\(,"language_code"\|},"chat"\)' | head -n1)"
grep "\"language_code\"$" <<< "${username}" >/dev/null && utf-16-surrogate-pair-decode "${user_name:12:-17}"\ grep "\"language_code\"$" <<< "${username}" >/dev/null && utf-16-surrogate-pair-decode "${username:12:-17}"\
|| { || {
grep "},\"chat\"$" <<< "${username}" >/dev/null && utf-16-surrogate-pair-decode "${username:12:-9}" grep "},\"chat\"$" <<< "${username}" >/dev/null && utf-16-surrogate-pair-decode "${username:12:-9}"
} }