.where("startDeckBuffer is not null and currentDeckBuffer is not null and roomMode != 2 and exists (select id from duel_log_player where duel_log_player.duelLogId = duelLog.id and duel_log_player.realName = :realName)",{realName})
.orderBy("duelLog.id","DESC")
.limit(10)
.leftJoinAndSelect("duelLog.players","player")
.getMany();
returnduelLogs;
}
catch(e){
this.log.warn(`Failed to fetch duel logs: ${e.toString()}`);
.where("startDeckBuffer is not null and currentDeckBuffer is not null and roomMode != 2 and exists (select id from duel_log_player where duel_log_player.duelLogId = duelLog.id and duel_log_player.realName = :realName)",{realName})
.orderBy("duelLog.id","DESC")
.limit(10)
.leftJoinAndSelect("duelLog.players","player")
.getMany();
returnduelLogs;
}catch(e){
this.log.warn(`Failed to fetch duel logs: ${e.toString()}`);
constplayerString=viewPlayers[0].realName.split("$")[0]+(viewPlayers[2]?"+"+viewPlayers[2].realName.split("$")[0]:"")+" VS "+(viewPlayers[1]?viewPlayers[1].realName.split("$")[0]:"AI")+(viewPlayers[3]?"+"+viewPlayers[3].realName.split("$")[0]:"");
constplayerString=viewPlayers[0].realName.split("$")[0]+(viewPlayers[2]?"+"+viewPlayers[2].realName.split("$")[0]:"")+" VS "+(viewPlayers[1]?viewPlayers[1].realName.split("$")[0]:"AI")+(viewPlayers[3]?"+"+viewPlayers[3].realName.split("$")[0]:"");