update
This commit is contained in:
1 parent
29fff68ff0
commit
f16305c6ad
25 files changed
+1077
-348
No files matched your search
@@ -18,6 +18,7 @@ let hm = new mongoose.Schema({
|
|||||||
analytics: Object,
|
analytics: Object,
|
||||||
analytics_visitors: Number,
|
analytics_visitors: Number,
|
||||||
analytics_invites: Number,
|
analytics_invites: Number,
|
||||||
|
vanity: String,
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = mongoose.model("bots", hm);
|
module.exports = mongoose.model("bots", hm);
|
||||||
@@ -18,6 +18,7 @@ let hm = new mongoose.Schema({
|
|||||||
analytics_visitors: Number,
|
analytics_visitors: Number,
|
||||||
analytics_joins: Number,
|
analytics_joins: Number,
|
||||||
country: Object,
|
country: Object,
|
||||||
|
vanity: String,
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = mongoose.model("servers", hm);
|
module.exports = mongoose.model("servers", hm);
|
||||||
@@ -44,11 +44,14 @@
|
|||||||
"passport": "^0.6.0",
|
"passport": "^0.6.0",
|
||||||
"passport-discord": "^0.1.4",
|
"passport-discord": "^0.1.4",
|
||||||
"request": "^2.88.2",
|
"request": "^2.88.2",
|
||||||
|
"sanitize-html": "^2.7.1",
|
||||||
"showdown": "^2.1.0",
|
"showdown": "^2.1.0",
|
||||||
"tailwindcss": "^3.1.7",
|
"tailwindcss": "^3.1.7",
|
||||||
"url": "^0.11.0"
|
"url": "^0.11.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@tailwindcss/typography": "^0.5.4",
|
||||||
|
"@types/sanitize-html": "^2.6.2",
|
||||||
"postcss-nesting": "^10.1.10"
|
"postcss-nesting": "^10.1.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,5 +2,6 @@ module.exports = {
|
|||||||
plugins: [
|
plugins: [
|
||||||
require('tailwindcss'),
|
require('tailwindcss'),
|
||||||
require('autoprefixer'),
|
require('autoprefixer'),
|
||||||
|
require('@tailwindcss/typography'),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
+3
-1
@@ -4,6 +4,7 @@ module.exports = {
|
|||||||
"./website/**/*.{html,css}",
|
"./website/**/*.{html,css}",
|
||||||
"./website/views/*.ejs",
|
"./website/views/*.ejs",
|
||||||
"./website/views/**/*.ejs",
|
"./website/views/**/*.ejs",
|
||||||
|
"./website/views/**/**/*.ejs",
|
||||||
],
|
],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {
|
extend: {
|
||||||
@@ -19,12 +20,13 @@ module.exports = {
|
|||||||
serif: ["Georgia", "serif"],
|
serif: ["Georgia", "serif"],
|
||||||
mono: ["Menlo", "monospace"]
|
mono: ["Menlo", "monospace"]
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
{
|
{
|
||||||
tailwindcss: {},
|
tailwindcss: {},
|
||||||
autoprefixer: {},
|
autoprefixer: {},
|
||||||
|
typography: {}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
+34
-4
@@ -9,7 +9,7 @@ const colors = require('colors');
|
|||||||
const commands = [
|
const commands = [
|
||||||
new SlashCommandBuilder().setName('ping').setDescription('Replies with pong!'),
|
new SlashCommandBuilder().setName('ping').setDescription('Replies with pong!'),
|
||||||
new SlashCommandBuilder().setName('topvoted').setDescription('Replies with highest server/bots!'),
|
new SlashCommandBuilder().setName('topvoted').setDescription('Replies with highest server/bots!'),
|
||||||
new SlashCommandBuilder().setName('user').setDescription('Replies with user info and connected bots/servers!'),
|
new SlashCommandBuilder().setName('profile').setDescription('Replies with user info and connected bots/servers!'),
|
||||||
new SlashCommandBuilder().setName('queue').setDescription('Replies with queue'),
|
new SlashCommandBuilder().setName('queue').setDescription('Replies with queue'),
|
||||||
]
|
]
|
||||||
.map(command => command.toJSON());
|
.map(command => command.toJSON());
|
||||||
@@ -60,8 +60,38 @@ client.on('interactionCreate', async interaction => {
|
|||||||
interaction.reply({ embeds: [embed] });
|
interaction.reply({ embeds: [embed] });
|
||||||
} else if (commandName === 'user') {
|
} else if (commandName === 'user') {
|
||||||
const { user } = interaction;
|
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!`);
|
bots.find({ owner: user.id }).then(bots => {
|
||||||
|
var bots1 = bots
|
||||||
|
.map(
|
||||||
|
a => `${a.name} | ${a.id} **[ \`${a.votes}\` Votes ]**`
|
||||||
|
)
|
||||||
|
.join('\n');
|
||||||
|
if (!bots1) {
|
||||||
|
var bots1 = 'no bots';
|
||||||
|
}
|
||||||
|
const embed = new EmbedBuilder()
|
||||||
|
.setAuthor({ name: interaction.user.tag, iconURL: interaction.user.avatarURL({ dynamic: true }) })
|
||||||
|
.setColor("#7289da")
|
||||||
|
.setDescription(`**Bots owned by ${user.tag}**\n${bots1}`)
|
||||||
|
interaction.reply({ embeds: [embed] });
|
||||||
|
}).catch(console.error);
|
||||||
|
} else if (commandName === 'profile') {
|
||||||
|
bots.find({ owner: interaction.user.id }).then(async function(bots){
|
||||||
|
var bots1 = bots
|
||||||
|
.map(
|
||||||
|
a => `${a.name} | ${a.id} **[ \`${a.votes}\` Votes ]**`
|
||||||
|
)
|
||||||
|
.join('\n');
|
||||||
|
if (!bots1) {
|
||||||
|
var bots1 = 'no bots';
|
||||||
|
}
|
||||||
|
var user = await users.findOne({ id: user.id });
|
||||||
|
const embed = new EmbedBuilder()
|
||||||
|
.setAuthor({ name: interaction.user.tag, iconURL: interaction.user.avatarURL({ dynamic: true }) })
|
||||||
|
.setColor("#7289da")
|
||||||
|
.setDescription(`**Bots owned by ${user.tag}**\n${bots1}\nCoins: ${user.coins}`)
|
||||||
|
interaction.reply({ embeds: [embed] });
|
||||||
|
})
|
||||||
} else if (commandName === 'queue') {
|
} else if (commandName === 'queue') {
|
||||||
if (!global.config.users.owner.includes(interaction.user.id) && !global.config.users.verificator.includes(interaction.user.id)) return interaction.reply('You are not allowed to use this command!');
|
if (!global.config.users.owner.includes(interaction.user.id) && !global.config.users.verificator.includes(interaction.user.id)) return interaction.reply('You are not allowed to use this command!');
|
||||||
const unVerified = await bots.find({ verified: false });
|
const unVerified = await bots.find({ verified: false });
|
||||||
@@ -102,7 +132,7 @@ var cooldown = [];
|
|||||||
client.on("messageCreate", async (message) => {
|
client.on("messageCreate", async (message) => {
|
||||||
if (message.author.bot) return;
|
if (message.author.bot) return;
|
||||||
if (message.channel.type === "dm") return;
|
if (message.channel.type === "dm") return;
|
||||||
if (cooldown.some(code => code.id === message.author.id)){
|
if (cooldown.some(code => code.id === message.author.id)) {
|
||||||
var userr = cooldown.findIndex((obj => obj.id == message.author.id));
|
var userr = cooldown.findIndex((obj => obj.id == message.author.id));
|
||||||
cooldown[userr].message += 1;
|
cooldown[userr].message += 1;
|
||||||
if (cooldown[userr].message >= 15) {
|
if (cooldown[userr].message >= 15) {
|
||||||
|
|||||||
+3
-3
@@ -166,9 +166,9 @@ app.get('/tag/:id', async (req, res) => {
|
|||||||
});
|
});
|
||||||
app.get('/i/:id', async (req, res) => {
|
app.get('/i/:id', async (req, res) => {
|
||||||
var id = req.params.id.toLowerCase();
|
var id = req.params.id.toLowerCase();
|
||||||
var bott = await bots.findOne({ name: { $regex: req.params.id }});
|
var bott = await bots.findOne({ vanity: id });
|
||||||
if(!bott){
|
if(!bott){
|
||||||
var serverr = await server.findOne({ name: { $regex: req.params.id }});
|
var serverr = await server.findOne({ vanity: id });
|
||||||
if(!serverr){
|
if(!serverr){
|
||||||
res.redirect('/');
|
res.redirect('/');
|
||||||
return
|
return
|
||||||
@@ -176,7 +176,7 @@ app.get('/i/:id', async (req, res) => {
|
|||||||
res.redirect('/server/' + serverr.id + '/join');
|
res.redirect('/server/' + serverr.id + '/join');
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
res.redirect('/bot/' + bott.id + '/join');
|
res.redirect('/bot/' + bott.id + '/invite');
|
||||||
return
|
return
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
+578
-138
File diff suppressed because it is too large.
Load diff
@@ -44,49 +44,3 @@ body {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
:root {
|
|
||||||
--bg: #18191C;
|
|
||||||
--blue-color-hover: #4554F2;
|
|
||||||
--bg-section-hover: #27282D;
|
|
||||||
--color-result-shadow: #1E2023;
|
|
||||||
--bg-button-dark: #1E2023;
|
|
||||||
--bg-button-dark-hover: #26282B;
|
|
||||||
--bg-footer: #27282D;
|
|
||||||
--form-background: #18191C;
|
|
||||||
--form-input: #1E2023;
|
|
||||||
--input-disabled: #26282B;
|
|
||||||
--tooltip-bg: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-theme="light"] {
|
|
||||||
--bg-card: #D4D5D7;
|
|
||||||
--bg-section: #5865F2;
|
|
||||||
--bg-section-hover: #ECECEC;
|
|
||||||
--text-section-hover: #000;
|
|
||||||
--text-section: #fff;
|
|
||||||
--bg-body: #F5F5F5;
|
|
||||||
--button-green: #5865F2;
|
|
||||||
--button-green-hover: #4554F2;
|
|
||||||
--button-text-section: #fff;
|
|
||||||
--button-text: #000;
|
|
||||||
--color-result-shadow: #ECECEC;
|
|
||||||
--color-result-text: #000;
|
|
||||||
--body-text: #000;
|
|
||||||
--body-icon: #5865F2;
|
|
||||||
--bg-button-dark: #ECECEC;
|
|
||||||
--bg-button-dark-hover: #C7C6C6;
|
|
||||||
--bg-footer: #515CDA;
|
|
||||||
--footer-text: #fff;
|
|
||||||
--footer-text-hover: #18191C;
|
|
||||||
--color-dropdown: #D4D5D7;
|
|
||||||
--button-text-section: #fff;
|
|
||||||
--form-background: #D4D5D7;
|
|
||||||
--form-input: #ECECEC;
|
|
||||||
--input-disabled: #C7C6C6;
|
|
||||||
--label-color: #000;
|
|
||||||
--input-color: #000;
|
|
||||||
--tooltip-bg: #000;
|
|
||||||
--tooltip-text: #fff;
|
|
||||||
}*/
|
|
||||||
@@ -25,14 +25,23 @@ router.get('/', async function (req, res) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
router.get('/bot/:d', async function (req, res) {
|
router.get('/bot/:d/:f', async function (req, res) {
|
||||||
if (req.user) {
|
if (req.user) {
|
||||||
if (global.config.users.verificator.includes(req.user.id) || global.config.users.owner.includes(req.user.id)) {
|
if (global.config.users.verificator.includes(req.user.id) || global.config.users.owner.includes(req.user.id)) {
|
||||||
const bot = await bots.find({ id: req.params.d });
|
const bot = await bots.find({ id: req.params.d });
|
||||||
res.render('admin/bot', {
|
if (req.params.f == 'reject') {
|
||||||
user: req.user,
|
res.render('admin/bot', {
|
||||||
bots: bot
|
user: req.user,
|
||||||
});
|
bots: bot,
|
||||||
|
reject: true
|
||||||
|
});
|
||||||
|
} else if (req.params.f == 'accept') {
|
||||||
|
res.render('admin/bot', {
|
||||||
|
user: req.user,
|
||||||
|
bots: bot,
|
||||||
|
accept: true
|
||||||
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
res.redirect('/');
|
res.redirect('/');
|
||||||
}
|
}
|
||||||
@@ -42,4 +51,83 @@ router.get('/bot/:d', async function (req, res) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
router.get('/bot/:d/:f', async function (req, res) {
|
||||||
|
if (req.user) {
|
||||||
|
if (global.config.users.verificator.includes(req.user.id) || global.config.users.owner.includes(req.user.id)) {
|
||||||
|
var bot = await bots.findOne({ id: req.params.d });
|
||||||
|
if (!bot) {
|
||||||
|
return res.redirect('/');
|
||||||
|
}
|
||||||
|
if (req.params.f == 'reject') {
|
||||||
|
res.render('admin/bot', {
|
||||||
|
user: req.user,
|
||||||
|
bots: bot,
|
||||||
|
accept: true
|
||||||
|
});
|
||||||
|
} else if (req.params.f == 'verify') {
|
||||||
|
res.render('admin/bot', {
|
||||||
|
user: req.user,
|
||||||
|
bots: bot,
|
||||||
|
verify: true
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
res.redirect('/admin');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
res.redirect('/');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
req.session.backURL = req.originalUrl;
|
||||||
|
res.redirect('/auth');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
router.post('/bot/:d/:f', async function (req, res) {
|
||||||
|
if (req.user) {
|
||||||
|
if (global.config.users.verificator.includes(req.user.id) || global.config.users.owner.includes(req.user.id)) {
|
||||||
|
var bot = await bots.findOne({ id: req.params.d });
|
||||||
|
if (!bot) {
|
||||||
|
res.redirect('/admin');
|
||||||
|
}
|
||||||
|
if (req.params.f == 'reject') {
|
||||||
|
bot.owners.forEach(async function (owner) {
|
||||||
|
global.client.users.fetch(owner).then(async function (user) {
|
||||||
|
try {
|
||||||
|
user.send(`Your bot ${bot.name} has been rejected by the admin. With the reason: ${req.body.reason}`);
|
||||||
|
global.client.channels.cache.get(global.config.bot.channels.new).send(`${bot.name} has been rejected by the admin. With the reason: ${req.body.reason}`);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
var rem = await bots.findOneAndDelete({ id: req.params.d })
|
||||||
|
if (rem) {
|
||||||
|
res.redirect('/admin');
|
||||||
|
} else {
|
||||||
|
res.redirect('/admin');
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (req.params.f == 'verify') {
|
||||||
|
bot.verified = true;
|
||||||
|
bot.save();
|
||||||
|
bot.owners.forEach(async function (owner) {
|
||||||
|
global.client.users.fetch(owner).then(async function (user) {
|
||||||
|
try {
|
||||||
|
user.send(`Your bot ${bot.name} has been accepted by the admin.`);
|
||||||
|
global.client.channels.cache.get(global.config.bot.channels.new).send(`${bot.name} has been accepted by the admin. View it at: https://botscord.xyz/bot/${bot.id}`);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
res.redirect('/admin');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
res.redirect('/');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
req.session.backURL = req.originalUrl;
|
||||||
|
res.redirect('/auth');
|
||||||
|
}
|
||||||
|
})
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
+186
-69
@@ -5,6 +5,9 @@ var votes = require('../../../models/votes');
|
|||||||
const client = require('../../index');
|
const client = require('../../index');
|
||||||
var getIP = require('ipware')().get_ip;
|
var getIP = require('ipware')().get_ip;
|
||||||
var geoip = require('geoip-lite');
|
var geoip = require('geoip-lite');
|
||||||
|
var showdown = require('showdown'),
|
||||||
|
converter = new showdown.Converter()
|
||||||
|
const sanitizeHtml = require('sanitize-html');
|
||||||
|
|
||||||
function makeid(length) {
|
function makeid(length) {
|
||||||
var result = '';
|
var result = '';
|
||||||
@@ -22,7 +25,11 @@ router.get('/', function () {
|
|||||||
})
|
})
|
||||||
router.get('/add', function (req, res) {
|
router.get('/add', function (req, res) {
|
||||||
if (req.user) {
|
if (req.user) {
|
||||||
res.render('bot/add', { user: req.user });
|
res.render('bot/add', {
|
||||||
|
user: req.user,
|
||||||
|
message: req.session.message || undefined,
|
||||||
|
error: req.session.error || undefined,
|
||||||
|
});
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
req.session.backURL = req.originalUrl;
|
req.session.backURL = req.originalUrl;
|
||||||
@@ -81,63 +88,96 @@ router.get('/:botID', async function (req, res) {
|
|||||||
req.session.error = "No bot found";
|
req.session.error = "No bot found";
|
||||||
return res.redirect('/');
|
return res.redirect('/');
|
||||||
}
|
}
|
||||||
let referresURL = String(req.headers.referer).replace("undefined", "Unkown").split('.').join(',');
|
if (bot.verified == false) {
|
||||||
await bots.updateOne({
|
if(!req.user) {
|
||||||
id: req.params.botID
|
req.backURL = req.originalUrl;
|
||||||
}, {
|
return res.redirect('/auth');
|
||||||
$inc: {
|
|
||||||
analytics_visitors: 1
|
|
||||||
}
|
}
|
||||||
})
|
if (bot.owners.includes(req.user.id)) {
|
||||||
|
let coowner = new Array()
|
||||||
var ipInfo = getIP(req);
|
await bot.owners.forEach(async function (a) {
|
||||||
var ip = ipInfo.clientIp;
|
try {
|
||||||
var geo = geoip.lookup(ip);
|
var b = await global.bsl.users.fetch(a)
|
||||||
|
} catch (e) {
|
||||||
if (geo) {
|
}
|
||||||
let CountryCode = geo.country || "TR"
|
if (!b) return;
|
||||||
|
coowner.push(b)
|
||||||
|
})
|
||||||
|
var html = converter.makeHtml(bot.long_description);
|
||||||
|
html = sanitizeHtml(html)
|
||||||
|
res.render('bot/index', {
|
||||||
|
bot: bot,
|
||||||
|
user: req.user,
|
||||||
|
owners: coowner,
|
||||||
|
bota: await global.bsl.users.fetch(bot.id),
|
||||||
|
description: html
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
req.session.error = "Bot not verified";
|
||||||
|
return res.redirect('/');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let referresURL = String(req.headers.referer).replace("undefined", "Unkown").split('.').join(',');
|
||||||
await bots.updateOne({
|
await bots.updateOne({
|
||||||
id: req.params.botID
|
id: req.params.botID
|
||||||
}, {
|
}, {
|
||||||
$inc: {
|
$inc: {
|
||||||
[`country.${CountryCode}`]: 1
|
analytics_visitors: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
await bots.updateOne({
|
var ipInfo = getIP(req);
|
||||||
id: req.params.botID
|
var ip = ipInfo.clientIp;
|
||||||
}, {
|
var geo = geoip.lookup(ip);
|
||||||
$inc: {
|
|
||||||
[`analytics.${referresURL}`]: 1
|
if (geo) {
|
||||||
|
let CountryCode = geo.country || "TR"
|
||||||
|
await bots.updateOne({
|
||||||
|
id: req.params.botID
|
||||||
|
}, {
|
||||||
|
$inc: {
|
||||||
|
[`country.${CountryCode}`]: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
await bots.updateOne({
|
||||||
let coowner = new Array()
|
id: req.params.botID
|
||||||
await bot.owners.forEach(async function (a) {
|
}, {
|
||||||
|
$inc: {
|
||||||
|
[`analytics.${referresURL}`]: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let coowner = new Array()
|
||||||
|
await bot.owners.forEach(async function (a) {
|
||||||
|
try {
|
||||||
|
var b = await global.bsl.users.fetch(a)
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
|
if (!b) return;
|
||||||
|
coowner.push(b)
|
||||||
|
})
|
||||||
try {
|
try {
|
||||||
var b = await global.bsl.users.fetch(a)
|
var bota = await global.bsl.users.fetch(bot.id)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
if (!bota) {
|
||||||
|
req.session.error = "No bot found";
|
||||||
|
return res.redirect('/');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!b) return;
|
|
||||||
coowner.push(b)
|
|
||||||
})
|
|
||||||
try {
|
|
||||||
var bota = await global.bsl.users.fetch(bot.id)
|
|
||||||
} catch (e) {
|
|
||||||
if (!bota) {
|
if (!bota) {
|
||||||
req.session.error = "No bot found";
|
req.session.error = "No bot found";
|
||||||
return res.redirect('/');
|
return res.redirect('/');
|
||||||
}
|
}
|
||||||
|
var html = converter.makeHtml(bot.long_description);
|
||||||
|
html = sanitizeHtml(html)
|
||||||
|
res.render('bot/index', {
|
||||||
|
bot: bot,
|
||||||
|
user: req.user,
|
||||||
|
owners: coowner,
|
||||||
|
bota: await global.bsl.users.fetch(bot.id),
|
||||||
|
description: html
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (!bota) {
|
|
||||||
req.session.error = "No bot found";
|
|
||||||
return res.redirect('/');
|
|
||||||
}
|
|
||||||
res.render('bot/index', {
|
|
||||||
bot: bot,
|
|
||||||
user: req.user,
|
|
||||||
owners: coowner,
|
|
||||||
bota: bota
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -155,11 +195,17 @@ router.get('/:botID/settings', async function (req, res) {
|
|||||||
req.session.error = "No bot found";
|
req.session.error = "No bot found";
|
||||||
return res.redirect('/');
|
return res.redirect('/');
|
||||||
}
|
}
|
||||||
res.render('bot/edit', {
|
if (bot.owners.includes(req.user.id)) {
|
||||||
bot: bot,
|
res.render('bot/edit', {
|
||||||
user: req.user,
|
bot: bot,
|
||||||
});
|
user: req.user,
|
||||||
|
message: req.session.message || undefined,
|
||||||
|
error: req.session.error || undefined,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
req.session.error = "You are not the owner of this bot";
|
||||||
|
res.redirect('/');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -178,12 +224,18 @@ router.get('/:botID/analytics', async function (req, res) {
|
|||||||
req.session.error = "No bot found";
|
req.session.error = "No bot found";
|
||||||
return res.redirect('/');
|
return res.redirect('/');
|
||||||
}
|
}
|
||||||
res.render('bot/analytics', {
|
if (bot.owners.includes(req.user.id)) {
|
||||||
bot: bot,
|
res.render('bot/analytics', {
|
||||||
user: req.user,
|
bot: bot,
|
||||||
bota: await global.bsl.users.fetch(bot.id)
|
user: req.user,
|
||||||
});
|
bota: await global.bsl.users.fetch(bot.id),
|
||||||
|
message: req.session.message || undefined,
|
||||||
|
error: req.session.error || undefined,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
req.session.error = "You are not the owner of this bot";
|
||||||
|
res.redirect('/');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -203,25 +255,65 @@ router.post('/:botID/settings', async function (req, res) {
|
|||||||
return res.redirect('/');
|
return res.redirect('/');
|
||||||
}
|
}
|
||||||
if (!bot.owners.includes(req.user.id)) {
|
if (!bot.owners.includes(req.user.id)) {
|
||||||
|
|
||||||
|
|
||||||
req.session.error = "You do not have permission to edit this bot";
|
req.session.error = "You do not have permission to edit this bot";
|
||||||
return res.redirect('/');
|
return res.redirect('/');
|
||||||
}
|
}
|
||||||
bot.name = req.body.bot_name;
|
bots.findOne({ vanity: req.body.bot_vanity }, async function (err, bot2) {
|
||||||
bot.description = req.body.bot_short;
|
|
||||||
bot.long_description = req.body.bot_description;
|
|
||||||
bot.save(function (err) {
|
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
req.session.error = "Something went wrong";
|
return res.redirect('/');
|
||||||
res.redirect('/');
|
}
|
||||||
|
if (bot2) {
|
||||||
|
if (bot2.id != bot.id) {
|
||||||
|
req.session.error = "This vanity is already in use";
|
||||||
|
return res.redirect('/');
|
||||||
|
} else {
|
||||||
|
|
||||||
|
bot.name = req.body.bot_name;
|
||||||
|
bot.description = req.body.bot_short;
|
||||||
|
bot.long_description = req.body.bot_description;
|
||||||
|
bot.vanity = req.body.bot_vanity.toLowerCase();
|
||||||
|
bot.save(function (err) {
|
||||||
|
if (err) {
|
||||||
|
console.log(err);
|
||||||
|
req.session.error = "Something went wrong";
|
||||||
|
res.redirect('/');
|
||||||
|
} else {
|
||||||
|
req.session.message = "Bot updated";
|
||||||
|
res.redirect('/bot/' + req.params.botID + '/settings');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
req.session.message = "Bot updated";
|
servers.findOne({ vanity: req.body.bot_vanity }, async function (err, server) {
|
||||||
res.redirect('/');
|
if (err) {
|
||||||
|
console.log(err);
|
||||||
|
return res.redirect('/');
|
||||||
|
}
|
||||||
|
if (server) {
|
||||||
|
req.session.error = "This vanity is already in use";
|
||||||
|
return res.redirect('/');
|
||||||
|
} else {
|
||||||
|
|
||||||
|
bot.name = req.body.bot_name;
|
||||||
|
bot.description = req.body.bot_short;
|
||||||
|
bot.long_description = req.body.bot_description;
|
||||||
|
bot.vanity = req.body.bot_vanity.toLowerCase();
|
||||||
|
bot.save(function (err) {
|
||||||
|
if (err) {
|
||||||
|
console.log(err);
|
||||||
|
req.session.error = "Something went wrong";
|
||||||
|
res.redirect('/');
|
||||||
|
} else {
|
||||||
|
req.session.message = "Bot updated";
|
||||||
|
res.redirect('/bot/' + req.params.botID + '/settings');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
router.get('/:botID/vote', async function (req, res) {
|
router.get('/:botID/vote', async function (req, res) {
|
||||||
@@ -264,13 +356,13 @@ router.get('/:botID/vote', async function (req, res) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
req.session.error = "Something went wrong";
|
req.session.error = "Something went wrong";
|
||||||
return res.redirect('/');
|
return res.redirect('/bot/' + req.params.botID);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
global.client.channels.cache.get(global.config.bot.channels.vote).send(`${req.user.username} has voted for bot: ${bot.name} | <https://botscord.xyz/bot/${bot.id}>`);
|
global.client.channels.cache.get(global.config.bot.channels.vote).send(`${req.user.username} has voted for bot: ${bot.name} | <https://botscord.xyz/bot/${bot.id}>`);
|
||||||
|
|
||||||
req.session.message = "Vote added";
|
req.session.message = "Vote added";
|
||||||
return res.redirect('/');
|
return res.redirect('/bot/' + req.params.botID);
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// add vote to database
|
// add vote to database
|
||||||
@@ -283,7 +375,7 @@ router.get('/:botID/vote', async function (req, res) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
req.session.error = "Something went wrong";
|
req.session.error = "Something went wrong";
|
||||||
return res.redirect('/');
|
return res.redirect('/bot/' + req.params.botID);
|
||||||
} else {
|
} else {
|
||||||
if (bot.votes) {
|
if (bot.votes) {
|
||||||
bot.votes = 1;
|
bot.votes = 1;
|
||||||
@@ -294,11 +386,11 @@ router.get('/:botID/vote', async function (req, res) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
req.session.error = "Something went wrong";
|
req.session.error = "Something went wrong";
|
||||||
return res.redirect('/');
|
return res.redirect('/bot/' + req.params.botID);
|
||||||
} else {
|
} else {
|
||||||
global.client.channels.cache.get(global.config.bot.channels.vote).send(`${req.user.username} has voted for bot: ${bot.name} | <https://botscord.xyz/bot/${bot.id}>`);
|
global.client.channels.cache.get(global.config.bot.channels.vote).send(`${req.user.username} has voted for bot: ${bot.name} | <https://botscord.xyz/bot/${bot.id}>`);
|
||||||
req.session.message = "Vote added";
|
req.session.message = "Vote added";
|
||||||
return res.redirect('/');
|
return res.redirect('/bot/' + req.params.botID);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -309,4 +401,29 @@ router.get('/:botID/vote', async function (req, res) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
router.get('/:botID/invite', async function (req, res) {
|
||||||
|
bots.findOne({ id: req.params.botID }, async function (err, bot) {
|
||||||
|
if (err) {
|
||||||
|
console.log(err);
|
||||||
|
return res.redirect('/');
|
||||||
|
}
|
||||||
|
if (!bot) {
|
||||||
|
req.session.error = "No bot found";
|
||||||
|
return res.redirect('/');
|
||||||
|
}
|
||||||
|
if (!bot.invite) {
|
||||||
|
var invite = "https://discord.com/oauth2/authorize?client_id=" + bot.id + "&scope=bot&permissions=8";
|
||||||
|
return res.render('bot/join', {
|
||||||
|
bot: bot,
|
||||||
|
invite: invite,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return res.render('bot/join', {
|
||||||
|
bot: bot,
|
||||||
|
invite: bot.invite,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
@@ -2,6 +2,7 @@ var express = require('express'),
|
|||||||
router = express.Router();
|
router = express.Router();
|
||||||
var servers = require('../../../models/server');
|
var servers = require('../../../models/server');
|
||||||
var votes = require('../../../models/votes');
|
var votes = require('../../../models/votes');
|
||||||
|
var bots = require('../../../models/bot');
|
||||||
const client = require('../../../index');
|
const client = require('../../../index');
|
||||||
const Discord = require('discord.js');
|
const Discord = require('discord.js');
|
||||||
var showdown = require('showdown'),
|
var showdown = require('showdown'),
|
||||||
@@ -167,13 +168,13 @@ router.get('/:server', async function (req, res) {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
router.get('/:server/settings',async function (req, res) {
|
router.get('/:server/settings', async function (req, res) {
|
||||||
if (!req.user) {
|
if (!req.user) {
|
||||||
req.session.backURL = req.originalUrl;
|
req.session.backURL = req.originalUrl;
|
||||||
res.redirect('/auth');
|
res.redirect('/auth');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
servers.findOne({ id: req.params.server },async function (err, server) {
|
servers.findOne({ id: req.params.server }, async function (err, server) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
return res.redirect('/');
|
return res.redirect('/');
|
||||||
@@ -188,7 +189,9 @@ router.get('/:server/settings',async function (req, res) {
|
|||||||
res.render('server/edit', {
|
res.render('server/edit', {
|
||||||
user: req.user,
|
user: req.user,
|
||||||
server: server,
|
server: server,
|
||||||
serverr: serverr
|
serverr: serverr,
|
||||||
|
message: req.session.message || undefined,
|
||||||
|
error: req.session.error || undefined,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
req.session.error = "You don't have permission to edit this server";
|
req.session.error = "You don't have permission to edit this server";
|
||||||
@@ -206,7 +209,7 @@ router.post('/:server/settings', async function (req, res) {
|
|||||||
req.session.backURL = req.originalUrl;
|
req.session.backURL = req.originalUrl;
|
||||||
res.redirect('/auth');
|
res.redirect('/auth');
|
||||||
}
|
}
|
||||||
servers.findOne({ id: req.params.server }, function (err, server) {
|
servers.findOne({ id: req.params.server }, async function (err, server) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
return res.redirect('/');
|
return res.redirect('/');
|
||||||
@@ -215,21 +218,62 @@ router.post('/:server/settings', async function (req, res) {
|
|||||||
req.session.error = "No server found";
|
req.session.error = "No server found";
|
||||||
return res.redirect('/');
|
return res.redirect('/');
|
||||||
}
|
}
|
||||||
var serverr = global.client.guilds.cache.get(server.id)
|
var serverr = await global.bsl.guilds.cache.get(server.id)
|
||||||
if (serverr.members.cache.get(req.user.id)) {
|
if (serverr.members.cache.get(req.user.id)) {
|
||||||
if (serverr.members.cache.get(req.user.id).permissions.has('ADMINISTRATOR')) {
|
if (serverr.members.cache.get(req.user.id).permissions.has('ADMINISTRATOR')) {
|
||||||
server.description = req.body.server_short;
|
servers.findOne({ vanity: req.body.server_vanity }, async function (err, server2) {
|
||||||
server.long_description = req.body.server_description;
|
|
||||||
server.tags = req.body.tags;
|
|
||||||
server.webhook = req.body.server_webhook;
|
|
||||||
server.save(function (err) {
|
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
req.session.error = "Something went wrong";
|
return res.redirect('/server/' + req.params.server + '/settings');
|
||||||
res.redirect('/');
|
}
|
||||||
|
if (server2) {
|
||||||
|
if (server2.id != req.params.server) {
|
||||||
|
req.session.error = "Vanity already exists";
|
||||||
|
return res.redirect('/server/' + req.params.server + '/settings');
|
||||||
|
} else {
|
||||||
|
server.description = req.body.server_short;
|
||||||
|
server.long_description = req.body.server_description;
|
||||||
|
server.tags = req.body.tags;
|
||||||
|
server.webhook = req.body.server_webhook;
|
||||||
|
server.vanity = req.body.server_vanity.toLowerCase();
|
||||||
|
server.save(function (err) {
|
||||||
|
if (err) {
|
||||||
|
console.log(err);
|
||||||
|
req.session.error = "Something went wrong";
|
||||||
|
res.redirect('/server/' + req.params.server + '/settings');
|
||||||
|
} else {
|
||||||
|
req.session.message = "Server edited";
|
||||||
|
res.redirect('/server/' + req.params.server + '/settings');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
req.session.message = "Server edited";
|
bots.findOne({ vanity: req.body.server_vanity }, async function (err, bot) {
|
||||||
res.redirect('/');
|
if (err) {
|
||||||
|
console.log(err);
|
||||||
|
return res.redirect('/server/' + req.params.server + '/settings');
|
||||||
|
}
|
||||||
|
if (bot) {
|
||||||
|
req.session.error = "Vanity already exists";
|
||||||
|
return res.redirect('/server/' + req.params.server + '/settings');
|
||||||
|
} else {
|
||||||
|
server.description = req.body.server_short;
|
||||||
|
server.long_description = req.body.server_description;
|
||||||
|
server.tags = req.body.tags;
|
||||||
|
server.webhook = req.body.server_webhook;
|
||||||
|
server.vanity = req.body.server_vanity.toLowerCase();
|
||||||
|
server.save(function (err) {
|
||||||
|
if (err) {
|
||||||
|
console.log(err);
|
||||||
|
req.session.error = "Something went wrong";
|
||||||
|
res.redirect('/server/' + req.params.server + '/settings');
|
||||||
|
} else {
|
||||||
|
req.session.message = "Server edited";
|
||||||
|
res.redirect('/server/' + req.params.server + '/settings');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -300,7 +344,7 @@ router.get('/:server/vote', function (req, res) {
|
|||||||
}
|
}
|
||||||
global.client.channels.cache.get(global.config.bot.channels.vote).send(`${req.user.username} has voted for server ${bot.name} | <https://botscord.xyz/server/${bot.id}>`);
|
global.client.channels.cache.get(global.config.bot.channels.vote).send(`${req.user.username} has voted for server ${bot.name} | <https://botscord.xyz/server/${bot.id}>`);
|
||||||
req.session.message = "Vote added";
|
req.session.message = "Vote added";
|
||||||
return res.redirect('/');
|
return res.redirect('/bot/' + bot.id);
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// add vote to database
|
// add vote to database
|
||||||
@@ -365,7 +409,7 @@ router.get('/:server/join', async function (req, res) {
|
|||||||
res.render('server/join', {
|
res.render('server/join', {
|
||||||
url: urlInvite,
|
url: urlInvite,
|
||||||
server: server,
|
server: server,
|
||||||
serverr:await global.bsl.guilds.cache.get(server.id)
|
serverr: await global.bsl.guilds.cache.get(server.id)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|||||||
+15
-38
@@ -1,39 +1,16 @@
|
|||||||
<%- include("../includes/header.ejs", { title: "Bot" + bots.name}) %>
|
<%- include("../includes/header.ejs", { title: "Bot" + bots.name}) %>
|
||||||
<div class="overflow-x-auto relative container-sm">
|
<div class="overflow-x-auto relative container-sm text-center">
|
||||||
<table class="w-full text-sm text-left text-gray-500 dark:text-gray-400">
|
<% if(typeof reject != "undefined") { %>
|
||||||
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
<form action="" method="post">
|
||||||
<tr>
|
<h1 class="text-xl text-white">Are you sure you want to reject this bot?</h1>
|
||||||
<th scope="col" class="py-3 px-6">
|
<p class="text-white">Reason: <input type="text " name="reason" class=" text-black "></p>
|
||||||
Bot Name
|
<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">
|
||||||
</th>
|
<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'">
|
||||||
<th scope="col" class="py-3 px-6">
|
</form>
|
||||||
BotID
|
<% } %>
|
||||||
</th>
|
<% if(typeof verify != "undefined") { %>
|
||||||
<th scope="col" class="py-3 px-6">
|
<form action="" method="post">
|
||||||
Bot Description
|
<h1 class="text-xl">Are you sure you want to verify this bot?</h1>
|
||||||
</th>
|
<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'">
|
||||||
<th scope="col" class="py-3 px-6">
|
</form>
|
||||||
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>
|
|
||||||
@@ -15,12 +15,15 @@
|
|||||||
<th scope="col" class="py-3 px-6">
|
<th scope="col" class="py-3 px-6">
|
||||||
Owner
|
Owner
|
||||||
</th>
|
</th>
|
||||||
|
<th scope="col" class="py-3 px-6">
|
||||||
|
Verify
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% var nbots = bots.filter(bot => bot.verified == false); %>
|
<% var nbots = bots.filter(bot => bot.verified == false); %>
|
||||||
<% nbots.forEach(function(bot) { %>
|
<% 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">
|
<td class="py-3 px-6">
|
||||||
<%= bot.name %>
|
<%= bot.name %>
|
||||||
</td>
|
</td>
|
||||||
@@ -33,6 +36,16 @@
|
|||||||
<td class="py-3 px-6">
|
<td class="py-3 px-6">
|
||||||
<%= bot.owner %>
|
<%= bot.owner %>
|
||||||
</td>
|
</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>
|
</tr>
|
||||||
<% }) %>
|
<% }) %>
|
||||||
|
|
||||||
|
|||||||
@@ -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 %>" />
|
<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
|
<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>
|
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>
|
<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 ">
|
<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>
|
</a>
|
||||||
<div class="relative z-0 mb-6 w-full group">
|
<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>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function copy() {
|
function copy() {
|
||||||
|
|||||||
@@ -2,7 +2,13 @@
|
|||||||
<br><br><br><br>
|
<br><br><br><br>
|
||||||
<div class="flex space-x-4 py-2 lg:h-5/6 sm:min-h-min">
|
<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">
|
<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>
|
||||||
<div class="bg-blue-color w-1/4 p-10 text-white h-full m-4 ">
|
<div class="bg-blue-color w-1/4 p-10 text-white h-full m-4 ">
|
||||||
<!-- bot avatar image -->
|
<!-- bot avatar image -->
|
||||||
|
|||||||
@@ -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') %>
|
||||||
@@ -7,3 +7,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="prose"></div>
|
||||||
@@ -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="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">
|
<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="/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="/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/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>
|
||||||
<div class="py-1" role="none">
|
<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="/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>
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
</div>
|
</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">
|
<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;">
|
<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 %>">
|
<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">
|
<div class="px-6 text-white text-base">
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
</div>
|
</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">
|
<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;">
|
<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 %>">
|
<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">
|
<div class="px-6 text-white text-base">
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
</div>
|
</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">
|
<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;">
|
<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 %>">
|
<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">
|
<div class="px-6 text-white text-base">
|
||||||
@@ -256,7 +256,7 @@
|
|||||||
</div>
|
</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">
|
<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;">
|
<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 %>">
|
<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">
|
<div class="px-6 text-white text-base">
|
||||||
|
|||||||
@@ -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 %>" />
|
<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>
|
<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>
|
||||||
|
<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">
|
<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>
|
<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) { %>
|
<% global.config.server.tags.forEach(function(tag) { %>
|
||||||
@@ -30,6 +43,7 @@
|
|||||||
</div><br>
|
</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>
|
<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>
|
</form>
|
||||||
|
<br>
|
||||||
<!-- show code for banner -->
|
<!-- show code for banner -->
|
||||||
<span class="text-white">Add this code to your websites to get automatically a banner</span>
|
<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>
|
<textarea class="text-white" style="width:100%;" rows="2" disabled>
|
||||||
|
|||||||
@@ -2,18 +2,19 @@
|
|||||||
<div class="flex flex-col items-center justify-center h-screen ">
|
<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">
|
<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>
|
<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">
|
<div class="flex justify-center">
|
||||||
<image src="/gif/loading.gif">
|
<image src="/gif/loading.gif">
|
||||||
<span class="sr-only">Loading...</span>
|
<span class="sr-only">Loading...</span>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- script to redirect -->
|
|
||||||
<script>
|
|
||||||
setTimeout(function() {
|
|
||||||
window.location.href = '<%= server.invite %>';
|
|
||||||
}, 3000);
|
|
||||||
</script>
|
|
||||||
</div>
|
</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>
|
</div>
|
||||||
<%- include('../includes/footer.ejs') %>
|
<%- include('../includes/footer.ejs') %>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<% for(let i=0; i < nbots.length; i++) { var bot=nbots[i]; if(bot) { %>
|
<% for(let i=0; i < nbots.length; i++) { var bot=nbots[i]; if(bot) { %>
|
||||||
<% getBot = global.bsl.guilds.cache.get(bot.id); %>
|
<% 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 %>">
|
<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">
|
<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>: <%= 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) { %>
|
<% for(let i=0; i < nbots.length; i++) { var bot=nbots[i]; if(bot) { %>
|
||||||
<% getBot = global.bsl.guilds.cache.get(bot.id); %>
|
<% 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 %>">
|
<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">
|
<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>: <%= global.bsl.guilds.cache.get(bot.id).memberCount.toLocaleString().replace(',', '.' ) %><span class="float-right"><i class="fa fa-bomb"></i>: <%=bot.bumps %></span>
|
||||||
|
|||||||
@@ -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>
|
<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>
|
</div>
|
||||||
<br>
|
<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>
|
<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>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -3,7 +3,14 @@
|
|||||||
<div class="lg:flex space-x-4 py-2 lg:h-5/6 sm:min-h-min">
|
<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">
|
<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">
|
<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>
|
</p><br>
|
||||||
Bots owned by this user: <%= bots.length %><br>
|
Bots owned by this user: <%= bots.length %><br>
|
||||||
<% if(bots) { %>
|
<% if(bots) { %>
|
||||||
@@ -34,7 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<% if(typeof users.website != "undefined") { %>
|
<% if(typeof users.website != "undefined") { %>
|
||||||
<a href="<%= users.website %>" target="_blank" class="text-white text-clip">
|
<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 %>
|
<%= users.website %>
|
||||||
<br>
|
<br>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in new issue
Block a user