Skip to content

Commit

Permalink
Update AdventCommand to use current date and limit day for year-end
Browse files Browse the repository at this point in the history
  • Loading branch information
Paranoia8972 committed Dec 2, 2024
1 parent 973f57a commit 8578f89
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions internal/pkg/commands/advent.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@ package commands
import (
"log"
"strconv"
"time"

"github.com/Paranoia8972/PixelBot/internal/pkg/utils"
"github.com/bwmarrin/discordgo"
)

func AdventCommand(s *discordgo.Session, i *discordgo.InteractionCreate) {
// currentDay := time.Now().Day()
currentDay := 7
currentDay := time.Now().Day()
currentMonth := time.Now().Month()
currentYear := time.Now().Year()

if currentYear > 2024 || (currentYear == 2024 && currentMonth == time.December && currentDay > 24) {
currentDay = 24
}
userID := i.Member.User.ID

adventClick, err := utils.GetAdventClick(userID)
Expand Down

0 comments on commit 8578f89

Please sign in to comment.