Solved issue
This commit is contained in:
1 parent
873cb63dfc
commit
7b85d3d503
1 file changed
+13
-6
+13
-6
@@ -34,7 +34,7 @@
|
|||||||
type: 'GET',
|
type: 'GET',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
var html = '';
|
var html = '';
|
||||||
if(!data.array.length) html = '<div class="text-center">No results found</div>';
|
if (!data.array.length) html = '<div class="text-center">No results found</div>';
|
||||||
for (var i = 0; i < data.array.length; i++) {
|
for (var i = 0; i < data.array.length; i++) {
|
||||||
if (i == 5) {
|
if (i == 5) {
|
||||||
break;
|
break;
|
||||||
@@ -169,10 +169,11 @@
|
|||||||
<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">
|
<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===5) 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) { %>
|
||||||
|
<% var serverr = global.bsl.guilds.cache.get(bot.id); if(serverr) { %>
|
||||||
<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;">
|
<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="https://cdn.discordapp.com/icons/<%= bot.id %>/<%= global.bsl.guilds.cache.get(bot.id).icon %>.webp" onerror="this.src='/img/logo.webp'" alt="<%= bot.name %>">
|
<img class="w-full rounded-full" src="https://cdn.discordapp.com/icons/<%= bot.id %>/<%= serverr.icon %>.webp" onerror="this.src='/img/logo.webp'" alt="<%= bot.name %>">
|
||||||
<div class="px-6 text-white text-base">
|
<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(',', '.' ) %>
|
<p><i class="fa-solid fa-check-to-slot"></i>: <%= bot.votes || 0 %> <i class="fa fa-user"></i>: <%= serverr.memberCount.toLocaleString().replace(',', '.' ) %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-6 py-4">
|
<div class="px-6 py-4">
|
||||||
@@ -202,6 +203,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bumpservers">
|
<div class="bumpservers">
|
||||||
@@ -214,10 +216,12 @@
|
|||||||
<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">
|
<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">
|
||||||
<% servers.sort((a, b) => b.bump - a.bump).slice(0, 5).map(bot => {
|
<% servers.sort((a, b) => b.bump - a.bump).slice(0, 5).map(bot => {
|
||||||
if(!bot) return; %>
|
if(!bot) return; %>
|
||||||
|
<% var serverr = global.bsl.guilds.cache.get(bot.id); if(serverr) { %>
|
||||||
|
|
||||||
<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;">
|
<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="https://cdn.discordapp.com/icons/<%= bot.id %>/<%= global.bsl.guilds.cache.get(bot.id).icon %>.webp" onerror="this.src='/img/logo.webp'" alt="<%= bot.name %>">
|
<img class="w-full rounded-full" src="https://cdn.discordapp.com/icons/<%= bot.id %>/<%= serverr.icon %>.webp" onerror="this.src='/img/logo.webp'" alt="<%= bot.name %>">
|
||||||
<div class="px-6 text-white text-base">
|
<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>
|
<p><i class="fa-solid fa-check-to-slot"></i>: <%= bot.votes || 0 %> <i class="fa fa-user"></i>: <%= serverr.memberCount.toLocaleString().replace(',', '.' ) %><span class="float-right"><i class="fa fa-bomb"></i>: <%=bot.bumps %></span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-6 py-4">
|
<div class="px-6 py-4">
|
||||||
@@ -236,6 +240,7 @@
|
|||||||
<% }) %>
|
<% }) %>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
<% }) %>
|
<% }) %>
|
||||||
</div>
|
</div>
|
||||||
@@ -257,8 +262,9 @@
|
|||||||
<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">
|
<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===5) 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) { %>
|
||||||
|
<% var serverr = global.bsl.guilds.cache.get(bot.id); if(serverr) { %>
|
||||||
<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;">
|
<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="https://cdn.discordapp.com/icons/<%= bot.id %>/<%= global.bsl.guilds.cache.get(bot.id).icon %>.webp" onerror="this.src='/img/logo.webp'" alt="<%= bot.name %>">
|
<img class="w-full rounded-full" src="https://cdn.discordapp.com/icons/<%= bot.id %>/<%= serverr.icon %>.webp" onerror="this.src='/img/logo.webp'" alt="<%= bot.name %>">
|
||||||
<div class="px-6 text-white text-base">
|
<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> </p>
|
<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> </p>
|
||||||
</div>
|
</div>
|
||||||
@@ -278,6 +284,7 @@
|
|||||||
<% }) %>
|
<% }) %>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|||||||
Reference in new issue
Block a user