add /send_new_year_to_chat
This commit is contained in:
@@ -95,7 +95,10 @@ func NewYearMessage(message new_year_service.NewYearMessage) string {
|
||||
ny := time.Date(2023, 1, 1, 0, 0, 0, 0, loc)
|
||||
now := time.Now().In(loc)
|
||||
days := ny.Sub(now).Hours() / 24
|
||||
return fmt.Sprintf("❄ %s ❄ \n\n%s\n\n%s", toStrDays(int(days)), message.Header, message.Text)
|
||||
if message.Header != "" {
|
||||
return fmt.Sprintf("❄ %s ❄ \n\n%s\n\n%s", toStrDays(int(days)), message.Header, message.Text)
|
||||
}
|
||||
return fmt.Sprintf("❄ %s ❄ \n\n%s", toStrDays(int(days)), message.Text)
|
||||
}
|
||||
|
||||
func toStrDays(days int) string {
|
||||
|
||||
Reference in New Issue
Block a user