Temperature Command

Anybody know of a temperature command/API? Not the $weather variable. Just the temperature. Thanks.

@thelarkshark

Do you mean a command to allow you to look up the local temperature for any location?

mmhmm. yup. correct.

This uses $(weather) but the output is trimmed to show only temperature:

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

Do you have one that uses a preset location? aka Fort Lauderdale?

!addcom -cd=5 !temperature $(eval d=decodeURIComponent(`$(querystring)`);a=d==``?`$(weather Fort Lauderdale)`:`$(weather $(query))`;e=d==``?`Fort Lauderdale`: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(` `))
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.