Fix: timer update [WIP]
This commit is contained in:
		| @@ -173,6 +173,7 @@ func (p *openRouterParser) MakePayload(prompt string) io.Reader { | ||||
| 	model := models[int(p.modelIndex)%len(models)] | ||||
| 	strPayload := fmt.Sprintf(`{ | ||||
| 	"model": "%s", | ||||
| 	"max_tokens": 300, | ||||
| 	"messages": [ | ||||
| 		{ | ||||
| 		"role": "user", | ||||
|   | ||||
| @@ -24,10 +24,10 @@ func (b *Bot) StartTurnTimer(timeLeft uint32) { | ||||
| 		if err := repos.RP.RoomUpdate(context.Background(), room); err != nil { | ||||
| 			logger.Error("failed to save room", "error", err) | ||||
| 		} | ||||
| 		broker.Notifier.Notifier <- broker.NotificationEvent{ | ||||
| 			EventName: models.NotifyTurnTimerPrefix + room.ID, | ||||
| 			Payload:   strconv.FormatUint(uint64(room.Settings.RoundTime), 10), | ||||
| 		} | ||||
| 		// broker.Notifier.Notifier <- broker.NotificationEvent{ | ||||
| 		// 	EventName: models.NotifyTurnTimerPrefix + room.ID, | ||||
| 		// 	Payload:   strconv.FormatUint(uint64(room.Settings.RoundTime), 10), | ||||
| 		// } | ||||
| 		// notifyBotIfNeeded(room) | ||||
| 		if botName := room.WhichBotToMove(); botName != "" { | ||||
| 			SignalChanMap[botName] <- true | ||||
| @@ -41,7 +41,7 @@ func (b *Bot) StartTurnTimer(timeLeft uint32) { | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	timer.StartTurnTimer(context.Background(), b.RoomID, timeLeft, onTurnEnd, onTick, logger) | ||||
| 	timer.StartTurnTimer(context.Background(), b.RoomID, int32(timeLeft), onTurnEnd, onTick, logger) | ||||
| } | ||||
|  | ||||
| func (b *Bot) StopTurnTimer() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder