<%- include("../../partials/header.ejs") %>
<script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "BreadcrumbList",
        "itemListElement": [
            {
                "@type": "ListItem",
                "position": 1,
                "name": "Home",
                "item": "<%= baseURL %><%= linkPrefix %>"
            },
            {
                "@type": "ListItem",
                "position": 2,
                "name": "Bots",
                "item": "<%= baseURL %><%= linkPrefix %>/bots"
            },
            {
                "@type": "ListItem",
                "position": 2,
                "name": "<%= bot.name %>",
                "item": "<%= baseURL %><%= linkPrefix %>/bots/<%= bot._id %>"
            }
        ]
    }
</script>
<%- include("../../partials/nav.ejs") %>
<%
    let defaultColour = "#BA2EFF";
    let foreground = "#ffffff";
    if (req.user) {
        defaultColour = req.user.db.preferences.defaultColour || "#BA2EFF";
        foreground = req.user.db.preferences.defaultForegroundColour || "#ffffff";
    }

    if (bot.theme && bot.theme.useCustomColour) {
        defaultColour = bot.theme.colour;
        foreground = functions.getForeground(bot.theme.colour);
    }
%>
<link href="/css/theme/<%= preferredTheme %>/listing.css?v=<%= cssVersion %>" media="screen, print" rel="stylesheet" />
<style>.message{background-color:#f5f5f5;border-radius:4px;font-size:1rem}.message strong{color:currentColor}.message a:not(.button):not(.tag):not(.dropdown-item){color:currentColor;text-decoration:underline}.message.is-small{font-size:.75rem}.message.is-medium{font-size:1.25rem}.message.is-large{font-size:1.5rem}.message.is-default{background-color:<%= defaultColour %>}.message.is-default .message-header{background-color:<%= defaultColour %>;color:<%= foreground %>}.message.is-default .message-body{border-color:#fff;color:<%= defaultColour %>}</style>
<%- include("../../partials/isDefaultCSS/codeTag.ejs") %>
<section class="hero is-primary" <% if (bot.theme && bot.theme.banner) { %>style="background-image: url(<%= bot.theme.banner %>); background-size: cover; background-position: center"<% } %>>
    <div class="hero-body">
        <br>
        <div class="container">
            <div class="columns">
                <div class="column is-2">
                    <img class="image" <% if (showStatus) { %>title="<%= __(`page.bots.status.${botStatus}`) %>"<% } %> style="margin: auto; width: 128px; border-radius: 50%; <% if (showStatus) { %>animation: <%= botStatus %> 2s infinite !important;<% } %>" src="<%= bot.icon?.url || bot.avatar?.url || `${baseURL}/img/defaultavatar` %>.<%= imageFormat %>?size=512" alt="<%= __('common.img.avatar', bot.name) %>" onerror="this.onerror = null;this.src = '/img/defaultavatar.<%= imageFormat %>';console.log('<%= __("common.img.loadFail") %>');">
                </div>
            <div class="column is-10<% if (mobile) { %> has-text-centered<% } %>">
                    <h1 class="is-size-1">
                        <% if (!phone) { %><span id="botName"><%= bot.name %></span><% } %>
                        <% if (bot.status.premium) { %>
                            <span style="vertical-align: middle;" title="<%= __("common.rank.premium.bot") %>" class="icon is-medium is-size-3 iconalign">
                                <i aria-hidden="true" class="fas fa-star has-text-warning fa-1x"></i>
                            </span>
                        <% } %>

                        <% if (bot.status.siteBot) { %>
                            <span style="vertical-align: middle;" title="<%= __("common.rank.siteBot") %>" class="icon is-size-3 is-medium iconalign">
                                <i aria-hidden="true" class="fad fa-cogs has-text-grey-lighter fa-1x"></i>
                            </span>
                        <% } %>

                        <% if (!bot.status.approved && !bot.status.archived) { %>
                            <span style="vertical-align: middle;" title="<%= __("common.rank.unapproved") %>" class="icon is-medium is-size-3 iconalign">
                                <i aria-hidden="true" class="fad fa-exclamation-triangle has-text-danger fa-1x"></i>
                            </span>
                        <% } %>

                        <% if (bot.status.archived) { %>
                            <span style="vertical-align: middle;" title="<%= __("common.rank.archived") %>" class="icon is-medium is-size-3 iconalign">
                                <i aria-hidden="true" class="fad fa-archive has-text-warning fa-1x"></i>
                            </span>
                        <% } %>

                        <% if (bot.status.hidden || bot.status.modHidden) { %>
                            <span style="vertical-align: middle;" title="<%= __("common.rank.hidden") %>" class="icon is-medium is-size-3 iconalign">
                                <i aria-hidden="true" class="fad fa-eye-slash has-text-white fa-1x"></i>
                            </span>
                        <% } %>

                        <% if (phone) { %>
                            <% if (bot.status.premium || bot.status.siteBot || !bot.status.approved || bot.status.archived) { %><br /><% } %>
                            <span id="botName">
                                <%= bot.name %>
                            </span>
                        <% } %>
                    </h1>
                    <h2 class="subtitle"><%= bot.shortDesc %></h2>
                    <% if (htmlDir === "rtl") { %>
                        <div class="buttons page <% if (mobile) { %>is-centered<% } %>">
                            <a href="<%= linkPrefix %>/bots/<%= bot._id %>/upvote" rel="nofollow" class="button page <% if (req.user && bot.votes.positive.includes(req.user.id)) { %>is-success<% } else { %>is-dark<% } %>">
                                <span class="icon">
                                    <i aria-hidden="true" class="fas fa-arrow-alt-up"></i>
                                </span>
                            </a>
                            <% if (votes > 0) { %>
                                <span class="button page is-black is-hovered has-text-success" title="<%= __("common.votes") %>"><%= votes %></span>
                            <% } else if (votes === 0) { %>
                                <span class="button page is-black is-hovered has-text-grey-light" title="<%= __("common.votes") %>"><%= votes %></span>
                            <% } else if (votes < 0) { %>
                                <span class="button page is-black is-hovered has-text-danger" title="<%= __("common.votes") %>"><%= votes %></span>
                            <% } %>
                            <a href="<%= linkPrefix %>/bots/<%= bot._id %>/downvote" rel="nofollow" class="button page <% if (req.user && bot.votes.negative.includes(req.user.id)) { %>is-danger<% } else { %>is-dark<% } %>">
                                <span class="icon">
                                    <i aria-hidden="true" class="fas fa-arrow-alt-down"></i>
                                </span>
                            </a>
                        </div>
                    <% } else { %>
                        <div class="buttons <% if (mobile) { %>is-centered<% } %>">
                            <a href="<%= linkPrefix %>/bots/<%= bot._id %>/upvote" class="button <% if (req.user && bot.votes.positive.includes(req.user.id)) { %>is-success<% } else { %>is-dark<% } %>">
                                <span class="icon">
                                    <i aria-hidden="true" class="fas fa-arrow-alt-up"></i>
                                </span>
                            </a>
                            <% if (votes > 0) { %>
                                <span class="button is-black is-hovered has-text-success" title="<%= __("common.votes") %>"><%= votes %></span>
                            <% } else if (votes === 0) { %>
                                <span class="button is-black is-hovered has-text-grey-light" title="<%= __("common.votes") %>"><%= votes %></span>
                            <% } else if (votes < 0) { %>
                                <span class="button is-black is-hovered has-text-danger" title="<%= __("common.votes") %>"><%= votes %></span>
                            <% } %>
                            <a href="<%= linkPrefix %>/bots/<%= bot._id %>/downvote" class="button <% if (req.user && bot.votes.negative.includes(req.user.id)) { %>is-danger<% } else { %>is-dark<% } %>">
                                <span class="icon">
                                    <i aria-hidden="true" class="fas fa-arrow-alt-down"></i>
                                </span>
                            </a>
                        </div>
                    <% } %>
                    <% if (req.user) { %>
                    <div class="buttons <% if (mobile) { %>is-centered<% } else { %>page<% } %>">
                        <% if (bot.owner.id === req.user.id) { %>
                            <% if (bot.status.approved !== false) { %>
                                <%-
                                    include("../../partials/button.ejs", {
                                        className: "button is-link",
                                        icon: "fas fa-link",
                                        tag: "a",
                                        message: __("page.bots.setVanity"),
                                        href: "",
                                        additional: "id=\"setVanity\""
                                    });
                                %>
                            <% } %>
                        <% } %>
                        <% if (bot.owner.id === req.user.id || bot.editors?.includes(req.user.id)) { %>
                            <%-
                                include("../../partials/button.ejs", {
                                    className: "button is-success",
                                    icon: "fas fa-sync-alt",
                                    tag: "a",
                                    message: __("common.sync"),
                                    href: `${linkPrefix}/bots/${bot._id}/sync`,
                                    additional: ""
                                });
                            %>
                            <%-
                                include("../../partials/button.ejs", {
                                    className: "button is-warning",
                                    icon: "fas fa-pencil",
                                    tag: "a",
                                    message: __("common.edit"),
                                    href: `${linkPrefix}/bots/${bot._id}/edit`,
                                    additional: ""
                                });
                            %>
                        <% } %>
                        <% if (bot.owner.id === req.user.id) { %>
                            <div style="padding-right: .5em;" class="dropdown is-hoverable">
                                <div class="dropdown-trigger">
                                    <%-
                                        include("../../partials/button.ejs", {
                                            className: "button is-orange",
                                            icon: "fas fa-key",
                                            tag: "dropdownButton",
                                            message: __("page.bots.manageToken"),
                                            href: "",
                                            additional: "style=\"direction: ltr;\""
                                        });
                                    %>
                                </div>
                                <div class="dropdown-menu" id="dropdown-ui-actions" role="menu">
                                  <div class="dropdown-content">
                                    <a class="dropdown-item" onclick="copyToClipboard('<%= bot.token %>');">
                                        <span class="icon"><i aria-hidden="true" class="fas fa-copy"></i></span>
                                        <span><%= __("page.bots.copyToken") %></span>
                                    </a>
                                    <a class="dropdown-item" href="/bots/<%= bot._id %>/tokenreset">
                                        <span class="icon"><i aria-hidden="true" class="fas fa-redo-alt"></i></span>
                                        <span><%= __("page.bots.resetToken") %></span>
                                    </a>
                                  </div>
                                </div>
                            </div>
                            <% if (bot.status.hidden) { %>
                                <%-
                                    include("../../partials/button.ejs", {
                                        className: "button is-white",
                                        icon: "fas fa-eye",
                                        tag: "a",
                                        message: __("common.unhide"),
                                        href: `${linkPrefix}/bots/${bot._id}/unhide`,
                                        additional: 'style="background-color: #b5b5b5"'
                                    });
                                %>
                            <% } %>
                            <%-
                                include("../../partials/button.ejs", {
                                    className: "button is-danger",
                                    icon: "fas fa-trash",
                                    tag: "button",
                                    message: __("common.delete"),
                                    href: "",
                                    additional: 'id="deleteModal"'
                                });
                            %>
                        <% } %>
                        <% if (user.db.rank.mod) { %>
                            <div class="dropdown is-hoverable">
                                <div class="dropdown-trigger">
                                    <%-
                                        include("../../partials/button.ejs", {
                                            className: "button is-dark",
                                            icon: "fas fa-cogs",
                                            tag: "dropdownButton",
                                            message: __("common.staffManagement"),
                                            href: "",
                                            additional: "style=\"direction: ltr;\""
                                        });
                                    %>
                                </div>
                                <div class="dropdown-menu" id="dropdown-ui-actions" role="menu">
                                  <div class="dropdown-content">
                                    <div class="dropdown-item">
                                        <p class="has-text-danger"><%= __("common.staffManagement.warning") %></p>
                                    </div>
                                    <hr class="dropdown-divider">
                                    <a class="dropdown-item has-text-success" href="<%= linkPrefix %>/bots/<%= bot._id %>/sync">
                                        <span class="icon">
                                            <i aria-hidden="true" class="fas fa-sync-alt"></i>
                                        </span>
                                        <span><%= __("common.sync") %></span>
                                    </a>
                                    <% if (user.db.rank.assistant === true) { %>
                                        <% if (req.user.id !== bot.owner.id && !bot.status.archived) { %>
                                            <a class="dropdown-item has-text-link" id="setVanity">
                                                <span class="icon">
                                                    <i aria-hidden="true" class="fas fa-link"></i>
                                                </span>
                                                <span><%= __("page.bots.setVanity") %></span>
                                            </a>
                                        <% } %>
                                        <% if (bot.status.premium === false) { %>
                                            <a class="dropdown-item has-text-magenta" href="<%= linkPrefix %>/bots/<%= bot._id %>/give-premium">
                                                <span class="icon"><i aria-hidden="true" class="fas fa-heart"></i></span>
                                                <span><%= __("common.staff.givePremium") %></span>
                                            </a>
                                        <% } else { %>
                                            <a class="dropdown-item has-text-magenta" href="<%= linkPrefix %>/bots/<%= bot._id %>/take-premium">
                                                <span class="icon"><i aria-hidden="true" class="fas fa-heart-broken"></i></span>
                                                <span><%= __("common.staff.takePremium") %></span>
                                            </a>
                                        <% } %>
                                        <a class="dropdown-item has-text-warning" href="<%= linkPrefix %>/bots/<%= bot._id %>/edit">
                                            <span class="icon">
                                                <i aria-hidden="true" class="fas fa-pencil"></i>
                                            </span>
                                            <span><%= __("common.edit") %></span>
                                        </a>
                                    <% } %>
                                    <% if (!bot.status.modHidden) { %>
                                        <a class="dropdown-item has-text-grey-light" href="<%= linkPrefix %>/bots/<%= bot._id %>/modhide">
                                            <span class="icon">
                                                <i aria-hidden="true" class="fas fa-eye-slash"></i>
                                            </span>
                                            <span><%= __("common.hide") %></span>
                                        </a>
                                    <% } else { %>
                                        <a class="dropdown-item has-text-grey-light" href="<%= linkPrefix %>/bots/<%= bot._id %>/modunhide">
                                            <span class="icon">
                                                <i aria-hidden="true" class="fas fa-eye"></i>
                                            </span>
                                            <span><%= __("common.unhide") %></span>
                                        </a>
                                    <% } %>
                                    <% if (bot.status.approved === true && !bot.status.archived) { %>
                                        <a class="dropdown-item has-text-orange" href="<%= linkPrefix %>/bots/<%= bot._id %>/unapprove">
                                            <span class="icon"><i aria-hidden="true" class="fas fa-minus"></i></span>
                                            <span><%= __("common.staff.unapprove") %></span>
                                        </a>
                                        <a class="dropdown-item has-text-danger" href="<%= linkPrefix %>/bots/<%= bot._id %>/remove">
                                            <span class="icon"><i aria-hidden="true" class="fas fa-trash"></i></span>
                                            <span><%= __("common.staff.remove") %></span>
                                        </a>
                                    <% } else if (!bot.status.archived) { %>
                                        <a class="dropdown-item has-text-success" href="<%= linkPrefix %>/bots/<%= bot._id %>/approve">
                                            <span class="icon"><i aria-hidden="true" class="fas fa-check"></i></span>
                                            <span><%= __("common.staff.approve") %></span>
                                        </a>
                                        <a class="dropdown-item has-text-danger" href="<%= linkPrefix %>/bots/<%= bot._id %>/decline">
                                            <span class="icon"><i aria-hidden="true" class="fas fa-times"></i></span>
                                            <span><%= __("common.staff.decline") %></span>
                                        </a>
                                    <% } %>
                                    <hr class="dropdown-divider">
                                    <a class="dropdown-item has-text-success" target="_blank" href="https://discord.com/api/oauth2/authorize?client_id=<%= bot.clientID || bot._id %>&scope=<%= scopes %>&guild_id=<%= staffServer %>">
                                        <span class="icon"><i class="fas fa-vial"></i></span>
                                        <span><%= __("page.bots.invite.staff") %></span>
                                    </a>
                                    <% if (req.user.db.rank.assistant && (!bot.scopes || bot.scopes.bot)) { %>
                                        <a class="dropdown-item has-text-info" target="_blank" href="https://discord.com/api/oauth2/authorize?client_id=<%= bot.clientID || bot._id %>&scope=bot&guild_id=<%= mainServer %>">
                                            <span class="icon"><i class="fas fa-shield-alt"></i></span>
                                            <span><%= __("page.bots.invite.main") %></span>
                                        </a>
                                    <% } %>
                                    <a class="dropdown-item" onclick="copyToClipboard('<%= bot._id %>');">
                                        <span class="icon"><i aria-hidden="true" class="fas fa-copy"></i></span>
                                        <span><%= __("common.copyID") %></span>
                                    </a>
                                    <% if (bot.clientID && bot._id !== bot.clientID) { %>
                                        <a class="dropdown-item" onclick="copyToClipboard('<%= bot.clientID %>');">
                                            <span class="icon"><i aria-hidden="true" class="fas fa-copy"></i></span>
                                            <span><%= __("page.bots.copyClientID") %></span>
                                        </a>
                                    <% } %>
                                    <a class="dropdown-item" onclick="copyToClipboard('<%= bot.owner.id %>');">
                                        <span class="icon"><i aria-hidden="true" class="fas fa-copy"></i></span>
                                        <span><%= __("common.copyOwnerID") %></span>
                                    </a>
                                  </div>
                                </div>
                            </div>
                        <% } %>
                        </div>
                    <% } %>
                    <div class="buttons page <% if (mobile) { %>is-centered<% } %>">
                        <%-
                            include("../../partials/button.ejs", {
                                className: "button is-magenta",
                                icon: "fas fa-plus",
                                tag: "a",
                                message: __("common.invite.full"),
                                href: bot.links.invite,
                                additional: "target=\"_blank\" rel=\"noopener\""
                            });
                        %>
                        <% if (bot.links.website) { %>
                            <%-
                                include("../../partials/button.ejs", {
                                    className: "button is-link",
                                    icon: "fas fa-globe",
                                    tag: "a",
                                    message: __("common.website"),
                                    href: bot.links.website,
                                    additional: "target=\"_blank\" rel=\"noopener\""
                                });
                            %>
                        <% } %>
                        <% if (bot.social && bot.social.twitter) { %>
                            <%-
                                include("../../partials/button.ejs", {
                                    className: "button is-info",
                                    icon: "fab fa-twitter",
                                    tag: "a",
                                    message: `@${bot.social.twitter}`,
                                    href: `https://twitter.com/${bot.social.twitter}`,
                                    additional: "target=\"_blank\" rel=\"noopener\""
                                });
                            %>
                        <% } %>
                        <% if (bot.links.donation) { %>
                            <%-
                                include("../../partials/button.ejs", {
                                    className: "button is-success",
                                    icon: "fas fa-dollar-sign",
                                    tag: "a",
                                    message: __("common.donate"),
                                    href: bot.links.donation,
                                    additional: "target=\"_blank\" rel=\"noopener\""
                                });
                            %>
                        <% } %>
                        <% if (bot.links.privacyPolicy && privacyIsURL) { %>
                            <%-
                                include("../../partials/button.ejs", {
                                    className: "button is-warning",
                                    icon: "fas fa-user-secret",
                                    tag: "a",
                                    message: __("common.nav.more.privacy"),
                                    href: bot.links.privacyPolicy,
                                    additional: "target=\"_blank\" rel=\"noopener\""
                                });
                            %>
                        <% } %>
                        <% if (bot.links.repo) { %>
                            <%-
                                include("../../partials/button.ejs", {
                                    className: "button is-orange",
                                    icon: "fas fa-code",
                                    tag: "a",
                                    message: __("page.bots.git.view"),
                                    href: bot.links.repo,
                                    additional: "target=\"_blank\" rel=\"noopener\""
                                });
                            %>
                        <% } %>
                        <% if (bot.links.support) { %>
                            <%-
                                include("../../partials/button.ejs", {
                                    className: "button is-danger",
                                    icon: "fas fa-user-headset",
                                    tag: "a",
                                    message: __("page.bots.supportServer.view"),
                                    href: bot.links.support,
                                    additional: "target=\"_blank\" rel=\"noopener\""
                                });
                            %>
                        <% } %>
                    </div>
                    <div class="field is-grouped is-grouped-multiline <% if (mobile) { %>is-grouped-centered<% } %>">
                        <% if (bot.prefix) { %>
                            <%-
                                include("../../partials/tag.ejs", {
                                    contentColour: "is-link",
                                    title: __("page.bots.generalInfo.prefix.view"),
                                    content: bot.prefix,
                                    type: "multi"
                                });
                            %>
                        <% } %>
                        <%-
                            include("../../partials/tag.ejs", {
                                contentColour: "is-info",
                                title: __("page.bots.generalInfo.library.view"),
                                content: bot.library,
                                type: "multi"
                            });
                        %>
                        <% if (!bot.scopes || bot.scopes.bot) { %>
                            <%-
                                include("../../partials/tag.ejs", {
                                    contentColour: "is-success",
                                    title: __("common.servers"),
                                    content: bot.serverCount === 0 ? "???" : bot.serverCount.toLocaleString(locale),
                                    type: "multi"
                                });
                            %>
                            <% if (bot.shardCount !== 0) { %>
                                <%-
                                    include("../../partials/tag.ejs", {
                                        contentColour: "is-orange",
                                        title: __("page.bots.shards"),
                                        content: bot.shardCount.toLocaleString(locale),
                                        type: "multi"
                                    });
                                %>
                            <% } %>
                        <% } %>
                        <% if (bot.links.privacyPolicy && !privacyIsURL) { %>
                            <%-
                                include("../../partials/tag.ejs", {
                                    contentColour: "is-warning",
                                    title: __("common.nav.more.privacy"),
                                    content: bot.links.privacyPolicy,
                                    type: "multi"
                                });
                            %>
                        <% } %>
                        <%-
                            include("../../partials/tag.ejs", {
                                contentColour: "is-danger",
                                title: __("common.owner"),
                                content: "insOwner-bot",
                                type: "multi"
                            });
                        %>
                        <% if (bot.editors && editors) { %>
                            <%-
                                include("../../partials/tag.ejs", {
                                    contentColour: "is-magenta",
                                    title: __("common.editors"),
                                    content: "insEditor-bot",
                                    type: "multi"
                                });
                            %>
                        <% } %>
                    </div>
                    <% if (bot.tags && bot.tags.length > 0 || bot.scopes?.slashCommands) { %>
                        <div class="field is-grouped is-grouped-multiline <% if (mobile) { %>is-grouped-centered<% } %>">
                            <% if (bot.scopes?.slashCommands) { %>
                                <%-
                                    include("../../partials/tag.ejs", {
                                        tag: "slashcommands",
                                        icon: "slash fa-flip-horizontal",
                                        contentColour: "is-blurple",
                                        title: "",
                                        content: __("common.applicationCommands"),
                                        type: "botTag"
                                    });
                                %>
                            <% } %>
                            <% if (bot.tags.includes("Fun")) { %>
                                <%-
                                    include("../../partials/tag.ejs", {
                                        tag: "fun",
                                        icon: "grin-squint-tears",
                                        contentColour: "is-link",
                                        title: "",
                                        content: __("page.bots.tag.fun"),
                                        type: "botTag"
                                    });
                                %>
                            <% } %>
                            <% if (bot.tags.includes("Social")) { %>
                                <%-
                                    include("../../partials/tag.ejs", {
                                        tag: "social",
                                        icon: "comments-alt",
                                        contentColour: "is-info",
                                        title: "",
                                        content: __("page.bots.tag.social"),
                                        type: "botTag"
                                    });
                                %>
                            <% } %>
                            <% if (bot.tags.includes("Economy")) { %>
                                <%-
                                    include("../../partials/tag.ejs", {
                                        tag: "economy",
                                        icon: "comments-dollar",
                                        contentColour: "is-success",
                                        title: "",
                                        content: __("page.bots.tag.economy"),
                                        type: "botTag"
                                    });
                                %>
                            <% } %>
                            <% if (bot.tags.includes("Utility")) { %>
                                <%-
                                    include("../../partials/tag.ejs", {
                                        tag: "utility",
                                        icon: "cogs",
                                        contentColour: "is-orange",
                                        title: "",
                                        content: __("page.bots.tag.utility"),
                                        type: "botTag"
                                    });
                                %>
                            <% } %>
                            <% if (bot.tags.includes("Moderation")) { %>
                                <%-
                                    include("../../partials/tag.ejs", {
                                        tag: "moderation",
                                        icon: "gavel",
                                        contentColour: "is-danger",
                                        title: "",
                                        content: __("page.bots.tag.moderation"),
                                        type: "botTag"
                                    });
                                %>
                            <% } %>
                            <% if (bot.tags.includes("Multipurpose")) { %>
                                <%-
                                    include("../../partials/tag.ejs", {
                                        tag: "multipurpose",
                                        icon: "ball-pile",
                                        contentColour: "is-magenta",
                                        title: "",
                                        content: __("page.bots.tag.multipurpose"),
                                        type: "botTag"
                                    });
                                %>
                            <% } %>
                            <% if (bot.tags.includes("Music")) { %>
                                <%-
                                    include("../../partials/tag.ejs", {
                                        tag: "music",
                                        icon: "comment-music",
                                        contentColour: "is-pink",
                                        title: "",
                                        content: __("common.tags.music"),
                                        type: "botTag"
                                    });
                                %>
                            <% } %>
                        </div>
                    <% } %>
                </div>
            </div>
            <br />
            <% if (req.user) { %>
                <% if (req.user.db.rank.mod === true) { %>
                    <% if (bot.modNotes && bot.status.approved === false) { %>
                        <div class="container">
                            <article class="message is-default">
                                <div class="message-header">
                                    <p style="color: <%= foreground %>;"><%= __("page.bots.modNotes.view") %></p>
                                </div>
                                <div class="message-body" style="background-color: black; color <%= foreground %>;">
                                    <%= bot.modNotes %>
                                </div>
                            </article>
                        </div>
                        <br />
                    <% } %>
                <% } %>
            <% } %>
        </div>
    </div>
</section>
<div class="container" style="overflow: hidden;">
    <div id="content" class="section content"><%- longDesc %></div>
</div>
<% if (bot.commands?.length > 0) { %>
    <div class="container commands">
        <div class="section" style="padding-top: 1rem">
            <h1 class="title"><%= __("common.slashCommands") %></h1>
            <ul>
                <% bot.commands?.filter(c => c.type === 1).sort((a, b) => a.name.localeCompare(b.name)).map(c => { %>
                    <li class="command-<%= c.id %> command-<%= c.name %>">
                        <%- include("../../partials/command.ejs", {c}) %>
                    </li>
                <% }) %>
            </ul>
        </div>
    </div>
<% } %>
<div class="modal deleteModal">
    <div class="modal-background"></div>
    <div class="modal-card">
        <header class="modal-card-head">
            <p class="modal-card-title has-text-danger"><%= __("common.warning") %></p>
        </header>
        <section class="modal-card-body has-text-danger">
            <%= __("page.bots.warning.delete") %>
        </section>
        <footer class="modal-card-foot">
            <div class="buttons">
                <a class="button is-danger" href="<%= linkPrefix %>/bots/<%= bot._id %>/delete">
                    <span class="icon">
                        <i aria-hidden="true" class="fas fa-trash"></i>
                    </span>
                    <span><%= __("common.delete") %></span>
                </a>
                <a class="button is-warning" <% if (!bot.status.archived) { %>href="<%= linkPrefix %>/bots/<%= bot._id %>/archive"<% } else { %>disabled<% } %>>
                    <span class="icon">
                        <i aria-hidden="true" class="fas fa-archive"></i>
                    </span>
                    <span><%= __("common.archive") %></span>
                </a>
                <a class="button is-white" style="background-color: #b5b5b5" <% if (!bot.status.hidden && !bot.status.modHidden) { %>href="<%= linkPrefix %>/bots/<%= bot._id %>/hide"<% } else { %>disabled<% } %>>
                    <span class="icon">
                        <i aria-hidden="true" class="fas fa-eye-slash"></i>
                    </span>
                    <span><%= __("common.hide") %></span>
                </a>
                <button class="button is-dark" id="close-modal">
                    <span class="icon">
                        <i aria-hidden="true" class="fas fa-times-circle"></i>
                    </span>
                    <span><%= __("common.cancel") %></span>
                </button>
            </div>
        </footer>
    </div>
    <script>document.querySelector("#deleteModal").addEventListener("click",function(event){event.preventDefault();const modal=document.querySelector(".deleteModal");const html=document.querySelector("html");modal.classList.add("is-active");html.classList.add("is-clipped");modal.querySelector(".modal-background").addEventListener("click",function(e){e.preventDefault();modal.classList.remove("is-active");html.classList.remove("is-clipped")});document.querySelector("button#close-modal").addEventListener("click",function(e){e.preventDefault();modal.classList.remove("is-active");html.classList.remove("is-clipped")})})</script>
</div>
<div class="modal setVanity">
    <div class="modal-background" id="vanityModalBg"></div>
    <div class="modal-card">
        <header class="modal-card-head">
            <p class="modal-card-title has-text-danger"><%= __("page.bots.setVanity") %></p>
        </header>
        <form action="<%= linkPrefix %>/bots/<%= bot._id %>/setvanity" method="POST">
            <section class="modal-card-body has-text-danger">
                <%= __("page.bots.setVanity.warning") %>
                <div>
                    <br />
                    <div class="field">
                        <p class="control has-icons-left has-icons-right">
                            <input class="input is-rounded" type="text" name="vanity" placeholder="<%= __("page.bots.setVanity.placeholder", bot.name.toLowerCase().replace(/ .*/,'').replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g, '')) %>" required>
                            <span class="icon is-small is-left">
                                <i aria-hidden="true" class="fas fa-link"></i>
                            </span>
                        </p>
                    </div>
                </div>
            </section>
            <footer class="modal-card-foot">
                <div class="buttons">
                    <button class="button is-success">
                        <span class="icon">
                            <i aria-hidden="true" class="fas fa-check-circle"></i>
                        </span>
                        <span><%= __("common.set") %></span>
                    </button>
                    <button class="button is-danger" id="close-modal2">
                        <span class="icon">
                            <i aria-hidden="true" class="fas fa-times-circle"></i>
                        </span>
                        <span><%= __("common.cancel") %></span>
                    </button>
                </div>
            </footer>
        </form>
    </div>
    <script>document.querySelector("a#setVanity").addEventListener("click",function(event){event.preventDefault();const modal=document.querySelector(".setVanity");const html=document.querySelector("html");modal.classList.add("is-active");html.classList.add("is-clipped");modal.querySelector(".modal-background").addEventListener("click",function(e){e.preventDefault();modal.classList.remove("is-active");html.classList.remove("is-clipped")});document.querySelector("button#close-modal2").addEventListener("click",function(e){e.preventDefault();modal.classList.remove("is-active");html.classList.remove("is-clipped")})})</script>
</div>

<% if (req.user && bot.owner.id === req.user.id || req.user && req.user.db.rank.mod === true) { %>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css" integrity="sha384-OHBBOqpYHNsIqQy8hL1U+8OXf9hH6QRxi0+EODezv82DfnZoV7qoHAZDwMwEJvSw" crossorigin="anonymous">
    <script src="/js/bulma-toast.min.js" async></script>
    <%- include("../../partials/isDefaultCSS/notification.ejs") %>
    <script>function copyToClipboard(t){const hideWB=document.createElement("style");hideWB.innerHTML="widgetbot-crate {display: none;}";document.body.appendChild(hideWB);const e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style={position:"absolute",left:"-9999px"},document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),bulmaToast.toast({message:"Copied to clipboard",type:"is-default",position:"bottom-right",duration:2e3,opacity:.75,animate:{in:"fadeInRight",out:"fadeOutRight"}});setTimeout(()=>{hideWB.innerHTML="widgetbot-crate {display: block;}"},3000)}
            const dropdowns=document.querySelectorAll(".dropdown:not(.is-hoverable)");function closeDropdowns(){dropdowns.forEach(function(o){o.classList.remove("is-active")})}dropdowns.length>0&&(dropdowns.forEach(function(o){o.addEventListener("click",function(n){n.stopPropagation(),o.classList.toggle("is-active")})}),document.addEventListener("click",function(o){closeDropdowns()})),document.addEventListener("keydown",function(o){let n=o||window.event;"Esc"!==n.key&&"Escape"!==n.key||closeDropdowns()});</script>
<% } %>
<% if (bot.widgetbot && bot.widgetbot.server !== "" && bot.widgetbot.channel !== "") { %>
    <% if (bot.widgetbot.options !== "") { %>
        <script src="https://cdn.jsdelivr.net/npm/@widgetbot/crate@3" async defer>const additionalOptions = JSON.parse(<%- JSON.stringify(bot.widgetbot.options) %>);const crate = new Crate({server:"<%= bot.widgetbot.server %>",channel:"<%= bot.widgetbot.channel %>",...additionalOptions});</script>
    <% } else { %>
        <script src="https://cdn.jsdelivr.net/npm/@widgetbot/crate@3" async defer>const crate = new Crate({server:"<%= bot.widgetbot.server %>",channel:"<%= bot.widgetbot.channel %>"});</script>
    <% } %>
<% } %>
<%- include("../../partials/footer.ejs") %>
