Added bots & votes

This commit is contained in:
CorwinDev committed 2022-08-08 21:32:55 +02:00
1 parent c058ab2e55
commit 47dfdbd344
16 files changed
+798 -457

No files matched your search

+5 -2
View File
@@ -21,10 +21,13 @@
<input type="text" name="bot_short" id="floating_last_name" class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " required />
<label for="bot_name" class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Short Description (Will be show on home page)</label>
</div>
<div class="relative z-0 mb-6 w-full group">
<input type="text" name="bot_owners" id="floating_last_name" class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " required />
<label for="bot_name" class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Owners (split with <strong>,</strong> ) (You are automatic included!)</label>
</div>
<!-- tags -->
<div class="relative z-0 mb-6 w-full group">
<select multiple name="tag" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required>
<select multiple name="tags" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required>
<option value="moderation">Moderation</option>
<option value="fun">Fun</option>
<option value="utility">Utility</option>
+67 -1
View File
@@ -1,2 +1,68 @@
<%- include('../includes/header.ejs', { title: bot.name, bot: bot}) %>
<br><br><br><br>
<div class="flex space-x-4 py-2 lg:h-5/6 sm:min-h-min">
<div class="p-10 bg-blue-color w-2/3 text-white h-full m-4 mx-14">
<pre><br><%= bot.long_description %></pre>
</div>
<div class="bg-blue-color w-1/4 p-10 text-white h-full m-4 ">
<!-- bot avatar image -->
<img class="w-full rounded-full" src="<%= bot.icon %>" alt="<%= bot.name %>" onerror="this.src='https://cdn.discordapp.com/avatars/<%= bot.id %>/<%=bota.avatar %>.webp'">
<h1 class="text-3xl text-center">
<%= bot.name %>
</h1>
<a href="/bot/<%= bot.id %>/join" class="button float-right"><i class="fa fa-link"></i>
Invite</a>
<% if(user) {
bot.owners.forEach(a=>{
if(a.id == user.id) {
%>
<div class="h6 mt-4">
<i class="fa fa-user-crown"></i>Owner Options
</div>
<a href="/bot/<%= bot.id %>/edit" class="button float-right"><i class="fa fa-edit"></i>
Edit</a>
<%
}
})
}
%>
<h6 class="text-xl mt-4">
<i class="fa fa-question-circle"></i> Information
</h6>
<% if(bot.users){ %>
<div class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-users"></i></div>
<p class="box-2">Members:&nbsp;<%= bot.users %></p>
</p>
</div>
<% } %>
<% if(bot.servers){ %>
<div class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-server"></i></div>
<p class="box-2">Servers:&nbsp;<%= bot.servers %></p>
</p>
</div>
<% } %>
<div class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-users"></i></div>
<p class="box-2">Votes:&nbsp;<%= bot.votes || 0 %>
</p>
</div>
<div class="h6 mt-4">
<i class="fa fa-crown"></i> Owners
</div>
<% owners.forEach(admin=>{
%>
<a style="text-decoration: none;margin-bottom: -5px;" href="/user/<%= admin.id %>" class="flex mt-1">
<div class="h-5 w-5 rounded-lg" style="background: url(<%= "https://cdn.discordapp.com/avatars/" + admin.id + "/" + admin.avatar + ".webp" || '../../img/undefined_avatar.png' %>) center center no-repeat; background-size: 100%;">
</div>
<p translate="no" class="box-2">
<%=admin.username %>
</p>
</a>
<% }) %>
<%- include('../includes/header.ejs', {title: 'Bot' }) %>
</div>
</div>
<br><br><br>
<%- include('../includes/footer.ejs') %>
View File
Whitespace-only changes.
+162
View File
@@ -0,0 +1,162 @@
<%- include("./includes/header.ejs") %>
<div class="promotedbots">
<% var nbots=bots.filter(a=> a.promoted == true)
nbots.forEach((val, key) => {
randomIndex = Math.ceil(Math.random()*(key + 1));
nbots[key] = nbots[randomIndex];
nbots[randomIndex] = val;
});
if(nbots.length > 0) { %>
<div class="mx-auto text-center">
<br>
<h2 class="text-xl text-white text-center"><i class="fa fa-bullhorn" aria-hidden="true"></i> Promoted Bots
</h2>
<p class="content text-white text-center" style="opacity:.6">These bots are featured on BotsCord!</p>
</div>
<div class="grid columns items-center content-center justify-center grid-cols-1 gap-4 col-auto sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 m-8">
<% } %>
<% for(let i=0; i < nbots.length; i++) { if (i===3) break; var bot=nbots[i]; if(bot) { %>
<div class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color ">
<img class="w-full rounded-full" src="https://cdn.discordapp.com/avatars/860390761307439114/2845a42b0c7868c3db29ea1996e84320.webp" alt="<%= bot.name %>">
<div class="px-6 py-4 text-white text-base">
<p><i class="fa-solid fa-check-to-slot"></i>: <%= bot.votes || 0 %>
<%if(bot.servers) { %><i class="fa fa-server"></i>: <%= bot.servers %>
<% } %>
</p>
</div>
<div class="px-6 py-4">
<div class="font-bold text-xl mb-2 text-white">
<%= bot.name %>
</div>
<p class="text-white text-base">
<%= bot.description %>
</p>
</div>
<div class="px-6 pt-4 pb-2">
<a href="/bot/<%= bot.id %>" class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-eye" aria-hidden="true"></i> View
</a>
<a href="/bot/<%= bot.id %>/invite" class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-link" aria-hidden="true"></i> Invite
</a>
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<a href="/tag/<%= tag %>" class="inline-block bg-button-primary rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">#
<%= tag %>
</a>
<% }) %>
</div>
<% } %>
</div>
<% } %>
<% } %>
</div>
</div>
<div class="randombots">
<% var nbots=bots.filter(a=> a.verified == true)
nbots.forEach((val, key) => {
randomIndex = Math.ceil(Math.random()*(key + 1));
nbots[key] = nbots[randomIndex];
nbots[randomIndex] = val;
});
if(nbots.length > 0) { %>
<div class="mx-auto text-center">
<br>
<h2 class="text-xl text-white text-center"><i class="fa fa-shuffle" aria-hidden="true"></i> Random Bots
</h2>
<p class="content text-white text-center" style="opacity:.6">We rolled the dice and got this nice bots!</p>
</div>
<div class="grid columns items-center content-center justify-center grid-cols-1 gap-4 col-auto sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 m-8">
<% } %>
<% for(let i=0; i < nbots.length; i++) { if (i===3) break; var bot=nbots[i]; if(bot) { %>
<div class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color ">
<img class="w-full rounded-full" src="https://cdn.discordapp.com/avatars/860390761307439114/2845a42b0c7868c3db29ea1996e84320.webp" alt="<%= bot.name %>">
<div class="px-6 py-4 text-white text-base">
<p><i class="fa-solid fa-check-to-slot"></i>: <%= bot.votes || 0 %> <%if(bot.servers) { %><i class="fa fa-server"></i>: <%= bot.servers %><% } %></p>
</div>
<div class="px-6 py-4">
<div class="font-bold text-xl mb-2 text-white">
<%= bot.name %>
</div>
<p class="text-white text-base">
<%= bot.description %>
</p>
</div>
<div class="px-6 pt-4 pb-2">
<a href="/bot/<%= bot.id %>" class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-eye" aria-hidden="true"></i> View
</a>
<a href="/bot/<%= bot.id %>/invite" class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-link" aria-hidden="true"></i> Invite
</a>
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<a href="/tag/<%= tag %>" class="inline-block bg-button-primary rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">#
<%= tag %>
</a>
<% }) %>
</div>
<% } %>
</div>
<% } } %>
</div>
</div>
<div class="randombots">
<% var nbots=bots.filter(a=> a.verified == true)
nbots.forEach((val, key) => {
randomIndex = Math.ceil(Math.random()*(key + 1));
nbots[key] = nbots[randomIndex];
nbots[randomIndex] = val;
});
if(nbots.length > 0) { %>
<div class="mx-auto text-center">
<br>
<h2 class="text-xl text-white text-center"><i class="fa fa-check-to-slot" aria-hidden="true"></i> Best bots
</h2>
<p class="content text-white text-center" style="opacity:.6">Bots with highest votes!</p>
</div>
<div class="grid columns items-center content-center justify-center grid-cols-1 gap-4 col-auto sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 m-8">
<% } %>
<% for(let i=0; i < nbots.length; i++) { if (i===3) break; var bot=nbots[i]; if(bot) { %>
<div class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color ">
<img class="w-full rounded-full" src="https://cdn.discordapp.com/avatars/860390761307439114/2845a42b0c7868c3db29ea1996e84320.webp" alt="<%= bot.name %>">
<div class="px-6 py-4 text-white text-base">
<p><i class="fa-solid fa-check-to-slot"></i>: <%= bot.votes || 0 %>
<%if(bot.servers) { %><i class="fa fa-server"></i>: <%= bot.servers %>
<% } %>
</p>
</div>
<div class="px-6 py-4">
<div class="font-bold text-xl mb-2 text-white">
<%= bot.name %>
</div>
<p class="text-white text-base">
<%= bot.description %>
</p>
</div>
<div class="px-6 pt-4 pb-2">
<a href="/bot/<%= bot.id %>" class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-eye" aria-hidden="true"></i> View
</a>
<a href="/bot/<%= bot.id %>/invite" class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-link" aria-hidden="true"></i> Invite
</a>
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<a href="/tag/<%= tag %>" class="inline-block bg-button-primary rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">#
<%= tag %>
</a>
<% }) %>
</div>
<% } %>
</div>
<% } } %>
</div>
</div>
<%- include('./includes/footer.ejs') %>
+19
View File
@@ -17,6 +17,25 @@
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
<!-- meta -->
<meta name="description"
content="BotsCord is a Discord bot that allows you to create your own Discord bot and have it run on your server.">
<meta name="keywords" content="bots, bot, discord, botscord, botscord.xyz">
<% if(typeof server !="undefined" ) { %>
<meta property="og:title" content="BotsCord.xyz" />
<meta property="og:url" content="http://botscord.xyz/server/<%=server.id %>" />
<meta property="og:image" content="<%= server.icon %>" />
<meta property="og:description" content="<%= server.description %> Members: <%= server.members %>" />
<% } %>
<meta property="og:title" content="BotsCord.xyz" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://botscord.xyz" />
<meta property="og:image" content="http://botscord.xyz/img/logo.png" />
<meta property="og:description"
content="Botscord is a place where you can promote and vote for your favorite bot/server!" />
<meta name="theme-color" content="#FF0000">
<meta name="author" content="BotsCord">
<meta name="robots" content="index, follow">
</head>
<body class="bg-primary-color">
+213 -242
View File
@@ -1,274 +1,245 @@
<%- include("./includes/header.ejs", { user:user }) %>
<div class="bg-blue-color bg-primary-color p-2 pl-10 pr-10" style="position: relative; top: 0px;">
<div class="container-sm mx-auto px-3 mb-5 mt-1 h-fit p-1">
<div class="mb-3 mx-auto h-fit">
<span style="float: right; margin-right: 10%;" class="logo">
<img draggable="false" title="botscord.site" src="/img/logo.png" width="320"
alt="Discord Bots | Discord Bot List">
</span>
<br><br>
<h1 class="text-xl" style="font-weight:800;color:#fff">BotsCord</h1>
<p class="content" style="opacity:.6;color:#fff">Find the best Discord Bots for your server with BotsCord!</p>
<br>
<form class="flex items-center ">
<label for="simple-search" class="sr-only">Search</label>
<div class="relative w-3/6">
<div class="flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none">
<svg aria-hidden="true" class="w-5 h-5 text-primary-color dark:text-primary-color" fill="currentColor"
viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"
clip-rule="evenodd"></path>
</svg>
</div>
<input type="text" id="simple-search"
class="bg-primary-color border border-gray-300 text-white text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pl-10 p-2.5 dark:bg-primary-color dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
placeholder="Search" required>
</div>
<button type="submit"
class="p-2.5 ml-2 text-sm font-medium text-white bg-button-primary rounded-lg border border-button-primary hover:bg-button-primary focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-button-primary dark:hover:bg-button-primary dark:focus:ring-blue-800"
style="max-width:80%">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
<div class="bg-blue-color bg-primary-color p-2 pl-10 pr-10" style="position: relative; top: 0px;">
<div class="container-sm mx-auto px-3 mb-5 mt-1 h-fit p-1">
<div class="mb-3 mx-auto h-fit">
<span style="float: right; margin-right: 10%;" class="logo">
<img draggable="false" title="botscord.site" src="/img/logo.png" width="320" alt="Discord Bots | Discord Bot List">
</span>
<br><br>
<h1 class="text-xl" style="font-weight:800;color:#fff">BotsCord</h1>
<p class="content" style="opacity:.6;color:#fff">Find the best Discord Bots for your server with BotsCord!</p>
<br>
<form class="flex items-center ">
<label for="simple-search" class="sr-only">Search</label>
<div class="relative w-3/6">
<div class="flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none">
<svg aria-hidden="true" class="w-5 h-5 text-primary-color dark:text-primary-color" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" clip-rule="evenodd"></path>
</svg>
<span class="sr-only">Search</span>
</button>
</form>
<a title="BotsCord" href="/tag/Moderation"
class="text-white bg-button-primary hover:bg-button-primary focus:ring-4 focus:ring-blue-300 font-bold rounded-lg text-sm px-2 py-2 mb-2 dark:bg-button-primary dark:hover:bg-button-primary focus:outline-none dark:focus:ring-button-primary underline hover:no-underline"><i
class="fa fa-magic"></i>&nbsp;Moderation</a>
<a title="BotsCord" href="/tag/Fun"
class="text-white bg-button-primary hover:bg-button-primary focus:ring-4 focus:ring-blue-300 font-bold rounded-lg text-sm px-2 py-2 mb-2 dark:bg-button-primary dark:hover:bg-button-primary focus:outline-none dark:focus:ring-button-primary underline hover:no-underline"><i
class="fa fa-smile"></i>&nbsp;Fun</a>
<a title="BotsCord" href="/tag/Moderation"
class="text-white bg-button-primary hover:bg-button-primary focus:ring-4 focus:ring-blue-300 font-bold rounded-lg text-sm px-2 py-2 mb-2 dark:bg-button-primary dark:hover:bg-button-primary focus:outline-none dark:focus:ring-button-primary underline hover:no-underline"><i
class="fa fa-file"></i>&nbsp;Logging</a>
<a title="BotsCord" href="/tag/Utility"
class="text-white bg-button-primary hover:bg-button-primary focus:ring-4 focus:ring-blue-300 font-bold rounded-lg text-sm px-2 py-2 mb-2 dark:bg-button-primary dark:hover:bg-button-primary focus:outline-none dark:focus:ring-button-primary underline hover:no-underline"><i
class="fa fa-cogs"></i>&nbsp;Utility</a>
<br><br><br><br>
</div>
</div>
<input type="text" id="simple-search" class="bg-primary-color border border-gray-300 text-white text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pl-10 p-2.5 dark:bg-primary-color dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Search" required>
</div>
<button type="submit" class="p-2.5 ml-2 text-sm font-medium text-white bg-button-primary rounded-lg border border-button-primary hover:bg-button-primary focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-button-primary dark:hover:bg-button-primary dark:focus:ring-blue-800" style="max-width:80%">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
</svg>
<span class="sr-only">Search</span>
</button>
</form>
<a title="BotsCord" href="/tag/Moderation" class="text-white bg-button-primary hover:bg-button-primary focus:ring-4 focus:ring-blue-300 font-bold rounded-lg text-sm px-2 py-2 mb-2 dark:bg-button-primary dark:hover:bg-button-primary focus:outline-none dark:focus:ring-button-primary underline hover:no-underline"><i class="fa fa-magic"></i>&nbsp;Moderation</a>
<a title="BotsCord" href="/tag/Fun" class="text-white bg-button-primary hover:bg-button-primary focus:ring-4 focus:ring-blue-300 font-bold rounded-lg text-sm px-2 py-2 mb-2 dark:bg-button-primary dark:hover:bg-button-primary focus:outline-none dark:focus:ring-button-primary underline hover:no-underline"><i class="fa fa-smile"></i>&nbsp;Fun</a>
<a title="BotsCord" href="/tag/Moderation" class="text-white bg-button-primary hover:bg-button-primary focus:ring-4 focus:ring-blue-300 font-bold rounded-lg text-sm px-2 py-2 mb-2 dark:bg-button-primary dark:hover:bg-button-primary focus:outline-none dark:focus:ring-button-primary underline hover:no-underline"><i class="fa fa-file"></i>&nbsp;Logging</a>
<a title="BotsCord" href="/tag/Utility" class="text-white bg-button-primary hover:bg-button-primary focus:ring-4 focus:ring-blue-300 font-bold rounded-lg text-sm px-2 py-2 mb-2 dark:bg-button-primary dark:hover:bg-button-primary focus:outline-none dark:focus:ring-button-primary underline hover:no-underline"><i class="fa fa-cogs"></i>&nbsp;Utility</a>
<br><br><br><br>
</div>
</div>
<!-- bots section -->
<div class="promotedbots">
<% var nbots=bots.filter(a=> a.promoted == true)
</div>
<!-- bots section -->
<div class="promotedbots">
<% var nbots=bots.filter(a=> a.promoted == true)
nbots.forEach((val, key) => {
randomIndex = Math.ceil(Math.random()*(key + 1));
nbots[key] = nbots[randomIndex];
nbots[randomIndex] = val;
});
if(nbots.length > 0) { %>
<div class="mx-auto text-center">
<br>
<h2 class="text-xl text-white text-center"><i class="fa fa-bullhorn" aria-hidden="true"></i> Promoted Bots
</h2>
<p class="content text-white text-center" style="opacity:.6">These bots are featured on BotsCord!</p>
</div>
<div
class="grid columns items-center content-center justify-center grid-cols-1 gap-4 col-auto sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 m-8">
<% } %>
<% for(let i=0; i < nbots.length; i++) { if (i===3) break; var bot=nbots[i]; if(bot) { %>
<div
class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color ">
<img class="w-full rounded-full"
src="https://cdn.discordapp.com/avatars/860390761307439114/2845a42b0c7868c3db29ea1996e84320.webp"
alt="<%= bot.name %>">
<div class="px-6 py-4">
<div class="font-bold text-xl mb-2 text-white">
<%= bot.name %>
</div>
<p class="text-white text-base">
<%= bot.description %>
</p>
</div>
<div class="px-6 pt-4 pb-2">
<a href="/bot/<%= bot.id %>"
class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-eye" aria-hidden="true"></i> View
</a>
<a href="/bot/<%= bot.id %>/invite"
class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-link" aria-hidden="true"></i> Invite
</a>
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<a href="/tag/<%= tag %>"
class="inline-block bg-button-primary rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">#<%= tag %>
</a>
<% }) %>
</div>
<% } %>
</div>
<% } %>
<% } %>
</div>
<div class="mx-auto text-center">
<br>
<h2 class="text-xl text-white text-center"><i class="fa fa-bullhorn" aria-hidden="true"></i> Promoted Bots
</h2>
<p class="content text-white text-center" style="opacity:.6">These bots are featured on BotsCord!</p>
</div>
<div class="randombots">
<% var nbots=bots.filter(a=> a.verified == true)
<div class="grid columns items-center content-center justify-center grid-cols-1 gap-4 col-auto sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 m-8">
<% } %>
<% for(let i=0; i < nbots.length; i++) { if (i===3) break; var bot=nbots[i]; if(bot) { %>
<div class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color ">
<img class="w-full rounded-full" src="https://cdn.discordapp.com/avatars/860390761307439114/2845a42b0c7868c3db29ea1996e84320.webp" alt="<%= bot.name %>">
<div class="px-6 text-white text-base">
<p><i class="fa-solid fa-check-to-slot"></i>: <%= bot.votes || 0 %> <%if(bot.servers) { %><i class="fa fa-server"></i>: <%= bot.servers %><% } %></p>
</div>
<div class="px-6 py-4">
<div class="font-bold text-xl mb-2 text-white">
<%= bot.name %>
</div>
<p class="text-white text-base">
<%= bot.description %>
</p>
</div>
<div class="px-6 pt-4 pb-2">
<a href="/bot/<%= bot.id %>" class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-eye" aria-hidden="true"></i> View
</a>
<a href="/bot/<%= bot.id %>/invite" class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-link" aria-hidden="true"></i> Invite
</a>
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<a href="/tag/<%= tag %>" class="inline-block bg-button-primary rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">#<%= tag %>
</a>
<% }) %>
</div>
<% } %>
</div>
<% } %>
<% } %>
</div>
</div>
<div class="randombots">
<% var nbots=bots.filter(a=> a.verified == true)
nbots.forEach((val, key) => {
randomIndex = Math.ceil(Math.random()*(key + 1));
nbots[key] = nbots[randomIndex];
nbots[randomIndex] = val;
});
if(nbots.length > 0) { %>
<div class="mx-auto text-center">
<br>
<h2 class="text-xl text-white text-center"><i class="fa fa-shuffle" aria-hidden="true"></i> Random Bots
</h2>
<p class="content text-white text-center" style="opacity:.6">We rolled the dice and got this nice bots!</p>
</div>
<div
class="grid columns items-center content-center justify-center grid-cols-1 gap-4 col-auto sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 m-8">
<% } %>
<% for(let i=0; i < nbots.length; i++) { if (i===3) break; var bot=nbots[i]; if(bot) { %>
<div
class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color ">
<img class="w-full rounded-full"
src="https://cdn.discordapp.com/avatars/860390761307439114/2845a42b0c7868c3db29ea1996e84320.webp"
alt="<%= bot.name %>">
<div class="px-6 py-4">
<div class="font-bold text-xl mb-2 text-white">
<%= bot.name %>
</div>
<p class="text-white text-base">
<%= bot.description %>
</p>
</div>
<div class="px-6 pt-4 pb-2">
<a href="/bot/<%= bot.id %>"
class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-eye" aria-hidden="true"></i> View
</a>
<a href="/bot/<%= bot.id %>/invite"
class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-link" aria-hidden="true"></i> Invite
</a>
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<a href="/tag/<%= tag %>" class="inline-block bg-button-primary rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">#<%= tag %>
</a>
<% }) %>
</div>
<% } %>
</div>
<% } } %>
</div>
<div class="mx-auto text-center">
<br>
<h2 class="text-xl text-white text-center"><i class="fa fa-shuffle" aria-hidden="true"></i> Random Bots
</h2>
<p class="content text-white text-center" style="opacity:.6">We rolled the dice and got this nice bots!</p>
</div>
<!-- server section -->
<div class="promotedservers">
<% var nbots=servers.filter(a=> a.promoted == true)
<div class="grid columns items-center content-center justify-center grid-cols-1 gap-4 col-auto sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 m-8">
<% } %>
<% for(let i=0; i < nbots.length; i++) { if (i===3) break; var bot=nbots[i]; if(bot) { %>
<div class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color ">
<img class="w-full rounded-full" src="https://cdn.discordapp.com/avatars/860390761307439114/2845a42b0c7868c3db29ea1996e84320.webp" alt="<%= bot.name %>">
<div class="px-6 text-white text-base">
<p><i class="fa-solid fa-check-to-slot"></i>: <%= bot.votes || 0 %> <%if(bot.servers) { %><i class="fa fa-server"></i>: <%= bot.servers %><% } %></p>
</div>
<div class="px-6 py-4">
<div class="font-bold text-xl mb-2 text-white">
<%= bot.name %>
</div>
<p class="text-white text-base">
<%= bot.description %>
</p>
</div>
<div class="px-6 pt-4 pb-2">
<a href="/bot/<%= bot.id %>" class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-eye" aria-hidden="true"></i> View
</a>
<a href="/bot/<%= bot.id %>/invite" class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-link" aria-hidden="true"></i> Invite
</a>
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<a href="/tag/<%= tag %>" class="inline-block bg-button-primary rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">#<%= tag %>
</a>
<% }) %>
</div>
<% } %>
</div>
<% } } %>
</div>
</div>
<div class="promotedservers">
<% var nbots=servers.filter(a=> a.promoted == true)
nbots.forEach((val, key) => {
randomIndex = Math.ceil(Math.random()*(key + 1));
nbots[key] = nbots[randomIndex];
nbots[randomIndex] = val;
});
if(nbots.length > 0) { %>
<div class="mx-auto text-center">
<br>
<h2 class="text-xl text-white text-center"><i class="fa fa-bullhorn" aria-hidden="true"></i> Promoted Servers
</h2>
<p class="content text-white text-center" style="opacity:.6">These servers are featured on BotsCord!</p>
</div>
<div
class="grid columns items-center content-center justify-center grid-cols-1 gap-4 col-auto sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 m-8">
<% } %>
<% for(let i=0; i < nbots.length; i++) { if (i===3) break; var bot=nbots[i]; if(bot) { %>
<div
class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color ">
<img class="w-full rounded-full"
src="https://cdn.discordapp.com/avatars/860390761307439114/2845a42b0c7868c3db29ea1996e84320.webp"
alt="<%= bot.name %>">
<div class="px-6 py-4">
<div class="font-bold text-xl mb-2 text-white">
<%= bot.name %>
</div>
<p class="text-white text-base">
<%= bot.description %>
</p>
</div>
<div class="px-6 pt-4 pb-2">
<a href="/server/<%= bot.id %>"
class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-eye" aria-hidden="true"></i> View
</a>
<a href="/server/<%= bot.id %>/invite"
class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-link" aria-hidden="true"></i> Invite
</a>
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<a href="/tag/<%= tag %>"
class="inline-block bg-button-primary rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">#<%= tag %>
</a>
<% }) %>
</div>
<% } %>
</div>
<% } %>
<% } %>
</div>
<div class="mx-auto text-center">
<br>
<h2 class="text-xl text-white text-center"><i class="fa fa-bullhorn" aria-hidden="true"></i> Promoted Servers
</h2>
<p class="content text-white text-center" style="opacity:.6">These servers are featured on BotsCord!</p>
</div>
<div class="randomservers">
<% var nbots=servers
<div class="grid columns items-center content-center justify-center grid-cols-1 gap-4 col-auto sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 m-8">
<% } %>
<% for(let i=0; i < nbots.length; i++) { if (i===3) break; var bot=nbots[i]; if(bot) { %>
<div class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color ">
<img class="w-full rounded-full" src="https://cdn.discordapp.com/avatars/860390761307439114/2845a42b0c7868c3db29ea1996e84320.webp" alt="<%= bot.name %>">
<div class="px-6 text-white text-base">
<p><i class="fa-solid fa-check-to-slot"></i>: <%= bot.votes || 0 %> <%if(bot.members) { %><i class="fa fa-user"></i>: <%= bot.members %><% } %></p>
</p>
</div>
<div class="px-6 py-4">
<div class="font-bold text-xl mb-2 text-white">
<%= bot.name %>
</div>
<p class="text-white text-base">
<%= bot.description %>
</p>
</div>
<div class="px-6 pt-4 pb-2">
<a href="/server/<%= bot.id %>" class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-eye" aria-hidden="true"></i> View
</a>
<a href="/server/<%= bot.id %>/invite" class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-link" aria-hidden="true"></i> Join
</a>
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<a href="/tag/<%= tag %>" class="inline-block bg-button-primary rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">#<%= tag %>
</a>
<% }) %>
</div>
<% } %>
</div>
<% } %>
<% } %>
</div>
</div>
<div class="randomservers">
<% var nbots=servers
nbots.forEach((val, key) => {
randomIndex = Math.ceil(Math.random()*(key + 1));
nbots[key] = nbots[randomIndex];
nbots[randomIndex] = val;
});
if(nbots.length > 0) { %>
<div class="mx-auto text-center">
<br>
<h2 class="text-xl text-white text-center"><i class="fa fa-shuffle" aria-hidden="true"></i> Random Servers
</h2>
<p class="content text-white text-center" style="opacity:.6">We rolled the dice and got this nice Servers!</p>
</div>
<div
class="grid columns items-center content-center justify-center grid-cols-1 gap-4 col-auto sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 m-8">
<% } %>
<% for(let i=0; i < nbots.length; i++) { if (i===3) break; var bot=nbots[i]; if(bot) { %>
<div
class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color ">
<img class="w-full rounded-full"
src="<% bot.icon %> " onerror="this.src='/img/logo.png'"
alt="<%= bot.name %>">
<div class="px-6 py-4">
<div class="font-bold text-xl mb-2 text-white">
<%= bot.name %>
</div>
<p class="text-white text-base">
<%= bot.description %>
</p>
</div>
<div class="px-6 pt-4 pb-2">
<a href="/server/<%= bot.id %>"
class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-eye" aria-hidden="true"></i> View
</a>
<a href="/server<%= bot.id %>/invite"
class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2" data-toggle="tooltip" title="Join the server" data-placement="top">
<i class="fa fa-link" aria-hidden="true"></i> Invite
</a>
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<a href="/tag/<%= tag %>" class="inline-block bg-button-primary rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">#<%= tag %>
</a>
<% }) %>
</div>
<% } %>
</div>
<% } %>
<% } %>
</div>
<div class="mx-auto text-center">
<br>
<h2 class="text-xl text-white text-center"><i class="fa fa-shuffle" aria-hidden="true"></i> Random Servers
</h2>
<p class="content text-white text-center" style="opacity:.6">We rolled the dice and got this nice Servers!</p>
</div>
<%- include("./includes/footer.ejs") %>
<div class="grid columns items-center content-center justify-center grid-cols-1 gap-4 col-auto sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 m-8">
<% } %>
<% for(let i=0; i < nbots.length; i++) { if (i===3) break; var bot=nbots[i]; if(bot) { %>
<div class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color ">
<img class="w-full rounded-full" src="<% bot.icon %> " onerror="this.src='/img/logo.png'" alt="<%= bot.name %>">
<% if (bot.votes || bot.members){ %>
<div class="px-6 text-white text-base">
<p><i class="fa-solid fa-check-to-slot"></i>: <%= bot.votes %> <i class="fa fa-user"></i>: <%= bot.members %>
</p>
</div>
<% } %>
<div class="px-6 py-4">
<div class="font-bold text-xl mb-2 text-white">
<%= bot.name %>
</div>
<p class="text-white text-base">
<%= bot.description %>
</p>
</div>
<div class="px-6 pt-4 pb-2">
<a href="/server/<%= bot.id %>" class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">
<i class="fa fa-eye" aria-hidden="true"></i> View
</a>
<a href="/server<%= bot.id %>/invite" class="inline-block bg-blue-700 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2" data-toggle="tooltip" title="Join the server" data-placement="top">
<i class="fa fa-link" aria-hidden="true"></i> Join
</a>
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<a href="/tag/<%= tag %>" class="inline-block bg-button-primary rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2">#<%= tag %>
</a>
<% }) %>
</div>
<% } %>
</div>
<% } %>
<% } %>
</div>
</div>
<%- include("./includes/footer.ejs") %>
+48 -62
View File
@@ -1,67 +1,53 @@
<!-- add servers for the website -->
<%- include('../includes/header.ejs', {title: 'Add server' }) %>
<!-- create form -->
<div class="container-sm p-10">
<form method="post" action="">
<div class="grid md:grid-cols-2 md:gap-6">
<div class="relative z-0 mb-6 w-full group">
<select name="serverid"
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
required>
<% for (var i=0; i < user.guilds.length; i++) { %>
<option value="<%= user.guilds[i].id %>">
<%= user.guilds[i].name %>
</option>
<% } %>
</select>
</div>
<div class="relative z-0 mb-6 w-full group">
<input type="text" name="server_invite" id="floating_last_name"
class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="floating_last_name"
class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Server
ID</label>
</label>
</div>
</div>
<!-- create form -->
<div class="container-sm p-10">
<form method="post" action="">
<div class="grid md:grid-cols-2 md:gap-6">
<div class="relative z-0 mb-6 w-full group">
<textarea type="text" name="server_description" id="server_name"
class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required rows="5"></textarea>
<label for="server_name"
class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Server
description (MarkDown supported!)</label>
</div>
<div class="relative z-0 mb-6 w-full group">
<input type="text" name="server_short" id="floating_last_name"
class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="server_name"
class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Short
Description (Will be show on home page)</label>
</div>
<div class="relative z-0 mb-6 w-full group">
<select multiple name="tags"
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
required>
<option value="development">Development</option>
<option value="fun">Fun</option>
<option value="media">Media</option>
<option value="company">Company</option>
<option value="game">Game</option>
<option value="emoji">Emoji</option>
<option value="botlist">Bot List</option>
<option value="serverlist">Server List</option>
<option value="turkish">Turkish</option>
<option value="support">Support</option>
<option value="sound">Sound</option>
<option value="chatting">Chatting</option>
<option value="nsfw">NSFW</option>
<option value="challange">Challange</option>
<select name="serverid" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required>
<% for (var i=0; i < user.guilds.length; i++) { %>
<option value="<%= user.guilds[i].id %>">
<%= user.guilds[i].name %>
</option>
<% } %>
</select>
</div>
<button type="submit"
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Submit</button>
</form>
</div>
<div class="relative z-0 mb-6 w-full group">
<input type="text" name="server_invite" id="floating_last_name" class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " required />
<label for="floating_last_name" class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Server
ID</label>
</label>
</div>
</div>
<div class="relative z-0 mb-6 w-full group">
<textarea type="text" name="server_description" id="server_name" class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " required rows="5"></textarea>
<label for="server_name" class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Server
description (MarkDown supported!)</label>
</div>
<div class="relative z-0 mb-6 w-full group">
<input type="text" name="server_short" id="floating_last_name" class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " required />
<label for="server_name" class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Short
Description (Will be show on home page)</label>
</div>
<div class="relative z-0 mb-6 w-full group">
<select multiple name="tags" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required>
<option value="development">Development</option>
<option value="fun">Fun</option>
<option value="media">Media</option>
<option value="company">Company</option>
<option value="game">Game</option>
<option value="emoji">Emoji</option>
<option value="botlist">Bot List</option>
<option value="serverlist">Server List</option>
<option value="turkish">Turkish</option>
<option value="support">Support</option>
<option value="sound">Sound</option>
<option value="chatting">Chatting</option>
<option value="nsfw">NSFW</option>
<option value="challange">Challange</option>
</select>
</div>
<button type="submit" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Submit</button>
</form>
</div>
+34 -43
View File
@@ -1,44 +1,35 @@
<%- include("../includes/header.ejs", {title: "Edit " + server.name}) %>
<!-- create form -->
<div class="container-sm p-10">
<form method="post" action="">
<div class="relative z-0 mb-6 w-full group">
<textarea type="text" name="server_description" id="server_name"
class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required rows="5"><%= server.long_description %></textarea>
<label for="server_name"
class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Server
description (MarkDown supported!)</label>
</div>
<div class="relative z-0 mb-6 w-full group">
<input type="text" name="server_short" id="floating_last_name"
class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required value="<%= server.description %>"/>
<label for="server_name"
class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Short
Description (Will be show on home page)</label>
</div>
<div class="relative z-0 mb-6 w-full group">
<select multiple name="tags"
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
required>
<option value="development">Development</option>
<option value="fun">Fun</option>
<option value="media">Media</option>
<option value="company">Company</option>
<option value="game">Game</option>
<option value="emoji">Emoji</option>
<option value="botlist">Bot List</option>
<option value="serverlist">Server List</option>
<option value="turkish">Turkish</option>
<option value="support">Support</option>
<option value="sound">Sound</option>
<option value="chatting">Chatting</option>
<option value="nsfw">NSFW</option>
<option value="challange">Challange</option>
</select>
</div>
<button type="submit"
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Update</button>
</form>
</div>
<!-- create form -->
<div class="container-sm p-10">
<form method="post" action="">
<div class="relative z-0 mb-6 w-full group">
<textarea type="text" name="server_description" id="server_name" class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " required rows="5"><%= server.long_description %></textarea>
<label for="server_name" class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Server
description (MarkDown supported!)</label>
</div>
<div class="relative z-0 mb-6 w-full group">
<input type="text" name="server_short" id="floating_last_name" class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " required value="<%= server.description %>" />
<label for="server_name" class="peer-focus:font-medium absolute text-sm text-white dark:text-white duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Short
Description (Will be show on home page)</label>
</div>
<div class="relative z-0 mb-6 w-full group">
<select multiple name="tags" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required>
<option value="development">Development</option>
<option value="fun">Fun</option>
<option value="media">Media</option>
<option value="company">Company</option>
<option value="game">Game</option>
<option value="emoji">Emoji</option>
<option value="botlist">Bot List</option>
<option value="serverlist">Server List</option>
<option value="turkish">Turkish</option>
<option value="support">Support</option>
<option value="sound">Sound</option>
<option value="chatting">Chatting</option>
<option value="nsfw">NSFW</option>
<option value="challange">Challange</option>
</select>
</div>
<button type="submit" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Update</button>
</form>
</div>
+77 -74
View File
@@ -1,80 +1,83 @@
<%- include('../includes/header.ejs', { title: server.name}) %>
<br><br><br><br>
<div class="flex space-x-4 py-2 lg:h-5/6 sm:min-h-min">
<div class="p-10 bg-blue-color w-2/3 text-white h-full m-4 mx-14">
<%= server.long_description %>
</div>
<div class="bg-blue-color w-1/4 p-10 text-white h-full m-4 ">
<h1 class="text-3xl">
<%= server.name %>
</h1>
<a href="/server/<%= server.id %>/join" class="button float-right"><i class="fa fa-link"></i>
Join</a>
<% if(user) { if(serverr.members.cache.get(user.id)) {
<%- include('../includes/header.ejs', { title: server.name, server: server}) %>
<br><br><br><br>
<div class="flex space-x-4 py-2 lg:h-5/6 sm:min-h-min">
<div class="p-10 bg-blue-color w-2/3 text-white h-full m-4 mx-14">
<pre><br><%= server.long_description %></pre>
</div>
<div class="bg-blue-color w-1/4 p-10 text-white h-full m-4 ">
<% console.log(serverr) %>
<img class="w-full rounded-full" src="<%= serverr.icon %>" alt="<%= server.name %>" onerror="this.src='/img/logo.png'">
<h1 class="text-3xl">
<%= server.name %>
</h1>
<a href="/server/<%= server.id %>/join" class="button float-right"><i class="fa fa-link"></i>
Join</a>
<% if(user) { if(serverr.members.cache.get(user.id)) {
if(serverr.members.cache.get(user.id).permissions.has('ADMINISTRATOR')) { %>
<div class="h6 mt-4">
<i class="fa fa-user-crown"></i>Owner Options
</div>
<a href="/server/<%= server.id %>/edit" class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-pencil"></i></div>
<p class="box-2">Edit Server</p>
</a>
<% } } } %>
<h6 class="text-xl mt-4">
<i class="fa fa-question-circle"></i>
<p>Information</p>
</h6>
<div class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-users"></i></div>
<p class="box-2">Members:&nbsp;<%= serverr.memberCount.toLocaleString().replace(',', '.' ) %>
</p>
</div>
<div class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-robot"></i></div>
<p class="box-2">Bots:&nbsp;<%= serverr.members.cache.filter(a=> a.user.bot).size %>
</p>
</div>
<div class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-icons"></i></div>
<p class="box-2">Emoji:&nbsp;<%= serverr.emojis.cache.size || "0" %>
</p>
</div>
<div class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-user"></i></div>
<p class="box-2">Role Count:&nbsp;<%= serverr.roles.cache.size || "0" %>
</p>
</div>
<div class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-diamond"></i></div>
<p class="box-2">Boost Level:&nbsp;<%= serverr.premiumTier || "0" %>
</p>
</div>
<div class="h6 mt-4">
<i class="fa fa-user-crown"></i> Owners
</div>
<% serverr.members.cache.filter(a=> !a.user.bot && a.permissions.has('ADMINISTRATOR')).map(admin =>{
%>
<a style="text-decoration: none;margin-bottom: -5px;" href="/user/<%= admin.user.id %>"
class="flex mt-1">
<div class="h-5 w-5 rounded-lg"
style="background: url(<%= admin.user.avatarURL({dynamic:true}) || '../../img/undefined_avatar.png' %>) center center no-repeat; background-size: 100%;">
</div>
<p translate="no" class="box-2">
<%= admin.user.tag %>
<% if(admin.user.id===serverr.ownerID) { %>
&nbsp;<span data-toggle="tooltip" title="Join the server"><i
class="fa fa-crown has-text-warning"></i></span>
<% } %>
</p>
</a>
<% }) %>
</div>
<div class="h6 mt-4">
<i class="fa user-crown"></i>Owner Options
</div>
<br><br><br>
<a href="/server/<%= server.id %>/edit" class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-pencil"></i></div>
<p class="box-2">Edit Server</p>
</a>
<% } } } %>
<h6 class="text-xl mt-4">
<i class="fa fa-question-circle"></i> Information
</h6>
<div class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-users"></i></div>
<p class="box-2">Votes:&nbsp;<%= bot.votes || 0 %>
</p>
</div>
<div class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-users"></i></div>
<p class="box-2">Members:&nbsp;<%= serverr.memberCount.toLocaleString().replace(',', '.' ) %>
</p>
</div>
<div class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-robot"></i></div>
<p class="box-2">Bots:&nbsp;<%= serverr.members.cache.filter(a=> a.user.bot).size %>
</p>
</div>
<div class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-icons"></i></div>
<p class="box-2">Emoji:&nbsp;<%= serverr.emojis.cache.size || "0" %>
</p>
</div>
<div class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-user"></i></div>
<p class="box-2">Role Count:&nbsp;<%= serverr.roles.cache.size || "0" %>
</p>
</div>
<div class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-diamond"></i></div>
<p class="box-2">Boost Level:&nbsp;<%= serverr.premiumTier || "0" %>
</p>
</div>
<div class="h6 mt-4">
<i class="fa fa-crown"></i> Owners
</div>
<% serverr.members.cache.filter(a=> !a.user.bot && a.permissions.has('ADMINISTRATOR')).map(admin =>{
%>
<a style="text-decoration: none;margin-bottom: -5px;" href="/user/<%= admin.user.id %>" class="flex mt-1">
<div class="h-5 w-5 rounded-lg" style="background: url(<%= admin.user.avatarURL({dynamic:true}) || '../../img/undefined_avatar.png' %>) center center no-repeat; background-size: 100%;">
</div>
<p translate="no" class="box-2">
<%= admin.user.tag %>
<% if(admin.user.id===serverr.ownerID) { %>
&nbsp;<span data-toggle="tooltip" title="Join the server"><i class="fa fa-crown has-text-warning"></i></span>
<% } %>
</p>
</a>
<% }) %>
<%- include('../includes/footer.ejs') %>
<!-- <% /*, meta: {
</div>
</div>
<br><br><br>
<%- include('../includes/footer.ejs') %>
<!-- <% /*, meta: {
site_name: 'Powered by Botscord',
description: server.description + "🟢" + global.bsl.guilds.cache.get(server.id).members.cache.filter(a => a.presence.status != 'dnd').size + "online ⚫" +global.bsl.guilds.cache.get(server.id).memberCount + "members",
image: server.icon