mirror of
https://github.com/Xevion/banner.git
synced 2025-12-08 16:06:31 -06:00
Fix ICS command formatting
This commit is contained in:
@@ -298,7 +298,7 @@ func IcsCommandHandler(s *discordgo.Session, i *discordgo.InteractionCreate) err
|
||||
endDay := meeting.EndDay()
|
||||
until := time.Date(endDay.Year(), endDay.Month(), endDay.Day(), 23, 59, 59, 0, CentralTimeLocation)
|
||||
|
||||
summary := fmt.Sprintf("%s (CRN %s)", course.CourseTitle, meeting.CourseReferenceNumber)
|
||||
summary := fmt.Sprintf("%s %s %s", course.Subject, course.CourseNumber, course.CourseTitle)
|
||||
description := fmt.Sprintf("Instructor: %s\nSection: %s\nCRN: %s", course.Faculty[0].DisplayName, course.SequenceNumber, meeting.CourseReferenceNumber)
|
||||
location := meeting.PlaceString()
|
||||
|
||||
|
||||
8
types.go
8
types.go
@@ -117,11 +117,13 @@ func (m *MeetingTimeResponse) TimeString() string {
|
||||
|
||||
// PlaceString returns a formatted string best representing the place of the meeting time
|
||||
func (m *MeetingTimeResponse) PlaceString() string {
|
||||
if m.MeetingTime.Room == "" {
|
||||
return "???"
|
||||
mt := m.MeetingTime
|
||||
|
||||
if mt.Room == "" {
|
||||
return "Online"
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s %s", m.MeetingTime.Building, m.MeetingTime.Room)
|
||||
return fmt.Sprintf("%s | %s | %s %s", mt.CampusDescription, mt.BuildingDescription, mt.Building, mt.Room)
|
||||
}
|
||||
|
||||
func (m *MeetingTimeResponse) Days() map[time.Weekday]bool {
|
||||
|
||||
Reference in New Issue
Block a user