This commit is contained in:
CorwinDev committed 2022-08-18 14:44:12 +02:00
1 parent 29fff68ff0
commit f16305c6ad
25 files changed
+1079 -350

No files matched your search

+15 -38
View File
@@ -1,39 +1,16 @@
<%- include("../includes/header.ejs", { title: "Bot" + bots.name}) %>
<div class="overflow-x-auto relative container-sm">
<table class="w-full text-sm text-left text-gray-500 dark:text-gray-400">
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
<tr>
<th scope="col" class="py-3 px-6">
Bot Name
</th>
<th scope="col" class="py-3 px-6">
BotID
</th>
<th scope="col" class="py-3 px-6">
Bot Description
</th>
<th scope="col" class="py-3 px-6">
Owner
</th>
</tr>
</thead>
<tbody>
<% var nbots = bots.filter(bot => bot.verified == false); %>
<% nbots.forEach(function(bot) { %>
<tr class="hover:bg-gray-100 dark:hover:bg-gray-800" onclick="location.href='/admin/bot/<%= bot.id %>'">
<td class="py-3 px-6">
<%= bot.name %>
</td>
<td class="py-3 px-6">
<%= bot.id %>
</td>
<td class="py-3 px-6">
<%= bot.description %>
</td>
<td class="py-3 px-6">
<%= bot.owner %>
</td>
</tr>
<% }) %>
</tbody>
</table>
<div class="overflow-x-auto relative container-sm text-center">
<% if(typeof reject != "undefined") { %>
<form action="" method="post">
<h1 class="text-xl text-white">Are you sure you want to reject this bot?</h1>
<p class="text-white">Reason: <input type="text " name="reason" class=" text-black "></p>
<input type="submit" value="Yes" name="reject" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full">
<input type="submit" value="No" class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded-full" onclick="location.href='/admin'">
</form>
<% } %>
<% if(typeof verify != "undefined") { %>
<form action="" method="post">
<h1 class="text-xl">Are you sure you want to verify this bot?</h1>
<input type="submit" value="Yes" name="verify" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full" onclick="location.href='/admin/bot/<%= bots.id %>/verify'">
</form>
<% } %>
+15 -2
View File
@@ -15,12 +15,15 @@
<th scope="col" class="py-3 px-6">
Owner
</th>
<th scope="col" class="py-3 px-6">
Verify
</th>
</tr>
</thead>
<tbody>
<% var nbots = bots.filter(bot => bot.verified == false); %>
<% var nbots = bots.filter(bot => bot.verified == false); %>
<% nbots.forEach(function(bot) { %>
<tr class="hover:bg-gray-100 dark:hover:bg-gray-800" onclick="location.href='/admin/bot/<%= bot.id %>'">
<tr class="hover:bg-gray-100 dark:hover:bg-gray-800">
<td class="py-3 px-6">
<%= bot.name %>
</td>
@@ -33,6 +36,16 @@
<td class="py-3 px-6">
<%= bot.owner %>
</td>
<td class="py-3 px-6">
<form action="/admin/bot/<%= bot.id %>/verify" method="post">
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full" type="submit">
Verify
</button>
</form>
<button class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded-full" onclick="location.href='/admin/bot/<%= bot.id %>/reject'">
Reject
</button>
</td>
</tr>
<% }) %>
+17 -4
View File
@@ -16,14 +16,27 @@
<input type="text" name="bot_short" id="floating_last_name" class="block py-2.5 px-0 w-full text-sm text-white 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="<%= bot.description %>" />
<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><br>
</div>
<div class="relative z-0 mb-6 w-full group">
<input type="text" name="bot_vanity" id="bot_vanity" class="block py-2.5 px-0 w-full text-sm text-white 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=" " value="<%= bot.vanity %>" />
<label for="bot_vanity" 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">Fill this in to get a vanity url invite.</label>
<span class="text-white text-xs" id="vanity">https://botscord.xyz/i/</span>
</div>
<script>
var vanity = document.getElementById("vanity");
vanity.innerHTML = vanity.innerHTML + "<%= bot.vanity %>";
var change = document.getElementById("bot_vanity");
change.addEventListener("keyup", function() {
vanity.innerHTML = "https://botscord.xyz/i/" + change.value;
});
</script>
<br>
<h1 class="text-xl text-white">This token can be used to access your bot via our api</h1>
<a href="/docs/api" class="text-sm text-white hover:text-blue-600 underline ">
<h1 class="text-sm text-white hover:text-blue-600">Access api docs</h1>
<h1 class="text-sm text-white hover:text-blue-600">Access api docs</h1>
</a>
<div class="relative z-0 mb-6 w-full group">
<input type="text" id="token" class="block py-2.5 px-0 w-full text-sm text-white 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="<%= bot.token %>" onclick="copy()"/>
<input type="text" id="token" class="block py-2.5 px-0 w-full text-sm text-white 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="<%= bot.token %>" onclick="copy()" />
</div>
<script>
function copy() {
+7 -1
View File
@@ -2,7 +2,13 @@
<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>
<article class="prose prose-xl text-white">
<br><%- description %>
</article>
<div class="prose">
</div>
</div>
<div class="bg-blue-color w-1/4 p-10 text-white h-full m-4 ">
<!-- bot avatar image -->
+19
View File
@@ -0,0 +1,19 @@
<%- include('../includes/header.ejs', {title: 'Join' + bot.name}) %>
<div class="flex flex-col items-center justify-center h-screen ">
<div class="w-96 h-96 bg-blue-color text-white text-center rounded-lg items-center">
<h1 class="text-3xl font-bold p-5">Join <%= bot.name %></h1>
<p>You will be redirected after 3 seconds </p>
<div class="flex justify-center">
<image src="/gif/loading.gif">
<span class="sr-only">Loading...</span>
</div>
Press <a href="<%- invite %>">here</a> if you are not redirected.
</div>
<script>
setTimeout(function() {
window.location.href = '<%- invite %>';
}, 3000);
</script>
</div>
</div>
<%- include('../includes/footer.ejs') %>
+2 -1
View File
@@ -6,4 +6,5 @@
<p>Error: <%= errorr %></p>
</div>
</div>
</div>
</div>
<div class="prose"></div>
+2 -2
View File
@@ -97,8 +97,8 @@
<div class="hidden origin-top-right absolute mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 divide-y divide-gray-100 focus:outline-none items-stretch" role="menu" aria-orientation="vertical" aria-labelledby="menu-button" tabindex="-1" id="dropdown" style="z-index: 99 !important;">
<div class="py-1" role="none">
<a href="/invite" class="text-gray-700 block px-4 py-2 text-sm" role="menuitem" tabindex="-1" id="menu-item-0"><i class="fas fa-user-plus"></i>Invite</a>
<a href="/discord" class="text-gray-700 block px-4 py-2 text-sm" role="menuitem" tabindex="-1" id="menu-item-1"><i class="fa-brands fa-discord"></i>Discord Server</a>
<a href="/i/BSL" class="text-gray-700 block px-4 py-2 text-sm" role="menuitem" tabindex="-1" id="menu-item-0"><i class="fas fa-user-plus"></i>Invite</a>
<a href="/i/BotsCord" class="text-gray-700 block px-4 py-2 text-sm" role="menuitem" tabindex="-1" id="menu-item-1"><i class="fa-brands fa-discord"></i>Discord Server</a>
</div>
<div class="py-1" role="none">
<a href="/server/add" class="text-gray-700 block px-4 py-2 text-sm" role="menuitem" tabindex="-1" id="menu-item-2"><i class="fa fa-solid fa-plus"></i>Add server</a>
+4 -4
View File
@@ -81,7 +81,7 @@
</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) { %>
<% for(let i=0; i < nbots.length; i++) { if (i===5) 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 " onclick="location.href='/bot/<%=bot.id%> ';" style="cursor: pointer;">
<img class="w-full rounded-full" src="<%= bot.icon %>" onerror="this.src='/img/logo.webp'" alt="<%= bot.name %>">
<div class="px-6 text-white text-base">
@@ -125,7 +125,7 @@
</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) { %>
<% for(let i=0; i < nbots.length; i++) { if (i===5) 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 " onclick="location.href='/bot/<%=bot.id%> ';" style="cursor: pointer;">
<img class="w-full rounded-full" src="<%= bot.icon %>" onerror="this.src='/img/logo.webp'" alt="<%= bot.name %>">
<div class="px-6 text-white text-base">
@@ -168,7 +168,7 @@
</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) { %>
<% for(let i=0; i < nbots.length; i++) { if (i===5) 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 " onclick="location.href='/server/<%=bot.id%> ';" style="cursor: pointer;">
<img class="w-full rounded-full" src="<%= global.bsl.guilds.cache.get(bot.id).iconURL({ format: 'png' }) %>" onerror="this.src='/img/logo.webp'" alt="<%= bot.name %>">
<div class="px-6 text-white text-base">
@@ -256,7 +256,7 @@
</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) { %>
<% for(let i=0; i < nbots.length; i++) { if (i===5) 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 " onclick="location.href='/server/<%=bot.id%> ';" style="cursor: pointer;">
<img class="w-full rounded-full" src="<%= global.bsl.guilds.cache.get(bot.id).iconURL({ format: 'png' }) %> " onerror="this.src='/img/logo.webp'" alt="<%= bot.name %>">
<div class="px-6 text-white text-base">
+14
View File
@@ -21,6 +21,19 @@
<input type="text" name="server_webhook" id="floating_last_name" class="block py-2.5 px-0 w-full text-sm text-white 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=" " value="<%= server.webhook %>" />
<label for="server_webhook" 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">Discord WebHook to recieve votes.</label>
</div>
<div class="relative z-0 mb-6 w-full group">
<input type="text" name="server_vanity" id="server_vanity" class="block py-2.5 px-0 w-full text-sm text-white 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=" " value="<%= server.vanity %>" />
<label for="server_vanity" 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">Fill this in to get a vanity url invite.</label>
<span class="text-white text-xs" id="vanity">https://botscord.xyz/i/</span>
</div>
<script>
var vanity = document.getElementById("vanity");
vanity.innerHTML = vanity.innerHTML + "<%= server.vanity %>";
var change = document.getElementById("server_vanity");
change.addEventListener("keyup", function() {
vanity.innerHTML = "https://botscord.xyz/i/" + change.value;
});
</script>
<div class="relative z-0 mb-6 w-full group">
<select multiple name="tags" class="bg-gray-50 border border-gray-300 text-white 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>
<% global.config.server.tags.forEach(function(tag) { %>
@@ -30,6 +43,7 @@
</div><br>
<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>
<br>
<!-- show code for banner -->
<span class="text-white">Add this code to your websites to get automatically a banner</span>
<textarea class="text-white" style="width:100%;" rows="2" disabled>
+9 -8
View File
@@ -2,18 +2,19 @@
<div class="flex flex-col items-center justify-center h-screen ">
<div class="w-96 h-96 bg-blue-color text-white text-center rounded-lg items-center">
<h1 class="text-3xl font-bold p-5">Join <%= server.name %></h1>
<p>You will be redirect after 3 seconds </p>
<p>You will be redirected after 3 seconds </p>
<div class="flex justify-center">
<image src="/gif/loading.gif">
<span class="sr-only">Loading...</span>
</div>
</div>
<!-- script to redirect -->
<script>
setTimeout(function() {
window.location.href = '<%= server.invite %>';
}, 3000);
</script>
</div>
Press <a href="<%- server.invite %>">here</a> if you are not redirected.
<script>
setTimeout(function() {
window.location.href = '<%= server.invite %>';
}, 3000);
</script>
</div>
</div>
<%- include('../includes/footer.ejs') %>
+2 -2
View File
@@ -18,7 +18,7 @@
<% for(let i=0; i < nbots.length; i++) { var bot=nbots[i]; if(bot) { %>
<% getBot = global.bsl.guilds.cache.get(bot.id); %>
<div class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color " onclick="location.href='/bot/<%=bot.id%> ';" style="cursor: pointer;">
<div class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color " onclick="location.href='/server/<%=bot.id%> ';" style="cursor: pointer;">
<img class="w-full rounded-full" src="<%= getBot.iconURL({ format: 'png' }) %>" onerror="this.src='/img/logo.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 %> <i class="fa fa-user"></i>: <%= global.bsl.guilds.cache.get(bot.id).memberCount.toLocaleString().replace(',', '.' ) %><span class="float-right"><i class="fa fa-bomb"></i>: <%=bot.bumps %></span>
@@ -63,7 +63,7 @@
<% } %>
<% for(let i=0; i < nbots.length; i++) { var bot=nbots[i]; if(bot) { %>
<% getBot = global.bsl.guilds.cache.get(bot.id); %>
<div class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color " onclick="location.href='/bot/<%=bot.id%> ';" style="cursor: pointer;">
<div class="transition-shadow ease-in-out duration-300 hover:shadow-blue-900 shadow-2xl rounded-lg max-w-sm bg-blue-color " onclick="location.href='/server/<%=bot.id%> ';" style="cursor: pointer;">
<img class="w-full rounded-full" src="<%= getBot.iconURL({ format: 'png' }) %>" onerror="this.src='/img/logo.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 %> <i class="fa fa-user"></i>: <%= global.bsl.guilds.cache.get(bot.id).memberCount.toLocaleString().replace(',', '.' ) %><span class="float-right"><i class="fa fa-bomb"></i>: <%=bot.bumps %></span>
-3
View File
@@ -22,9 +22,6 @@
<label for="website" class="peer-focus:font-medium absolute text-sm 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">Your website </label>
</div>
<br>
<script>
//
</script>
<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>
+9 -2
View File
@@ -3,7 +3,14 @@
<div class="lg:flex space-x-4 py-2 lg:h-5/6 sm:min-h-min">
<div class="p-10 bg-blue-color w-full text-white h-full m-4 lg:mx-14 text-ellipsis lg:w-2/3">
<p class="text-white text-clip">
<pre style="white-space: pre-wrap;" class="text-clip break-wordsw-full h-full"><br><%= users.biography || "User Has No biography" %></pre>
<pre style="white-space: pre-wrap;" class="text-clip break-wordsw-full h-full"><br>
<% if(typeof users.biography !== 'undefined') { %>
<%= users.biography %>
<% } else { %>
User Has No biography
<%} %>
</pre>
</p><br>
Bots owned by this user: <%= bots.length %><br>
<% if(bots) { %>
@@ -34,7 +41,7 @@
</div>
<% if(typeof users.website != "undefined") { %>
<a href="<%= users.website %>" target="_blank" class="text-white text-clip">
<i class="fab fa-website"></i>
<i class="fa-solid fa-browser"></i>
<%= users.website %>
<br>
</a>