package Ġorg . dev mp v . tele bot . bot . commands Ċ Ċ import Ġmu . Kotlin Logging Ċ import Ġorg . dev mp v . tele bot . config . properties . Open Weather Properties Ċ import Ġorg . dev mp v . tele bot . service . Weather Service Ċ import Ġorg . dev mp v . tele bot . utils . message . Weather Current Builder Ċ import Ġorg . springframework . stereotype . Component Ċ import Ġorg . telegram . telegram bots . extensions . bots . command bot . commands . Bot Command Ċ import Ġorg . telegram . telegram bots . meta . api . objects . Chat Ċ import Ġorg . telegram . telegram bots . meta . api . objects . User Ċ import Ġorg . telegram . telegram bots . meta . bots . Abs Sender Ċ import Ġorg . telegram . telegram bots . meta . exceptions . Telegram ApiException Ċ Ċ @ Component Ċ class ĠWeather Command ( ĊĠĠĠ Ġprivate Ġval Ġweather Service : ĠWeather Service , ĊĠĠĠ Ġprivate Ġval Ġweather Properties : ĠOpen Weather Properties Ċ ) Ġ: ĠBot Command ( Commands . WE ATHER . identifier , ĠCommands . WE ATHER . description ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġlogger Ġ= ĠKotlin Logging . logger Ġ{} ĊĊĠĠĠ Ġoverride Ġfun Ġexecute ( abs Sender : ĠAbs Sender , Ġuser : ĠUser ?, Ġchat : ĠChat , Ġstrings : ĠArray < out ĠString > ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġweather Report Ġ= Ġweather Service . get Cached Current Weather ( weather Properties . default Location ) ĊĠĠĠĠĠĠĠ Ġtry Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġabs Sender . execute ( Weather Current Builder . to Message ( chat . id , Ġweather Report )) ĊĠĠĠĠĠĠĠ Ġ} Ġcatch Ġ( e : ĠTelegram ApiException ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlogger . error ( e ) Ġ{ Ġ" Something Ġter rible Ġhappened Ġwhen Ġattempt Ġto Ġsend Ġmessage " Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ