File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,16 @@ func nextmeetup(ID int64, client mongo.Client) {
137137 var data meetupdata
138138 err := collection .FindOne (context .TODO (), bson.M {}).Decode (& data )
139139 if err != nil {
140- log .Fatal (err )
140+ log .Print (err )
141+ bot .Send (tbot .NewMessage (ID , "No meetup scheduled." ))
142+ } else {
143+ //the string inside Format method is a sample string to specify the display
144+ //format of meetupTimeString
145+ timeString := data .Date .Local ().Format ("Mon _2 Jan 2006" )
146+ nxtMeetupData := "Details of next OSDC Meetup :" + "\n " + "Title -" + "\t " +
147+ data .Name + "\n " + "Date -" + "\t " + timeString + "\n " + "Time -" + "\t " +
148+ data .Date .Local ().Format ("15:04" ) + "\n " + "Venue -" + "\t " + data .Venue
149+ bot .Send (tbot .NewMessage (ID , nxtMeetupData ))
141150 }
142151 location , err := time .LoadLocation ("Asia/Kolkata" )
143152 if err != nil {
You can’t perform that action at this time.
0 commit comments