fix: enable official bots to connect to external tournament server #71

Merged
Janis merged 2 commits from fix-bot-communication into main 2026-06-17 09:10:15 +02:00
Showing only changes of commit 35158bfeea - Show all commits
@@ -50,7 +50,12 @@ class TournamentBotGamePlayer:
log.infof("Tournament bot enabled — server=%s tournament=%s bot=%s", cfg.serverUrl, cfg.tournamentId, cfg.botId)
startAsync(cfg)
def joinTournament(tournamentId: String, botToken: String, difficulty: String, serverUrl: String): Either[String, String] =
def joinTournament(
tournamentId: String,
botToken: String,
difficulty: String,
serverUrl: String,
): Either[String, String] =
TournamentBotConfig.jwtSubject(botToken) match
case None => Left("Invalid bot token — could not extract subject")
case Some(botId) =>