<html prefix="og: http://ogp.me/ns#">
<head>
    <% include ./partials/header.ejs %>
    <% include ./partials/nav.ejs %>

    <link rel="icon" type="image/jpg" href="https://media.discordapp.net/attachments/506425178822279168/507496898823847936/dbr.png">
    <title>Discord Bot Reviews</title>
</head>
<body>
    <noscript>
            <div class="alert alert-danger" role="alert">
                This website requires Javascript to work. Please enable Javascript or use a browser that supports Javascript.
            </div>
<!-- Placeholder content -->
  </noscript>
  <br><br>
    <div class="container">
        <h1 align="center" style="color:#97cafd;">Discord Bot Reviews</h1>
      <center><img src="<%=bot.guilds.get("500658335217876997").iconURL + "?size=2048"%>" style="border-radius: 50%;width:10rem;height:10rem;"></center>
      <br><h2 align="center" style="color:grey;">Find the best bot for your Discord server</h2>
<br><br><br><br><h2 style="color:white; font-size:25px;"><a href="/browse" style="text-decoration:none;color:#97cafd;">Featured Bots </a> <p style="font-size:15px;">These bots are randomly selected and may be interesting to you</p></h2>
       <% var count = 0; bots = bots.filter(r=> !bot.hidden.has(r.cli_id)).map(r=> r); while(bots[count]) { %>
	 <% if (bot.guilds.get("500658335217876997").members.get(bots[count].cli_id) && bot.guilds.get("500658335217876997").members.get(bots[count].cli_id).roles.has("511069587840827402")) { var veryunique2 = true; } else { var veryunique2 = false; }%>
        <div class="card<%if(veryunique2){%> veryunique<%}%>" style="vertical-align:middle;margin-top:1rem !important;width: 18rem;display:inline-block;margin-right:2rem;margin-bottom:2rem;height:550px;<% if (bot.certified.get(bots[count].submitter) && bot.certified.get(bots[count].submitter, "bots").includes(bots[count].cli_id)) { var veryunique = true; %> background-color: #ffb726 <% } else { var veryunique = false; %> background-color: #171616; <% } %>">
          <img class="card-img-top img-fluid avatarImg" style="margin-left:2.5rem;margin-top:1rem;max-width:100%;height:auto;min-width:13rem;min-height:13rem">
          <div class="card-body" style="color:white">
            <h5 class="card-title" style="color:<%if(veryunique){%>black<%}else{%>white<%}%>;display:inline-block"></h5> <span id="<%=bot.users.get(bots[count].cli_id).presence.status.toLowerCase()%>" style="color:black;display:inline-block;"></span> <span style="color:<%if(veryunique) {%>black<%} else {%>white<%}%>;">(<%if(bot.guilds.get("500658335217876997").members.get(bots[count].cli_id) && bot.calculated.has(bots[count].cli_id) && bot.calculated.get(bots[count].cli_id, "uptime") !== 0) {%><%=Math.round(Number(bot.uptimes.get(bots[count].cli_id, "uptime")) / Number(bot.calculated.get(bots[count].cli_id, "calculated")) * 100)%>%<%} else {%>???<%}%>)</span><% const asscrack = bot.guilds.get("500658335217876997").members.get(bots[count].cli_id);  if(asscrack) {if(asscrack.roles.has("507628704751419393")) {%> <img src="https://cdn.discordapp.com/emojis/507958292790902795.png" width="25px" height="25px"> <% } else if (asscrack.roles.has("511069587840827402")) {%> <img class="rounded" src="https://cdn.discordapp.com/emojis/508965618855444491.png" width="25px" height="25px"> <% }} %>
            <br>            <span style="color:chartreuse"><% if (bot.reactions.get(bots[count].cli_id) && bot.reactions.get(bots[count].cli_id, "likes")) { %> <i class="fa fa-thumbs-up"></i> <%= bot.reactions.get(bots[count].cli_id) && bot.reactions.get(bots[count].cli_id, "likes").length %> <% } else { %> <i class="fa fa-thumbs-up"></i> 0 <% } %></span>&nbsp;&nbsp;<span style="color:red"><% if (bot.reactions.get(bots[count].cli_id) && bot.reactions.get(bots[count].cli_id, "dislikes")) { %> <i class="fa fa-thumbs-down"></i> <%= bot.reactions.get(bots[count].cli_id) && bot.reactions.get(bots[count].cli_id, "dislikes").length %> <% } else { %> <i class="fa fa-thumbs-down"></i> 0 <% } %></span> <span style="color:<%if(veryunique) {%>black<%} else {%>white<%}%>;">(<%=Number(Number(bot.reactions.get(bots[count].cli_id, "likes").length) + Number(bot.reactions.get(bots[count].cli_id, "dislikes").length)) >0 ? Math.round(Number(bot.reactions.get(bots[count].cli_id, "likes").length / Number(bot.reactions.get(bots[count].cli_id, "likes").length + bot.reactions.get(bots[count].cli_id, "dislikes").length) * 100)) + "%" : "---"%>)</span><br><br>
            <% if(bot.stats.has(bots[count].cli_id)) { %>
              Servers: <code><%=numberWithCommas(bot.stats.get(bots[count].cli_id, "server_count"))%></code> <br>
              <% }  %>
            <p class="card-text"><%= bots[count].short_description %></p>

            <a href="/bot/<%= bots[count].cli_id %>" class="btn btn-primary">Go to page</a>
          </div>
        </div>
        <script>
            var avatarImg = document.getElementsByClassName("avatarImg")[<%= count %>]
            var userinfo = JSON.parse(httpGet("/api/uservalidate?id=<%= bots[count].cli_id %>"))
            avatarImg.setAttribute("src", userinfo.avatar_url)
            var title = document.getElementsByClassName("card-title")[<%= count %>]
            title.innerHTML = userinfo.tag
          </script>
      <%  count++; } %><br><br>
      <h2 style="color:white; font-size:25px;"><a href="/browse/top" style="text-decoration:none;color:#97cafd;">Top Voted Bots </a> <p style="font-size:15px;">Discover bots that people like the most</p></h2>
       <% var count = 0; bots = bots.filter(r=> !bot.hidden.has(r.cli_id)).map(r=> r); while(toplikedbots[count]) { %>
	 <% if (bot.guilds.get("500658335217876997").members.get(toplikedbots[count].cli_id) && bot.guilds.get("500658335217876997").members.get(toplikedbots[count].cli_id).roles.has("511069587840827402")) { var veryunique2 = true; } else { var veryunique2 = false; }%>
        <div class="card<%if(veryunique2){%> veryunique<%}%>" style="vertical-align:middle;margin-top:1rem !important;width: 18rem;display:inline-block;margin-right:2rem;margin-bottom:2rem;height:550px;<% if (bot.certified.get(toplikedbots[count].submitter) && bot.certified.get(toplikedbots[count].submitter, "bots").includes(toplikedbots[count].cli_id)) { var veryunique = true; %> background-color: #ffb726 <% } else { var veryunique = false; %> background-color: #171616; <% } %>">

        <img class="card-img-top img-fluid avatarImg" style="margin-left:2.5rem;margin-top:1rem;max-width:100%;height:auto;min-width:13rem;min-height:13rem"><h2 id="position<%=count === 2 ? "3" : count === 1 ? "2" : 1%>" style="float:right;"><%=count === 2 ? "3" : count === 1 ? "2" : 1%></h2>
          <div class="card-body" style="color:white">
    
            <h5 class="card-title" style="color:<%if(veryunique){%>black<%}else{%>white<%}%>;display:inline-block"></h5> <span id="<%=bot.users.get(toplikedbots[count].cli_id).presence.status.toLowerCase()%>" style="color:black;display:inline-block;"></span> <span style="color:<%if(veryunique) {%>black<%} else {%>white<%}%>;">(<%if(bot.guilds.get("500658335217876997").members.get(toplikedbots[count].cli_id) && bot.calculated.has(toplikedbots[count].cli_id) && bot.calculated.get(toplikedbots[count].cli_id, "uptime") !== 0) {%><%=Math.round(Number(bot.uptimes.get(toplikedbots[count].cli_id, "uptime")) / Number(bot.calculated.get(toplikedbots[count].cli_id, "calculated")) * 100)%>%<%} else {%>???<%}%>)</span><% const asscrack = bot.guilds.get("500658335217876997").members.get(toplikedbots[count].cli_id);  if(asscrack) {if(asscrack.roles.has("507628704751419393")) {%> <img src="https://cdn.discordapp.com/emojis/507958292790902795.png" width="25px" height="25px"> <% } else if (asscrack.roles.has("511069587840827402")) {%> <img class="rounded" src="https://cdn.discordapp.com/emojis/508965618855444491.png" width="25px" height="25px"> <% }} %>
            <br>            <span style="color:chartreuse"><% if (bot.reactions.get(toplikedbots[count].cli_id) && bot.reactions.get(toplikedbots[count].cli_id, "likes")) { %> <i class="fa fa-thumbs-up"></i> <%= bot.reactions.get(toplikedbots[count].cli_id) && bot.reactions.get(toplikedbots[count].cli_id, "likes").length %> <% } else { %> <i class="fa fa-thumbs-up"></i> 0 <% } %></span>&nbsp;&nbsp;<span style="color:red"><% if (bot.reactions.get(toplikedbots[count].cli_id) && bot.reactions.get(toplikedbots[count].cli_id, "dislikes")) { %> <i class="fa fa-thumbs-down"></i> <%= bot.reactions.get(toplikedbots[count].cli_id) && bot.reactions.get(toplikedbots[count].cli_id, "dislikes").length %> <% } else { %> <i class="fa fa-thumbs-down"></i> 0 <% } %></span>  <span style="color:<%if(veryunique) {%>black<%} else {%>white<%}%>;">(<%=Number(Number(bot.reactions.get(toplikedbots[count].cli_id, "likes").length) + Number(bot.reactions.get(toplikedbots[count].cli_id, "dislikes").length)) >0 ? Math.round(Number(bot.reactions.get(toplikedbots[count].cli_id, "likes").length / Number(bot.reactions.get(toplikedbots[count].cli_id, "likes").length + bot.reactions.get(toplikedbots[count].cli_id, "dislikes").length) * 100)) + "%" : "---"%>)</span><br><br>
            <% if(bot.stats.has(toplikedbots[count].cli_id)) { %>
              Servers: <code><%=numberWithCommas(bot.stats.get(toplikedbots[count].cli_id, "server_count"))%></code> <br>
              <% }  %>
            <p class="card-text"><%= toplikedbots[count].short_description %></p>
            <a href="/bot/<%= toplikedbots[count].cli_id %>" class="btn btn-primary">Go to page</a>
        
          </div>
        </div>

        <script>

    
  
            var avatarImg = document.getElementsByClassName("avatarImg")[<%= count %> + 3]
            var userinfo = JSON.parse(httpGet("/api/uservalidate?id=<%= toplikedbots[count].cli_id %>"))
            avatarImg.setAttribute("src", userinfo.avatar_url)
            var title = document.getElementsByClassName("card-title")[<%= count %> + 3]
            title.innerHTML = userinfo.tag
          </script>
      <%  count++; } %><br><br>
      <h2 style="color:white; font-size:25px;"><a href="/browse/unique" style="text-decoration:none;color:#97cafd;">Unique Bots</a>  <p style="font-size:15px;">Discover bots with usefull unique features that you rarely see on discord</p></h2>
       <% var count = 0; bots = bots.filter(r=> !bot.hidden.has(r.cli_id)).map(r=> r); while(certbots[count]) { %>
	 <% if (bot.guilds.get("500658335217876997").members.get(certbots[count].cli_id) && bot.guilds.get("500658335217876997").members.get(certbots[count].cli_id).roles.has("511069587840827402")) { var veryunique2 = true; } else { var veryunique2 = false; }%>
        <div class="card<%if(veryunique2){%> veryunique<%}%>" style="vertical-align:middle;margin-top:1rem !important;width: 18rem;display:inline-block;margin-right:2rem;margin-bottom:2rem;height:550px;<% if (bot.certified.get(certbots[count].submitter) && bot.certified.get(certbots[count].submitter, "bots").includes(certbots[count].cli_id)) { var veryunique = true; %> background-color: #ffb726 <% } else { var veryunique = false; %> background-color: #171616; <% } %>">
          <img class="card-img-top img-fluid avatarImg" style="margin-left:2.5rem;margin-top:1rem;max-width:100%;height:auto;min-width:13rem;min-height:13rem">
          <div class="card-body" style="color:white">
            <h5 class="card-title" style="color:<%if(veryunique){%>black<%}else{%>white<%}%>;display:inline-block"></h5> <span id="<%=bot.users.get(certbots[count].cli_id).presence.status.toLowerCase()%>" style="color:black;display:inline-block;"></span> <span style="color:<%if(veryunique) {%>black<%} else {%>white<%}%>;">(<%if(bot.guilds.get("500658335217876997").members.get(certbots[count].cli_id) && bot.calculated.has(certbots[count].cli_id) && bot.calculated.get(certbots[count].cli_id, "uptime") !== 0) {%><%=Math.round(Number(bot.uptimes.get(certbots[count].cli_id, "uptime")) / Number(bot.calculated.get(certbots[count].cli_id, "calculated")) * 100)%>%<%} else {%>???<%}%>)</span><% const asscrack = bot.guilds.get("500658335217876997").members.get(certbots[count].cli_id);  if(asscrack) {if(asscrack.roles.has("507628704751419393")) {%> <img src="https://cdn.discordapp.com/emojis/507958292790902795.png" width="25px" height="25px"> <% } else if (asscrack.roles.has("511069587840827402")) {%> <img class="rounded" src="https://cdn.discordapp.com/emojis/508965618855444491.png" width="25px" height="25px"> <% }} %>
            <br>            <span style="color:chartreuse"><% if (bot.reactions.get(certbots[count].cli_id) && bot.reactions.get(certbots[count].cli_id, "likes")) { %> <i class="fa fa-thumbs-up"></i> <%= bot.reactions.get(certbots[count].cli_id) && bot.reactions.get(certbots[count].cli_id, "likes").length %> <% } else { %> <i class="fa fa-thumbs-up"></i> 0 <% } %></span>&nbsp;&nbsp;<span style="color:red"><% if (bot.reactions.get(certbots[count].cli_id) && bot.reactions.get(certbots[count].cli_id, "dislikes")) { %> <i class="fa fa-thumbs-down"></i> <%= bot.reactions.get(certbots[count].cli_id) && bot.reactions.get(certbots[count].cli_id, "dislikes").length %> <% } else { %> <i class="fa fa-thumbs-down"></i> 0 <% } %></span> <span style="color:<%if(veryunique) {%>black<%} else {%>white<%}%>;">(<%=Number(Number(bot.reactions.get(certbots[count].cli_id, "likes").length) + Number(bot.reactions.get(certbots[count].cli_id, "dislikes").length)) >0 ? Math.round(Number(bot.reactions.get(certbots[count].cli_id, "likes").length / Number(bot.reactions.get(certbots[count].cli_id, "likes").length + bot.reactions.get(certbots[count].cli_id, "dislikes").length) * 100)) + "%" : "---"%>)</span><br><br>
            <% if(bot.stats.has(certbots[count].cli_id)) { %>
              Servers: <code><%=numberWithCommas(bot.stats.get(certbots[count].cli_id, "server_count"))%></code> <br>
              <% }  %>
            <p class="card-text"><%= certbots[count].short_description %></p>

            <a href="/bot/<%= certbots[count].cli_id %>" class="btn btn-primary">Go to page</a>
          </div>
        </div>
        <script>
            var avatarImg = document.getElementsByClassName("avatarImg")[<%= count %> + 6]
            var userinfo = JSON.parse(httpGet("/api/uservalidate?id=<%= certbots[count].cli_id %>"))
            avatarImg.setAttribute("src", userinfo.avatar_url)
            var title = document.getElementsByClassName("card-title")[<%= count %> + 6]
            title.innerHTML = userinfo.tag
          </script>
      <%  count++; } %>
        <br><br><br>


</div>
</body>
</html>

