This commit is contained in:
Владимир Фёдоров 2023-02-10 15:51:04 +07:00
parent 9415ce4c37
commit 9a1a99985c
4 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ const (
Ping = Command("/ping") Ping = Command("/ping")
TodayLessons = Command("/today_lessons") TodayLessons = Command("/today_lessons")
TomorrowLessons = Command("/tomorrow_lessons") TomorrowLessons = Command("/tomorrow_lessons")
AllLessons = Command("/all_lessons") AllLessons = Command("/all_lessons")
Weather = Command("/weather") Weather = Command("/weather")
NewYear = Command("/new_year") NewYear = Command("/new_year")
) )

View File

@ -190,7 +190,7 @@ func run() {
sendTomorrowLessonsToChat(bot, chatID, "Завтра, "+update.Message.From.FirstName+", эти пары:") sendTomorrowLessonsToChat(bot, chatID, "Завтра, "+update.Message.From.FirstName+", эти пары:")
case commands.AllLessons: case commands.AllLessons:
sendAllLessonsToChat(bot, chatID, "Пока знаю про эти пары:") sendAllLessonsToChat(bot, chatID, "Пока знаю про эти пары:")
case commands.Weather: case commands.Weather:
w, err := weather.GetWeatherWithCache(opts.Key, 53.346853, 83.777012, time.Hour) w, err := weather.GetWeatherWithCache(opts.Key, 53.346853, 83.777012, time.Hour)

View File

@ -8,6 +8,6 @@ import (
) )
func main() { func main() {
lessons := parser.ParseByDay(date.Today(-48*time.Hour)) lessons := parser.ParseByDay(date.Today(-48 * time.Hour))
fmt.Println(lessons) fmt.Println(lessons)
} }

View File

@ -32,7 +32,7 @@ func parse() []Lesson {
l := Lesson{ l := Lesson{
Number: "", Number: "",
TimeStart: event.Start, TimeStart: event.Start,
TimeMsg: event.Start.Format("15:04") + " - " + event.End.Format("15:04"), TimeMsg: event.Start.Format("15:04") + " - " + event.End.Format("15:04"),
Name: event.Summary, Name: event.Summary,
User: event.Description, User: event.Description,
Place: event.Location, Place: event.Location,