mirror of
https://github.com/cjdenio/jia.git
synced 2024-11-21 23:23:39 +00:00
Events command changes
This commit is contained in:
parent
52c652e4e3
commit
4b7e653eee
1 changed files with 3 additions and 1 deletions
|
@ -235,12 +235,14 @@ func HandleEventsSlashCommand(w http.ResponseWriter, r *http.Request) {
|
|||
emoji = ":second_place_medal:"
|
||||
} else if i == 2 {
|
||||
emoji = ":third_place_medal:"
|
||||
} else {
|
||||
emoji = fmt.Sprintf("%d:", i+1)
|
||||
}
|
||||
|
||||
blocks = append(blocks, slack.NewSectionBlock(slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("%s <@%s> has counted *%d* so far", emoji, v.User, v.Number), false, false), nil, nil))
|
||||
}
|
||||
|
||||
blocks = append(blocks, slack.NewContextBlock("", slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("Event will end at *<!date^%d^{time} on {date}|some date>*, your time", events[0].EndTime.Unix()), false, false)))
|
||||
blocks = append(blocks, slack.NewContextBlock("", slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("Event ends at *<!date^%d^{time} on {date}|some date>*, your time", events[0].EndTime.Unix()), false, false)))
|
||||
} else {
|
||||
blocks = append(blocks, slack.NewSectionBlock(slack.NewTextBlockObject("mrkdwn", "Something went wrong fetching the events leaderboard :cry:", false, false), nil, nil))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue