Feat: nullable roomid

This commit is contained in:
Grail Finder
2025-07-03 12:29:39 +03:00
parent 2a593739ae
commit d8338fe382
6 changed files with 25 additions and 14 deletions

View File

@ -2,8 +2,8 @@ package handlers
import (
"context"
"fmt"
"gralias/models"
"strconv"
"sync"
"time"
)
@ -46,7 +46,7 @@ func StartTurnTimer(roomID string, duration time.Duration) {
if err := repo.RoomUpdate(context.Background(), room); err != nil {
log.Error("failed to save room", "error", err)
}
notify(models.NotifyTurnTimerPrefix+room.ID, fmt.Sprintf("%d", room.Settings.TurnSecondsLeft))
notify(models.NotifyTurnTimerPrefix+room.ID, strconv.FormatUint(uint64(room.Settings.TurnSecondsLeft), 10))
notifyBotIfNeeded(room)
StopTurnTimer(roomID)
return