Added some more style + bumping servers

This commit is contained in:
CorwinDev committed 2022-08-10 20:17:21 +02:00
1 parent c83c27a8ac
commit d91ebbfa25
12 files changed
+248 -254

No files matched your search

+12 -7
View File
@@ -6,9 +6,9 @@ const colors = require('colors');
const bsl = colors.blue("BSL: ");
const ms = require("parse-ms-2");
// Set intents
client.on('ready',async () => {
const bot = await bots.find({ verified: true});
client.user.setPresence({ activities: [{ name: 'botscord.xyz | '+bot.length+' bots' }] });
client.on('ready', async () => {
const bot = await bots.find({ verified: true });
client.user.setPresence({ activities: [{ name: 'botscord.xyz | ' + bot.length + ' bots' }] });
console.log(bsl, 'Bot is ready!');
// Log server count
setTimeout(() => {
@@ -46,14 +46,14 @@ client.on('interactionCreate', async interaction => {
} else if (commandName === 'user') {
const { user } = interaction;
await interaction.reply(`${user.username}#${user.discriminator} has ${user.bot ? 'a bot' : 'no bot'} and is connected to ${user.guilds.size} servers!`);
}else if (commandName === 'help') {
} else if (commandName === 'help') {
await interaction.reply(`
**Commands**
\`ping\` - Replies with pong!
\`topserver\` - Replies with highest server!
\`user\` - Replies with user info and connected bots/servers!
`);
}else if (commandName === 'bump') {
} else if (commandName === 'bump') {
let findServer = await servers.findOne({ id: interaction.guild.id });
if (!findServer) return interaction.reply(
"This server was not found in our list.\nAdd your server: https://botscord.xyz/server/add"
@@ -65,7 +65,12 @@ client.on('interactionCreate', async interaction => {
return interaction.reply(`You can bump again in ${time.minutes}m ${time.seconds}s`);
}
findServer.bump = Date.now();
findServer.bumps++;
if (findServer.bumps == undefined) {
findServer.bumps = 1;
} else {
findServer.bumps++;
}
await findServer.save();
const embed = new EmbedBuilder()
.setColor('#0099ff')
@@ -74,7 +79,7 @@ client.on('interactionCreate', async interaction => {
.setFooter({ iconURL: interaction.user.avatarURL(), text: 'BotsCord' })
.setTimestamp();
await interaction.reply({ embeds: [embed] });
}else if (commandName === 'info') {
} else if (commandName === 'info') {
} else {
await interaction.reply('Command not found!');
+25 -9
View File
@@ -1,27 +1,27 @@
module.exports = {
mongodb: "mongodb+srv://root:RzIhDff90LKkOOjw@cluster0.jo9hd.mongodb.net/?retryWrites=true&w=majority",
mongodb: "mongodb+srv://root:RzIhDff90LKkOOjw@cluster0.jo9hd.mongodb.net/?retryWrites=true&w=majority",
bot: {
id: "934087523649609768",
token: "OTM0MDg3NTIzNjQ5NjA5NzY4.GV-g1-.Eggw57JNtsrLPbakg-_yr8fn8oBAbh0nKfK-lk",
channels:{
channels: {
login: "868065455628234780",
vote: "937643610541793300",
error: "1003947531543269507",
info: "1005178285124239510",
},
bsl : {
bsl: {
id: "870001234583621713",
token: "ODcwMDAxMjM0NTgzNjIxNzEz.GfMe5Y.USVO8IBvKkPIX0PFbYFRgfpctT-wW8sBVmFLQc",
channels:{
vote:"937643610541793300",
error:"1003947531543269507",
channels: {
vote: "937643610541793300",
error: "1003947531543269507",
},
invite:"https://discord.com/api/oauth2/authorize?client_id=870001234583621713&permissions=314433&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Fcallback&response_type=code&scope=applications.commands%20bot"
invite: "https://discord.com/api/oauth2/authorize?client_id=870001234583621713&permissions=314433&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Fcallback&response_type=code&scope=applications.commands%20bot"
}
},
discord:{
discord: {
id: "868065454940385291",
invite:"",
invite: "",
roles: {
admin: "868065454940385291",
mod: "868065454940385291",
@@ -32,6 +32,22 @@ module.exports = {
server: {
port: 3000,
host: "http://localhost:3000",
tags: [
"development",
"fun",
"media",
"company",
"game",
"emoji",
"botlist",
"serverlist",
"turkish",
"support",
"sound",
"chatting",
"nsfw",
"challange"
]
},
users: {
owner: [""],
+4 -1
View File
@@ -27,6 +27,8 @@ const client = new Client({
const bsl = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildPresences,
]
})
client.config = config;
@@ -85,4 +87,5 @@ module.exports.bsl = bsl;
module.exports.embed = EmbedBuilder;
global.client = client;
global.bsl = bsl;
global.config = config;
global.config = config;
global.discord = require('discord.js');
+3 -1
View File
@@ -2,7 +2,9 @@ const mongoose = require("mongoose");
let hm = new mongoose.Schema({
id: String,
name: String,
description: String,
description: {
type: String, maxLength: 20
},
owner: String,
long_description: String,
tags: [String],
+13
View File
@@ -883,6 +883,9 @@ video {
.w-1\/4 {
width: 25%;
}
.w-0 {
width: 0px;
}
.max-w-7xl {
max-width: 80rem;
}
@@ -1097,6 +1100,9 @@ video {
.text-ellipsis {
text-overflow: ellipsis;
}
.text-clip {
text-overflow: clip;
}
.break-words {
overflow-wrap: break-word;
}
@@ -1319,6 +1325,9 @@ video {
.p-2\.5 {
padding: 0.625rem;
}
.p-96 {
padding: 24rem;
}
.px-3 {
padding-left: 0.75rem;
padding-right: 0.75rem;
@@ -2057,6 +2066,10 @@ body {
display: inline-block;
}
.lg\:flex {
display: flex;
}
.lg\:hidden {
display: none;
}
+101 -100
View File
@@ -21,114 +21,115 @@ router.get('/search/:id', function (req, res) {
res.json({
bot: bot,
})
router.use(function (req, res, next) {
if (!req.headers.authorization) {
return res.status(403).json({ error: 'No credentials sent!' });
} else {
bots.findOne({ token: req.headers.authorization }, function (err, bot) {
if (err) {
res.status(503).json({
error: "Something went wrong"
})
}
if (bot) {
if (bot.token == req.headers.authorization) {
next();
}
} else {
res.status(403).json({
error: "Unauthorized"
})
}
})
})
router.use(function (req, res, next) {
if (!req.headers.authorization) {
return res.status(403).json({ error: 'No credentials sent!' });
} else {
bots.findOne({ token: req.headers.authorization }, function (err, bot) {
if (err) {
res.status(503).json({
error: "Something went wrong"
})
}
next();
});
router.post('/bots/servers', function (req, res) {
if (req.headers.authorization) {
bots.findOne({ token: req.headers.authorization }, function (err, bot) {
if (err) {
res.status(503).json({
error: "Something went wrong"
})
}
if (bot) {
if (bot.token == req.headers.authorization) {
bot.servers = req.headers.servercount;
bot.save(function (err) {
if (err) {
res.status(503).json({
error: "Something went wrong"
})
} else {
res.status(200).json({
message: "Success"
})
}
if (bot) {
if (bot.token == req.headers.authorization) {
next();
}
} else {
res.status(403).json({
error: "Unauthorized"
})
}
})
}
next();
});
router.post('/bots/servers', function (req, res) {
if (req.headers.authorization) {
bots.findOne({ token: req.headers.authorization }, function (err, bot) {
if (err) {
res.status(503).json({
error: "Something went wrong"
})
}
if (bot) {
if (bot.token == req.headers.authorization) {
bot.servers = req.headers.servercount;
bot.save(function (err) {
if (err) {
res.status(503).json({
error: "Something went wrong"
})
} else {
res.status(403).json({
error: "Invalid token or bot"
res.status(200).json({
message: "Success"
})
}
} else {
res.status(403).json({
error: "Invalid token or bot"
})
}
})
})
} else {
res.status(403).json({
error: "Invalid token or bot"
})
}
} else {
res.status(401).json({
message: "Please provide a bot token"
res.status(403).json({
error: "Invalid token or bot"
})
}
});
router.get('/bots/search/:id', function (req, res) {
bots.findOne({ id: req.params.id }, function (err, bot) {
if (err) {
res.status(503).json({
error: "Something went wrong"
})
}
if (bot) {
res.status(200).json({
id: bot.id,
name: bot.name,
description: bot.description,
long_description: bot.long_description,
tags: bot.tags,
owners: bot.owners,
premium: bot.premium,
servers: bot.servers,
users: bot.users,
votes: bot.votes
})
} else {
res.status(403).json({
error: "No bot found"
})
}
});
});
router.get('/bots/check/:id', function (req, res) {
votes.findOne({ user: req.params.id }, function (err, vote) {
if (err) {
res.status(503).json({
error: "Something went wrong"
})
}
if (vote) {
res.status(200).json({
vote: true
})
} else {
res.status(403).json({
vote: false
})
}
});
})
} else {
res.status(401).json({
message: "Please provide a bot token"
})
}
});
module.exports = router;
router.get('/bots/search/:id', function (req, res) {
bots.findOne({ id: req.params.id }, function (err, bot) {
if (err) {
res.status(503).json({
error: "Something went wrong"
})
}
if (bot) {
res.status(200).json({
id: bot.id,
name: bot.name,
description: bot.description,
long_description: bot.long_description,
tags: bot.tags,
owners: bot.owners,
premium: bot.premium,
servers: bot.servers,
users: bot.users,
votes: bot.votes
})
} else {
res.status(403).json({
error: "No bot found"
})
}
});
});
router.get('/bots/check/:id', function (req, res) {
votes.findOne({ user: req.params.id }, function (err, vote) {
if (err) {
res.status(503).json({
error: "Something went wrong"
})
}
if (vote) {
res.status(200).json({
vote: true
})
} else {
res.status(403).json({
vote: false
})
}
});
})
module.exports = router;
+63 -81
View File
@@ -1,15 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=, initial-scale=1.0">
<title>BotsCord |
<% if (typeof title !="undefined" ) { %>
<%= title %>
<% } else { %>
Home
<% } %>
<%= title %>
<% } else { %>
Home
<% } %>
</title>
<link href="/css/style.css" rel="stylesheet">
<script src="https://kit.fontawesome.com/204113bb1b.js" crossorigin="anonymous"></script>
@@ -19,24 +20,24 @@
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
<link rel="manifest" href="/img/site.webmanifest">
<!-- 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="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">
<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 %>
­
🟢 <%= 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">
<% } %>
<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">
@@ -47,27 +48,19 @@
</script>
<div class="p-2 pl-5 pr-5 bg-blue-color">
<!-- navbar in tailwind with login buttons -->
<nav class="flex flex-wrap p-6 bg-blue-color">
<div class="flex items-center flex-shrink-0 text-white mr-6">
<!-- logo -->
<a href="/">
<img class="mx-auto w-auto h-8" src="/img/logo.png" alt="logo">
</a>
<a href="/" class="font-semibold text-xl tracking-tight">&nbsp;BotsCord</a>
</div>
<button data-collapse-toggle="navbar-solid-bg" type="button"
class="inline-flex justify-end items-end ml-3 text-gray-400 rounded-lg lg:hidden hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-blue-300 dark:text-gray-400 dark:hover:text-white dark:focus:ring-gray-500"
aria-controls="navbar-solid-bg" aria-expanded="false" id="trigger">
<nav class="block lg:flex p-6 bg-blue-color text-white">
<!-- logo -->
<a href="/">
<img class="mx-auto w-auto h-8" src="/img/logo.png" alt="logo">
</a>
<a href="/" class="font-semibold text-xl tracking-tight">&nbsp;BotsCord &nbsp;</a>
<button data-collapse-toggle="navbar-solid-bg" type="button" class="float-right text-gray-400 rounded-lg lg:hidden hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-blue-300 dark:text-gray-400 dark:hover:text-white dark:focus:ring-gray-500" aria-controls="navbar-solid-bg" aria-expanded="false" id="trigger">
<span class="sr-only">Open main menu</span>
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
clip-rule="evenodd"></path>
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd"></path>
</svg>
</button>
<div class="w-full hidden lg:block flex-grow lg:items-center lg:w-auto content-center items-center"
id="navbar-solid-bg">
<div class="w-0 hidden lg:block flex-grow lg:items-center lg:w-auto content-center items-center" id="navbar-solid-bg">
<div class="flex">
<div class="text-sm lg:flex-grow">
<a href="/bots" class="block lg:inline-block lg:mt-0 text-white hover:text-white mr-4 text-lg">
@@ -78,28 +71,20 @@
<li class="fa fa-server mr-1"></li>
Servers
</a>
<a href="#" class="block lg:inline-block lg:mt-0 text-white hover:text-white mr-4 text-lg" id="menu-button">
<li class="fa fa-bars"></li> More
</a>
<div class="relative inline-block text-left">
<div>
<button type="button" class="block lg:inline-block lg:mt-0 text-white hover:text-white mr-4 text-lg"
id="menu-button" aria-expanded="true" aria-haspopup="true">
<li class="fa more"></li> More
</button>
</div>
<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"
role="menu" aria-orientation="vertical" aria-labelledby="menu-button" tabindex="-1" id="dropdown"
style="z-index: 99 !important;">
<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" 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="/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>
</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>
<a href="/me/servers" class="text-gray-700 block px-4 py-2 text-sm" role="menuitem" tabindex="-1"
id="menu-item-3">
<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>
<a href="/me/servers" class="text-gray-700 block px-4 py-2 text-sm" role="menuitem" tabindex="-1" id="menu-item-3">
<li class="fa fa-server mr-1"></li>Edit server
</a>
</div>
@@ -108,38 +93,35 @@
<!-- dropdown menu with tailwindcss -->
</div>
<% if (typeof user=="undefined" ) { %>
<a href="/auth"
class="inline-block text-sm px-4 py-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-blue-color hover:bg-white mt-4 lg:mt-0">Login</a>
<% }else { %>
<a href="/profile"
class="inline-block text-sm px-4 py-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-blue-color hover:bg-white mt-4 lg:mt-0">Profile</a>
<a href="/auth/logout"
class="inline-block text-sm px-4 py-2 leading-none border rounded text-white border-red-500 hover:border-transparent hover:text-blue-color hover:bg-white mt-4 lg:mt-0">Logout</a>
<% } %>
<a href="/auth" class="inline-block text-sm px-4 py-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-blue-color hover:bg-white mt-4 lg:mt-0 w-fit h-fit">Login</a>
<% }else { %>
<a href="/profile" class="inline-block text-sm px-4 py-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-blue-color hover:bg-white mt-4 lg:mt-0 w-fit h-fit">Profile</a>
<a href="/auth/logout" class="inline-block text-sm px-4 py-2 leading-none border rounded text-white border-red-500 hover:border-transparent hover:text-blue-color hover:bg-white mt-4 lg:mt-0 w-fit h-fit">Logout</a>
<% } %>
</div>
</div>
</nav>
<% if (typeof error !="undefined" ) { %>
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative" role="alert">
<strong class="font-bold">Holy Cows!</strong>
<span class="block sm:inline"><br>
<%= error %>
</span>
</div>
<% } %>
<% if (typeof message !="undefined" ) { %>
<div class="bg-white border border-blue-400 text-blue-700 px-4 py-3 rounded relative" role="alert">
<strong class="font-bold">Alert!</strong>
<span class="block sm:inline"><br>
<%= message %>
</span>
</div>
<% } %>
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative" role="alert">
<strong class="font-bold">Holy Cows!</strong>
<span class="block sm:inline"><br>
<%= error %>
</span>
</div>
<% } %>
<% if (typeof message !="undefined" ) { %>
<div class="bg-white border border-blue-400 text-blue-700 px-4 py-3 rounded relative" role="alert">
<strong class="font-bold">Alert!</strong>
<span class="block sm:inline"><br>
<%= message %>
</span>
</div>
<% } %>
</div>
<script>
const targetEl = document.getElementById("navbar-solid-bg");
const triggerEl = document.getElementById("trigger");
triggerEl.addEventListener("click", function () {
triggerEl.addEventListener("click", function() {
if (targetEl.classList.contains("hidden")) {
targetEl.classList.remove("hidden");
} else {
@@ -148,7 +130,7 @@
});
const dropdown = document.getElementById("menu-button");
const dropdownMenu = document.getElementById("dropdown");
dropdown.addEventListener("click", function () {
dropdown.addEventListener("click", function() {
if (dropdownMenu.classList.contains("hidden")) {
dropdownMenu.classList.remove("hidden");
} else {
+7 -7
View File
@@ -68,7 +68,7 @@
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<% bot.tags.slice(-3).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>
<% }) %>
@@ -112,7 +112,7 @@
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<% bot.tags.slice(-3).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>
<% }) %>
@@ -163,7 +163,7 @@
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<% bot.tags.slice(-3).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>
<% }) %>
@@ -188,7 +188,7 @@
<img class="w-full rounded-full" src="<%= bot.icon %> " onerror="this.src='/img/logo.webp'" alt="<%= bot.name %>">
<% if (bot.votes){ %>
<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>&nbsp;<%=bot.bump %></span>
<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>
<% } %>
@@ -202,7 +202,7 @@
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<% bot.tags.slice(-3).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>
<% }) %>
@@ -233,7 +233,7 @@
<img class="w-full rounded-full" src="<%= bot.icon %> " onerror="this.src='/img/logo.webp'" alt="<%= bot.name %>">
<% if (bot.votes){ %>
<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>
<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 class="px-6 py-4">
@@ -246,7 +246,7 @@
</div>
<% if(bot.tags) {%>
<div class="px-6 pt-4 pb-2">
<% bot.tags.forEach(tag=>{ %>
<% bot.tags.slice(-3).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>
<% }) %>
+6 -14
View File
@@ -32,20 +32,12 @@
</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>
<% var tags = global.config.server.tags %>
<% tags.forEach(function(tag) { %>
<option value="<%= tag %>">
<%= tag %>
</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>
+4 -28
View File
@@ -17,36 +17,12 @@
<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">
<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 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>
<% global.config.server.tags.forEach(function(tag) { %>
<option value="<%= tag %>" <% if (server.tags.includes(tag)) { %>selected<% } %>><%= tag %></option>
<% }) %>
</select>
</div><br>
<!--<h1 class="text-xl text-white">This token can be used to access your server via our api</h1>
<div class="relative z-0 mb-6 w-full group">
<input type="text" name="token" id="token" 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.token %>" onclick="copy()" />
<label for="token" 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">Token</label>
</div>
<script>
function copy() {
var copyText = document.getElementById("token");
copyText.select();
copyText.setSelectionRange(0, 99999);
navigator.clipboard.writeText(copyText.value);
}
</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>
+10 -6
View File
@@ -1,8 +1,10 @@
<%- 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 class="p-10 bg-blue-color w-2/3 text-white h-full m-4 mx-14 text-ellipsis">
<p class="text-white text-clip">
<pre style="white-space: pre-wrap;" class="text-clip break-words w-full h-full"><br><%= server.long_description %></pre>
</p>
</div>
<div class="bg-blue-color w-1/4 p-10 text-white h-full m-4 ">
<img class="w-full rounded-full" src="<%= serverr.icon %>" alt="<%= server.name %>" onerror="this.src='/img/logo.png'">
@@ -13,14 +15,16 @@
Vote</a>
<a href="/server/<%= server.id %>/join" class="button float-right inline-block bg-button-primary rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 mb-2"><i class="fa fa-link"></i>
Join</a>
<br>
<br>
<% 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 user-crown"></i>Owner Options
</div>
<a href="/server/<%= server.id %>/settings" class="mt-1">
<div class="box-2-p"><i class="mt-1 fa fa-pencil"></i><p class="box-2">Edit Server</p></div>
<div class="box-2-p"><i class="mt-1 fa fa-pencil"></i>
<p class="box-2">Edit Server</p>
</div>
</a>
<% } } } %>
<h6 class="text-xl mt-4">
@@ -33,7 +37,7 @@
</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 class="box-2">Members:&nbsp;<%= serverr.memberCount.toLocaleString().replace(',', '.' ) %>/ <%= global.bsl.guilds.cache.get(server.id).members.cache.filter(a => a.presence?.status != 'dnd').size %> online
</p>
</div>
<div class="mt-1">
@@ -59,7 +63,7 @@
<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 =>{
<% serverr.members.cache.filter(a=> !a.user.bot && a.permissions.has(global.discord.PermissionsBitField.Flags.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%;">
View File
Whitespace-only changes.