Fixed Notification time

This commit is contained in:
nefrace 2023-02-14 11:28:46 +03:00
parent e1c7b56049
commit de4200c150
1 changed files with 11 additions and 10 deletions

View File

@ -27,16 +27,17 @@ func userJoined(b *bot, update *echotron.Update) error {
message := update.Message message := update.Message
store := tongo.NewStore[db.User](Client) store := tongo.NewStore[db.User](Client)
user := db.User{ user := db.User{
Item: tongo.NewID(), Item: tongo.NewID(),
UserId: message.From.ID, UserId: message.From.ID,
Username: message.From.Username, Username: message.From.Username,
FirstName: message.From.FirstName, FirstName: message.From.FirstName,
LastName: message.From.LastName, LastName: message.From.LastName,
IsBanned: false, IsBanned: false,
ChatId: message.Chat.ID, ChatId: message.Chat.ID,
JoinedMessage: message.ID, JoinedMessage: message.ID,
CorrectAnswer: int8(captcha.CorrectAnswer), CorrectAnswer: int8(captcha.CorrectAnswer),
DateJoined: time.Now(), DateJoined: time.Now(),
LastNotification: time.Now(),
} }
// user.CorrectAnswer = int8(captcha.CorrectAnswer) // user.CorrectAnswer = int8(captcha.CorrectAnswer)
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)