Weather just humidity and temp

is there a way to make the $(weather) only output the temperature and humidity parts? im using a command from another topic that had shortened it to just the temperature but dont quite understand how they did it.

!addcom -cd=5 !temp $(eval d=decodeURIComponent($(querystring));a=d==?`$(weather LOCATION)`:`$(weather $(query))`;e=d==?LOCATION:d;b=a.split(.)[0].split( );c=[];for(i=0;i<b.length;i++){if(/\d/.test(b[i])){c.push(b[i]);}}The temperature in +e+is+c.join( ))

!addcom -cd=5 !temp $(eval d=decodeURIComponent(`$(querystring)`);a=d==``?`$(weather LOCATION)`:`$(weather $(query))`;e=d==``?`LOCATION`:d;b=a.split(`.`)[0].split(` `);c=[];for(i=0;i<b.length;i++){if(/\d/.test(b[i])){c.push(b[i]);}}`The temperature in `+e+` is `+c.join(` `))

Hey @nobodystentacle!

Here’s the topic you’re referring to, in case people in the future want to read it:

Their command can’t easily be made into what you want tho’.

So here’s what I’m suggesting instead:

$(eval a='$(weather $(query))'; o=a.match(/weather(\s\S+){2}/i); o.length=1; o.push(a.match(/temperature(\s\S+){3}/i)[0].replace('.', ' and')); o.push(a.match(/humidity(\s\S+){2}/i)[0]); o.join(' ');)

thank you, but it still says the location in the output, which i didnt want :frowning: sorry im looking for something so specific

You should have specified, because the command you showed as example included the location.
You simply need to remove the first match:

$(eval a='$(weather $(query))'; `${a.match(/temperature(\s\S+){3}/i)[0].replace('.', ' and')} ${a.match(/humidity(\s\S+){2}/i)[0]}`)
1 Like

thank you so much for the help