<%- include("./partials/header.ejs") %>
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex, nofollow">
<%
function checkDays(date) {
    let now = new Date()
    let diff = now.getTime() - date.getTime()
    let days = Math.floor(diff / 86400000)
    return days + (days === 1 ? " day" : " days")
}
function generateBadge(verified = false) {
    if (flags.length < 1) return
    if (!verified && user.bot) return `<img draggable="false" class="botbadge" alt="Bot badge" src="${flags.find(i => i.name === "Bot").url}">`
    if (verified && flags.find(i => i.name === "Verified Bot")) return `<img draggable="false" class="botbadge-v" alt="Bot certified badge" src="${flags.find(i => i.name === "Verified Bot").url}">`
    return `<img draggable="false" class="rounded botbadge" src="${flags.find(i => i.name === "Bot").url}">`
}
function UrlInviteThisBot() {
    return `<a class="btn btn_blurple" href="https://discord.com/oauth2/authorize?client_id=${user.id}&scope=applications.commands%20bot&permissions=0">Add this bot to your server</a>`
}
%>
<title>Whois on Discord ‚Äî <%= user.username %></title>
<link rel="canonical" href="https://whois.mrrobot.app/<%= user.id %>"/>
<meta name="description"
      content="üßê „ÉªUsername <%= user.username %>
          #Ô∏è‚É£ „ÉªDiscriminator #<%= user.discriminator %>
          ü§ñ „ÉªThis is a bot ? <%= user.bot ? "Yes " : "No" %><%= user.verified ? " and verified. ‚úî" : "" %>
          üìÜ „Éª Created at <%= moment(user.createdAt).format('dddd LL LT') %>
          ‚è≤Ô∏è „ÉªNumber of days <%= checkDays(user.createdAt) %>"/>
<meta name="image" content="<%= user.displayAvatarURL({ dynamic: true, format: "png", size: 1024 }) %>"/>
<meta property="og:site_name" content="ID : <%= user.id %> ‚Äî Information card"/>
<meta name="twitter:title" content="Information about <%= user.username %>"/>
<meta name="twitter:description"
      content="üßê „ÉªUsername <%= user.username %>
         #Ô∏è‚É£ „ÉªDiscriminator #<%= user.discriminator %>
          ü§ñ „Éª This is a bot ? <%= user.bot ? "Yes " : "No" %><%= user.verified ? " and verified. ‚úî" : "" %>
          üìÜ „Éª Created at <%= moment(user.createdAt).format('dddd LL LT') %>
          ‚è≤Ô∏è „ÉªNumber of days <%= checkDays(user.createdAt) %>"/>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:image" content="<%= user.displayAvatarURL({ dynamic: true, format: "png", size: 1024 }) %>"/>
<meta name="twitter:url" content="https://whois.mrrobot.app/<%= user.id %>">

<style>
    .space_x {
        margin-top: 1vh;
    }

    @media (max-width: 900px) {
        h1 {
            font-size: 2.5rem;
        }
    }
</style>
</head>
<%- include("./partials/loader.ejs") %>
<%- include("./partials/footer.ejs") %>
<body>
<div id="ConnectionState" class="hidden">
    You are offline.
</div>
<div class="ctner space_x">
    <div class="row">
        <div class="bg_ctner_main">
            <div class="row user_main_inf">
                <div class="col">
                    <a href="<%= user.displayAvatarURL({ dynamic: true, format: "png", size: 1024 }) %>" target="_blank"
                       rel="noopener">
                        <img src="<%= user.displayAvatarURL({ dynamic: true, format: "png", size: 128 }) %>"
                             draggable="false"
                             class="rounded avatar" alt="avatar">
                    </a>
                </div>
                <div class="col">
                    <a href="https://discord.com/users/<%= user.id %>">
                        <h1 class="username"><%= user.username.substr(0, 32) %>
                            <% if (user.discriminator !== "0") { %>                              
                               <small class="discriminator">#<%= user.discriminator %>
                                <%- user.bot ? (user.bot && user.verified) ? generateBadge(true) : generateBadge() : "" %></small>
                            <% } %>
                        </h1>
                    </a>
                </div>
            </div>
            <div class="inf_box">
                <h3>üîß „Éª ID <span class="inf_colored"><%= user.id %></span></h3>
                <h3>üßê „Éª Username <span class="inf_colored"><%= user.username %></span></h3>
                <% if (user.discriminator !== "0") { %>
                    <h3>#Ô∏è‚É£ „Éª Discriminator <span class="inf_colored">#<%= user.discriminator %></span></h3>
                <% } %>
                <h3>ü§ñ „Éª This is a bot ? <span
                            class="inf_colored"><%= user.bot ? "Yes " : "No" %><%= user.verified ? " and verified. ‚úî" : "" %></span>
                </h3>
                <h3>üìÜ „Éª Created at <span class="inf_colored"
                                          title="Local time"><%= moment(user.createdAt).format('dddd LL LT') %></span>
                </h3>
                <h3>‚è≤Ô∏è „Éª Number of days <span class="inf_colored"><%= checkDays(user.createdAt) %></span></h3>
                <div class="ive_got_badges">
                    <%
                    flags.forEach(badge => {
                    if (badge.name === "Bot" || badge.name === "Verified Bot") return
                    else {
                    %>
                        <div class="white_circle">
                            <img class="badges" draggable="false" src="<%= badge.url %>"
                                 title="<%= badge.name %>"
                                 alt="<%= badge.name %> Badge">
                        </div>
                    <% }}) %>
                </div>
                <div class="btn__groups">
                    <a class="btn btn_blurple" href="https://discord.com/users/<%= user.id %>">See profile on Discord</a>
                    <%- user.bot ? UrlInviteThisBot() : "" %>
                </div>

                <div class="home_link">
                    <a href="/">‚Üê Return to the home page</a>
                    <span class="home_link_dots">„Éª</span>
                    <a href="https://mrrobot.app/privacy"> Privacy policy</a>
                    <span class="home_link_dots">„Éª</span>
                    <a href="https://thomasbnt.dev/donate">Donate</a>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
