Advertisement
Guest User

Untitled

a guest
Jul 26th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Racket 1.69 KB | None | 0 0
  1.     (irc-send-message! conn
  2.                        recipient
  3.                        (if (not (hash-has-key? current-weather 'name))                                                                
  4.                          "Location not found."
  5.                          (string-append (hash-ref current-weather 'name)                                                              
  6.                                         ", "
  7.                                         (hash-ref (hash-ref current-weather 'sys) 'country)                                            
  8.                                         " | "
  9.                                         "Temperature: "
  10.                                         (number->string (exact-round (hash-ref (hash-ref current-weather 'main) 'temp)))              
  11.                                         "C ("
  12.                                         (number->string (exact-round (hash-ref (hash-ref current-weather 'main) 'temp_min)))          
  13.                                         "C - "
  14.                                         (number->string (exact-round (hash-ref (hash-ref current-weather 'main) 'temp_max)))          
  15.                                         "C) Humidity: "
  16.                                         (number->string (hash-ref (hash-ref current-weather 'main) 'humidity))                        
  17.                                         "% Wind: "
  18.                                         (number->string (hash-ref (hash-ref current-weather 'wind) 'speed))                            
  19.                                         "m/s Conditions: "
  20.                                         (hash-ref (car (hash-ref current-weather 'weather)) 'description))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement