I have this:
!editcom !turno $(eval var r ='$(urlfetch https://twitch.center/customapi/quote?token=TOKENHERE&data=$(touser))';
if(r.charAt(0)=='0'){
r='';}
if(r== 'There are no quotes added'){
r='';}
if(r){
'$(touser) ya está en el listado';}
else{
'$(urlfetch https://twitch.center/customapi/addquote?token=TOKEN2HERE&data=$(touser))';}
)
The first part search for the user in a list
It returns 3 cases
-There are no quotes added (empty list)
-number.user (find user)
-0.last user (don't find user)
When r is my user and i'm in a quote ( r=1.manito ) nightbot display "manito ya está en el listado" and enter and execute de else sentence too (adding me in a new quote)
How could i fix it? Thanks