Changed most data storage to server-side

This commit is contained in:
ION606
2022-08-12 20:01:29 -07:00
parent 3ab442002d
commit c8b3d9b885
10 changed files with 457 additions and 317 deletions
+27 -16
View File
@@ -221,22 +221,33 @@
window.opener.location.reload(); window.opener.location.reload();
if (inp.inp == 'cal') { if (inp.inp == 'cal') {
const userId = JSON.parse(window.localStorage.getItem('Id')); // const userId = JSON.parse(window.localStorage.getItem('Id'));
const delObjKeys = sessionStorage.getItem('delObjKeys');
var xhrsess = new XMLHttpRequest();
//Send the data to the server xhrsess.open('post', 'http://www.selmerbot.com/getSessionInfo/', true);
var xhr = new XMLHttpRequest(); xhrsess.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.open('post', 'http://www.selmerbot.com/sendData/', true); xhrsess.setRequestHeader('session', window.localStorage.getItem('sessionId'));
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.setRequestHeader(`reminders`, true); xhrsess.onloadend = (e) => {
xhr.setRequestHeader(`delObjKeys`, delObjKeys); const sessionData = JSON.parse(xhrsess.response);
const userId = JSON.parse(sessionData.userId);
xhr.onloadend = (e) => { const delObjKeys = sessionStorage.getItem('delObjKeys');
console.log(e);
alert("Saved!"); //Send the data to the server
window.close(); var xhr = new XMLHttpRequest();
}; xhr.open('post', 'http://www.selmerbot.com/sendData/', true);
xhr.send(); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.setRequestHeader(`reminders`, true);
xhr.setRequestHeader(`delObjKeys`, delObjKeys);
xhr.onloadend = (e) => {
console.log(e);
alert("Saved!");
window.close();
};
xhr.send();
}
xhrsess.send();
} }
} }
+19 -2
View File
@@ -371,11 +371,28 @@
calSpacing.cellPadding = 1; calSpacing.cellPadding = 1;
} }
document.getElementById('calHeader').style.display = "block"; // document.getElementById('calHeader').style.display = "block"; //Breaks the calendar
} }
</script> </script>
<script> <script>
function getSessionData() {
return new Promise((resolve, reject) => {
var xhrsess = new XMLHttpRequest();
xhrsess.open('post', 'http://www.selmerbot.com/getSessionInfo/', true);
xhrsess.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhrsess.setRequestHeader('session', window.localStorage.getItem('sessionId'));
//Reminder that this will return a map of strings (you'll have to use JSON.parse() again)
xhrsess.onloadend = (e) => {
resolve(JSON.parse(xhrsess.response));
}
xhrsess.send();
});
}
window.onload = () => { window.onload = () => {
var serverSettings = JSON.parse(window.localStorage.getItem('serverInfo')); var serverSettings = JSON.parse(window.localStorage.getItem('serverInfo'));
@@ -389,7 +406,7 @@
} }
//Get serverId //Get serverId
const id = window.localStorage.getItem('Id').toString(); const id = serverSettings.Id; // window.localStorage.getItem('Id').toString();
//Check if the user has premium //Check if the user has premium
var xhrverify = new XMLHttpRequest(); var xhrverify = new XMLHttpRequest();
+24 -11
View File
@@ -396,15 +396,6 @@
//Use the guild Id as the userId //Use the guild Id as the userId
xhrverify.setRequestHeader('userId', id); xhrverify.setRequestHeader('userId', id);
xhrverify.onloadend = (e) => { xhrverify.onloadend = (e) => {
console.log(xhrverify.response); //WHAT
if (xhrverify.response == "Unauthorized") {
document.getElementById("calForm").style.display = "none";
document.getElementById("unauth").style.display = "block";
return;
} else if (xhrverify.response == 'Internal Server Error') {
alert("Uh oh, an Internal Server Error has occured!\nPlease try again!");
return window.location.href = "index.html";
}
//Load the channels //Load the channels
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
@@ -464,6 +455,19 @@
} }
xhr.send(); xhr.send();
//#region Calendar
if (xhrverify.response == "Unauthorized") {
document.getElementById("calForm").style.display = "none";
document.getElementById("unauth").style.display = "block";
return;
} else if (xhrverify.response == 'Internal Server Error') {
alert("Uh oh, an Internal Server Error has occured!\nPlease try again!");
return window.location.href = "index.html";
}
var xhr2 = new XMLHttpRequest(); var xhr2 = new XMLHttpRequest();
xhr2.open('get', 'http://www.selmerbot.com/getCal/', true); xhr2.open('get', 'http://www.selmerbot.com/getCal/', true);
xhr2.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); xhr2.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
@@ -499,6 +503,8 @@
} }
xhr2.send(); xhr2.send();
//#endregion
} }
xhrverify.send(); xhrverify.send();
@@ -507,7 +513,14 @@
function logout() { function logout() {
window.localStorage.clear(); window.localStorage.clear();
window.location.href = 'index.html'; window.sessionStorage.clear();
var xhr = new XMLHttpRequest();
xhr.open('post', 'http://www.selmerbot.com/logout/', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.setRequestHeader('sessionid', window.localStorage.getItem('sessionId'));
xhr.onloadend = (e) => { window.location.href = 'index.html'; }
xhr.send();
} }
</script> </script>
@@ -691,7 +704,7 @@
<div id="cal", class="hide wc" style="margin-top: 20px;"> <div id="cal", class="hide wc" style="margin-top: 20px;">
<div id="unauth" class="text-center"> <div id="unauth" class="text-center" style="display: none;">
<h1 style="margin-bottom: 20px;">You have to be a premium subscriber to use this feature!</h1> <h1 style="margin-bottom: 20px;">You have to be a premium subscriber to use this feature!</h1>
<h3 style="margin-bottom: 50px;">vvv GET PREMIUM NOW vvv</h3> <h3 style="margin-bottom: 50px;">vvv GET PREMIUM NOW vvv</h3>
<a href="premium.html"><i class="fa-solid fa-crown" style="scale: 4; color: gold;" alt="PREMIUM"></i></a> <a href="premium.html"><i class="fa-solid fa-crown" style="scale: 4; color: gold;" alt="PREMIUM"></i></a>
+34 -24
View File
@@ -181,29 +181,19 @@
const fragment = new URLSearchParams(window.location.hash.slice(1)); const fragment = new URLSearchParams(window.location.hash.slice(1));
const [accessToken, tokenType, state] = [fragment.get('access_token'), fragment.get('token_type'), fragment.get('state')]; const [accessToken, tokenType, state] = [fragment.get('access_token'), fragment.get('token_type'), fragment.get('state')];
if (!accessToken && !window.localStorage.getItem('serverInfo')) { if (!accessToken && !window.localStorage.getItem('sessionId')) {
const randomString = generateRandomString(); const randomString = generateRandomString();
localStorage.setItem('oauth-state', randomString); localStorage.setItem('oauth-state', randomString);
document.getElementById('guildslink').href = ''; document.getElementById('guildslink').href = '';
document.getElementById('guildslink').style = 'cursor: no-drop;'; document.getElementById('guildslink').style = 'cursor: no-drop;';
// $(".custom-alert").slideUp(0); // $(".custom-alert").slideUp(0);
// document.getElementById('login').href += `&state=${encodeURIComponent(btoa(randomString))}`;
document.getElementById('login').href += `&state=${encodeURIComponent(btoa(randomString))}`; // return document.getElementById('login').style.display = 'block';
return document.getElementById('login').style.display = 'block'; } else if (!accessToken && window.localStorage.getItem('sessionId')) {
} else if (!accessToken && window.localStorage.getItem('serverInfo')) {
//The user is already logged in //The user is already logged in
document.getElementById('loginbtn').style.display = 'none' document.getElementById('loginbtn').style.display = 'none'
document.getElementById('logoutbtn').style.display = "block"; document.getElementById('logoutbtn').style.display = "block";
} else {
document.getElementById('alertrow').style = "";
$(".custom-alert").slideDown(500);
window.setTimeout(function() {
$(".custom-alert").slideUp(500, function() {
$(this).remove();
});
}, 5000);
} }
if (localStorage.getItem('oauth-state') !== atob(decodeURIComponent(state))) { if (localStorage.getItem('oauth-state') !== atob(decodeURIComponent(state))) {
@@ -220,7 +210,7 @@
// document.getElementById('TEMP').innerText = response.toString(); // document.getElementById('TEMP').innerText = response.toString();
// console.log(response); // console.log(response);
const { id, username, discriminator } = response; const { id, username, discriminator } = response;
window.localStorage.setItem('Id', id); window.sessionStorage.setItem('Id', id);
// console.log(guilds); // console.log(guilds);
// document.getElementById('info').innerText += ` ${username}#${discriminator}`; // document.getElementById('info').innerText += ` ${username}#${discriminator}`;
@@ -236,22 +226,35 @@
} }
}).then(response => { }).then(response => {
response.json().then((result) => { response.json().then((result) => {
const owned = result.filter((inp) => { return (inp.owner); }); const owned = result.filter((inp) => { return (inp.owner); });
// window.localStorage.setItem('guilds', owned);
// alert('Loading, please hold!\nps - You can close this alert :)');
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
xhr.open('post', 'http://www.selmerbot.com/user/', true); xhr.open('post', 'http://www.selmerbot.com/user/', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.setRequestHeader('guilds', JSON.stringify(owned)); xhr.setRequestHeader('guilds', JSON.stringify(owned));
xhr.setRequestHeader('userId', window.localStorage.getItem('Id')); xhr.setRequestHeader('userId', window.sessionStorage.getItem('Id'));
xhr.onloadend = (e) => {
//Maybe have an alert for logged in?
window.localStorage.setItem('sessionId', xhr.response);
document.getElementById('alertrow').style = "";
window.location.href = "index.html";
//Too far down, user can't see it
// $(".custom-alert").slideDown(500);
// window.setTimeout(function() {
// $(".custom-alert").slideUp(500, function() {
// $(this).remove();
// window.location.href = "index.html";
// });
// }, 5000);
}
xhr.onloadend = (e) => { window.localStorage.setItem('guilds', (JSON.stringify(xhr.response))); window.location = 'http://www.selmerbot.com/myGuilds.html'; }
xhr.send(JSON.stringify(owned)); xhr.send(JSON.stringify(owned));
}).then((r) => { }).then((r) => {
}) });
}) })
.catch(console.error); .catch(console.error);
} }
@@ -268,9 +271,16 @@
} }
} }
function logout() { function logout() {
window.localStorage.clear(); window.localStorage.clear();
window.location.href = 'index.html'; window.sessionStorage.clear();
var xhr = new XMLHttpRequest();
xhr.open('post', 'http://www.selmerbot.com/logout/', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.setRequestHeader('sessionid', window.localStorage.getItem('sessionId'));
xhr.onloadend = (e) => { window.location.href = 'index.html'; }
xhr.send();
} }
</script> </script>
@@ -343,7 +353,7 @@
<div class="row custom-alert" style="display: none;" id="alertrow"> <div class="row custom-alert" style="display: none;" id="alertrow">
<div class="alert alert-warning alert-dismissible" id="banner" style="text-align: center" role="alert"> <div class="alert alert-warning alert-dismissible" id="banner" style="text-align: center" role="alert">
<button type="button" class="btn-close" data-bs-dismiss="alert"></button> <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
<strong class="mx-auto">Loading Servers...</strong> <!-- This alert box could indicate a successful or positive action. --> <strong class="mx-auto">Logged In Successfully!</strong> <!-- This alert box could indicate a successful or positive action. -->
</div> </div>
</div> </div>
+41 -6
View File
@@ -3,9 +3,11 @@
// const fetch = require('node-fetch'); // const fetch = require('node-fetch');
// const btoa = require('btoa'); // const btoa = require('btoa');
// const { clientId, clientSecret, port } = require('./config.json'); // const { clientId, clientSecret, port } = require('./config.json');
import express from 'express'; import express from 'express'
import fetch from 'node-fetch' import fetch from 'node-fetch'
import { MongoClient, ServerApiVersion } from 'mongodb' import { MongoClient, ServerApiVersion } from 'mongodb'
import { v4 as uuidv4 } from 'uuid'
import { validate as uuidValidate } from 'uuid';
//Bot section (PLACE IN ENV) //Bot section (PLACE IN ENV)
import { Client, Intents } from 'discord.js'; import { Client, Intents } from 'discord.js';
@@ -51,8 +53,8 @@ const app = express();
// app.use(express.json()); // app.use(express.json());
app.use(express.static('/assets')); app.use(express.static('/assets'));
app.post('/user', async(request, response) => {
app.post('/user', async(request, response) => {
const guilds = JSON.parse(request.headers.guilds); const guilds = JSON.parse(request.headers.guilds);
const id = request.headers.userid; const id = request.headers.userid;
@@ -67,9 +69,42 @@ app.post('/user', async(request, response) => {
} }
} }
return response.send(guilds); //Add the guilds to the session data
return response.sendFile('myGuilds.html', { root: '.' }); connection.then((client) => {
}) const sessionId = uuidv4();
const dbo = client.db('main').collection('sessions');
dbo.insertOne({ sessionId: sessionId, userId: id, guilds: JSON.stringify(guilds) });
response.send(sessionId);
});
});
app.post('/logout', async (req, res) => {
connection.then((client) => {
const sessionId = req.headers.sessionid;
const dbo = client.db('main').collection('sessions');
dbo.deleteOne({ sessionId: sessionId });
});
res.sendStatus(200);
});
app.post('/getSessionInfo', async (req, res) => {
const session = req.headers.session;
if (session) {
if (uuidValidate(session)) {
connection.then((client) => {
const dbo = client.db('main').collection('sessions');
dbo.findOne({ sessionId: session }).then((doc) => {
res.send(doc);
})
})
}
}
});
app.get('/myGuilds.html', async (req, res) => { app.get('/myGuilds.html', async (req, res) => {
@@ -111,7 +146,7 @@ app.get('/getChannels', async (req, res) => {
} else if (type == 'GUILD_VOICE') { } else if (type == 'GUILD_VOICE') {
arr.voice.push({ name: channel.name, id: channel.id }); arr.voice.push({ name: channel.name, id: channel.id });
} }
}) });
res.send(arr); res.send(arr);
}); });
+81 -60
View File
@@ -55,77 +55,98 @@
<script> <script>
window.onload = () => { function getSessionData() {
const guilds = JSON.parse(JSON.parse(window.localStorage.getItem('guilds'))); return new Promise((resolve, reject) => {
var xhrsess = new XMLHttpRequest();
xhrsess.open('post', 'http://www.selmerbot.com/getSessionInfo/', true);
xhrsess.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhrsess.setRequestHeader('session', window.localStorage.getItem('sessionId'));
if (!guilds) { //Reminder that this will return a map of strings (you'll have to use JSON.parse() again)
alert("Please log in to continue"); xhrsess.onloadend = (e) => {
if (window.location.href.indexOf('localhost') != -1) { resolve(JSON.parse(xhrsess.response));
window.location = 'https://discord.com/api/oauth2/authorize?client_id=926551095352901632&redirect_uri=http%3A%2F%2Flocalhost%3A53134%2F&response_type=token&scope=identify%20guilds';
} else {
window.location = 'https://discord.com/api/oauth2/authorize?client_id=944046902415093760&redirect_uri=http%3A%2F%2Fwww.selmerbot.com%2F&response_type=token&scope=identify%20guilds';
}
}
var wrapper = document.getElementById('wrapper');
var row = document.createElement("servers_row");
row.innerHTML = ""; // clear images
row.classList.add('serverRow');
for (let i = 0; i < guilds.length; i++) {
//New row every 10 servers
if (i % 10 == 0) {
wrapper.appendChild(row);
row.innerHTML = "";
row.classList.add('serverRow');
} }
var div = document.createElement("div"); xhrsess.send();
var imagem = document.createElement("img"); });
var name = document.createElement("p"); }
name.innerText = guilds[i].name;
name.style = "color: white"; window.onload = async () => {
//#region GUILDS
// const guilds = JSON.parse(JSON.parse(window.localStorage.getItem('guilds')));
if (guilds[i].icon) { //Guilds section
imagem.src = `https://cdn.discordapp.com/icons/${guilds[i].id}/${guilds[i].icon}.png`; const sessionDataPromise = getSessionData();
} else { sessionDataPromise.then((sessionData) => {
imagem.src = 'https://github.com/ION606/selmer-bot-website/blob/main/assets/circleOutline.png?raw=true'; const guilds = JSON.parse(sessionData.guilds);
}
if (guilds[i].inServer) { if (!guilds) {
// imagem.classList.add('serverImgIn'); alert("Please log in to continue");
imagem.className = 'serverImgIn'; if (window.location.href.indexOf('localhost') != -1) {
window.location = 'https://discord.com/api/oauth2/authorize?client_id=926551095352901632&redirect_uri=http%3A%2F%2Flocalhost%3A53134%2F&response_type=token&scope=identify%20guilds';
//OPEN A NEW WINDOW FOR SERVER EDITING } else {
imagem.onclick = function() { window.location = 'https://discord.com/api/oauth2/authorize?client_id=944046902415093760&redirect_uri=http%3A%2F%2Fwww.selmerbot.com%2F&response_type=token&scope=identify%20guilds';
console.log('LOADING.....');
var xhr = new XMLHttpRequest();
xhr.open('post', 'http://www.selmerbot.com/getServer/', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.setRequestHeader('serverNumber', guilds[i].id);
xhr.onloadend = (e) => { window.localStorage.setItem('serverInfo', (xhr.response)); window.location = 'http://www.selmerbot.com/dashboard.html'; }
xhr.send();
} }
} else {
// imagem.classList.add('serverImgOut');
imagem.className = 'serverImgOut';
imagem.onclick = function() {
window.open('https://discord.com/oauth2/authorize?client_id=926551095352901632&scope=applications.commands+bot&permissions=549755289087');
}//OPEN A NEW WINDOW WITH SERVER INVITE
} }
div.appendChild(imagem); var wrapper = document.getElementById('wrapper');
div.appendChild(name);
var row = document.createElement("servers_row");
row.innerHTML = ""; // clear images
row.classList.add('serverRow');
div.classList.add('server'); for (let i = 0; i < guilds.length; i++) {
//New row every 10 servers
if (i % 10 == 0) {
wrapper.appendChild(row);
row.innerHTML = "";
row.classList.add('serverRow');
}
row.appendChild(div); var div = document.createElement("div");
} var imagem = document.createElement("img");
var name = document.createElement("p");
name.innerText = guilds[i].name;
name.style = "color: white";
wrapper.appendChild(row); if (guilds[i].icon) {
wrapper.appendChild(document.createElement('div')); imagem.src = `https://cdn.discordapp.com/icons/${guilds[i].id}/${guilds[i].icon}.png`;
} else {
imagem.src = 'https://github.com/ION606/selmer-bot-website/blob/main/assets/circleOutline.png?raw=true';
}
if (guilds[i].inServer) {
imagem.className = 'serverImgIn';
imagem.onclick = function() {
var xhr = new XMLHttpRequest();
xhr.open('post', 'http://www.selmerbot.com/getServer/', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.setRequestHeader('serverNumber', guilds[i].id);
xhr.onloadend = (e) => { window.localStorage.setItem('serverInfo', (xhr.response)); window.location = 'http://www.selmerbot.com/dashboard.html'; }
xhr.send();
}
} else {
// imagem.classList.add('serverImgOut');
imagem.className = 'serverImgOut';
imagem.onclick = function() {
window.open('https://discord.com/oauth2/authorize?client_id=926551095352901632&scope=applications.commands+bot&permissions=549755289087');
}//OPEN A NEW WINDOW WITH SERVER INVITE
}
div.appendChild(imagem);
div.appendChild(name);
div.classList.add('server');
row.appendChild(div);
}
wrapper.appendChild(row);
wrapper.appendChild(document.createElement('div'));
});
//#endregion
} }
</script> </script>
+42 -25
View File
@@ -124,6 +124,19 @@
}; };
function getSessionData() {
var xhrsess = new XMLHttpRequest();
xhrsess.open('post', 'http://www.selmerbot.com/getSessionInfo/', true);
xhrsess.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhrsess.setRequestHeader('session', window.localStorage.getItem('sessionId'));
//Reminder that this will return a map of strings (you'll have to use JSON.parse() again)
xhrsess.onloadend = (e) => {
return JSON.parse(xhrsess.response);
}
}
function sendData(event) { function sendData(event) {
event.preventDefault(); event.preventDefault();
@@ -160,33 +173,37 @@
const d = new Date(new Date().getFullYear(), new Date().getMonth(), day, hour, minute); const d = new Date(new Date().getFullYear(), new Date().getMonth(), day, hour, minute);
const serverSettings = JSON.parse(window.localStorage.getItem('serverInfo')); const serverSettings = JSON.parse(window.localStorage.getItem('serverInfo'));
const id = window.localStorage.getItem('Id');
//Reminder format = { time: 1212122, event: { guildId: "930148608400035860", userId: "12", name: "Some Generic Name", description: "Some description", offset: "15", link: "https://www.example.com" location: "Some location" } }
let obj = { time: String(d.getTime() - offsetTS), event: { guildId: serverSettings.Id, userId: id, name: name, description: desc, offset: offset, link: url, location: loc } }
//Send the data to the server const sessionDataPromise = await getSessionData();
var xhr = new XMLHttpRequest(); sessionDataPromise.then((sessionData) => {
xhr.open('post', 'http://www.selmerbot.com/newCalEvent/', true); const id = sessionData.userId;
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.setRequestHeader(`newCalEvent`, JSON.stringify(obj)); //Reminder format = { time: 1212122, event: { guildId: "930148608400035860", userId: "12", name: "Some Generic Name", description: "Some description", offset: "15", link: "https://www.example.com" location: "Some location" } }
let obj = { time: String(d.getTime() - offsetTS), event: { guildId: serverSettings.Id, userId: id, name: name, description: desc, offset: offset, link: url, location: loc } }
xhr.onloadend = (e) => {
console.log(xhr.response);
if (xhr.response == "OK") {
//make sure the opened window isn't a popup
if (window.opener.opener == null) { window.opener.location.reload(); }
alert("Saved!"); //Send the data to the server
window.close(); var xhr = new XMLHttpRequest();
} else if (xhr.response == "Internal Server Error") { xhr.open('post', 'http://www.selmerbot.com/newCalEvent/', true);
alert("Internal Server Error\nPlease try again!"); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
window.close(); xhr.setRequestHeader(`newCalEvent`, JSON.stringify(obj));
} else if (xhr.response == "Conflict") {
alert("There's already an event at this time!"); xhr.onloadend = (e) => {
} console.log(xhr.response);
}; if (xhr.response == "OK") {
xhr.send(); //make sure the opened window isn't a popup
if (window.opener.opener == null) { window.opener.location.reload(); }
alert("Saved!");
window.close();
} else if (xhr.response == "Internal Server Error") {
alert("Internal Server Error\nPlease try again!");
window.close();
} else if (xhr.response == "Conflict") {
alert("There's already an event at this time!");
}
};
xhr.send();
});
// alert(`${name}, ${desc}, ${url}, ${loc}, ${d}`); // alert(`${name}, ${desc}, ${url}, ${loc}, ${d}`);
} catch (err) { } catch (err) {
+178 -170
View File
@@ -17,17 +17,18 @@
"nginx": "^1.0.8", "nginx": "^1.0.8",
"node-fetch": "^3.2.9", "node-fetch": "^3.2.9",
"stripe": "^9.15.0", "stripe": "^9.15.0",
"undici": "^5.8.0" "undici": "^5.8.0",
"uuid": "^8.3.2"
} }
}, },
"node_modules/@discordjs/builders": { "node_modules/@discordjs/builders": {
"version": "0.14.0", "version": "0.16.0",
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.14.0.tgz", "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.16.0.tgz",
"integrity": "sha512-+fqLIqa9wN3R+kvlld8sgG0nt04BAZxdCDP4t2qZ9TJsquLWA+xMtT8Waibb3d4li4AQS+IOfjiHAznv/dhHgQ==", "integrity": "sha512-9/NCiZrLivgRub2/kBc0Vm5pMBE5AUdYbdXsLu/yg9ANgvnaJ0bZKTY8yYnLbsEc/LYUP79lEIdC73qEYhWq7A==",
"deprecated": "no longer supported",
"dependencies": { "dependencies": {
"@sapphire/shapeshift": "^3.1.0", "@sapphire/shapeshift": "^3.5.1",
"@sindresorhus/is": "^4.6.0", "discord-api-types": "^0.36.2",
"discord-api-types": "^0.33.3",
"fast-deep-equal": "^3.1.3", "fast-deep-equal": "^3.1.3",
"ts-mixer": "^6.0.1", "ts-mixer": "^6.0.1",
"tslib": "^2.4.0" "tslib": "^2.4.0"
@@ -36,27 +37,33 @@
"node": ">=16.9.0" "node": ">=16.9.0"
} }
}, },
"node_modules/@discordjs/builders/node_modules/discord-api-types": {
"version": "0.36.3",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz",
"integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg=="
},
"node_modules/@discordjs/collection": { "node_modules/@discordjs/collection": {
"version": "0.7.0", "version": "0.7.0",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz",
"integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA==", "integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA==",
"deprecated": "no longer supported",
"engines": { "engines": {
"node": ">=16.9.0" "node": ">=16.9.0"
} }
}, },
"node_modules/@sapphire/async-queue": { "node_modules/@sapphire/async-queue": {
"version": "1.3.1", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.1.tgz", "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.4.0.tgz",
"integrity": "sha512-FFTlPOWZX1kDj9xCAsRzH5xEJfawg1lNoYAA+ecOWJMHOfiZYb1uXOI3ne9U4UILSEPwfE68p3T9wUHwIQfR0g==", "integrity": "sha512-1npoLO1YPPXCsWCfuonsSdtHbPUo6dvjWUJtmUHiK8yDTmy00LbkpRkdV/UycA1fh+QsxwOPhgx2zu64Z+19ww==",
"engines": { "engines": {
"node": ">=v14.0.0", "node": ">=v14.0.0",
"npm": ">=7.0.0" "npm": ">=7.0.0"
} }
}, },
"node_modules/@sapphire/shapeshift": { "node_modules/@sapphire/shapeshift": {
"version": "3.5.0", "version": "3.5.1",
"resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.5.0.tgz", "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.5.1.tgz",
"integrity": "sha512-r6Iw3ZWgwzWcWDtsPwHKHnc6LCD84AqyXi1IolSS8TGLodTuggYxQ63V+Si5Jb7KVLhMYPCdlwM0HEDHEeZ9Iw==", "integrity": "sha512-7JFsW5IglyOIUQI1eE0g6h06D/Far6HqpcowRScgCiLSqTf3hhkPWCWotVTtVycnDCMYIwPeaw6IEPBomKC8pA==",
"dependencies": { "dependencies": {
"fast-deep-equal": "^3.1.3", "fast-deep-equal": "^3.1.3",
"lodash.uniqwith": "^4.5.0" "lodash.uniqwith": "^4.5.0"
@@ -66,21 +73,10 @@
"npm": ">=7.0.0" "npm": ">=7.0.0"
} }
}, },
"node_modules/@sindresorhus/is": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
"integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sindresorhus/is?sponsor=1"
}
},
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "18.0.5", "version": "18.7.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.5.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.2.tgz",
"integrity": "sha512-En7tneq+j0qAiVwysBD79y86MT3ModuoIJbe7JXp+sb5UAjInSShmK3nXXMioBzfF7rXC12hv12d4IyCVwN4dA==" "integrity": "sha512-ce7MIiaYWCFv6A83oEultwhBXb22fxwNOQf5DIxWA4WXvDQ7K+L0fbWl/YOfCzlR5B/uFkSnVBhPcOfOECcWvA=="
}, },
"node_modules/@types/node-fetch": { "node_modules/@types/node-fetch": {
"version": "2.6.2", "version": "2.6.2",
@@ -430,19 +426,19 @@
"integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg==" "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg=="
}, },
"node_modules/discord.js": { "node_modules/discord.js": {
"version": "13.8.1", "version": "13.10.2",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.1.tgz", "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.10.2.tgz",
"integrity": "sha512-jOsD+4tEZWWx0RHVyH+FBcqoTrsL+d5Mm5p+ULQOdU0qSaxhLNkWYig+yDHNZoND7nlkXX3qi+BW+gO5erWylg==", "integrity": "sha512-zPhPaUvJRCqmsqMBmQ8gJ8k/O0rcuLj8tn/mOaJEiDPkpb5aFULHarOfqND6jRuLrKXd2to/bc0mjXTOgRW1MA==",
"dependencies": { "dependencies": {
"@discordjs/builders": "^0.14.0", "@discordjs/builders": "^0.16.0",
"@discordjs/collection": "^0.7.0", "@discordjs/collection": "^0.7.0",
"@sapphire/async-queue": "^1.3.1", "@sapphire/async-queue": "^1.3.2",
"@types/node-fetch": "^2.6.1", "@types/node-fetch": "^2.6.2",
"@types/ws": "^8.5.3", "@types/ws": "^8.5.3",
"discord-api-types": "^0.33.3", "discord-api-types": "^0.33.3",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.7",
"ws": "^8.7.0" "ws": "^8.8.1"
}, },
"engines": { "engines": {
"node": ">=16.6.0", "node": ">=16.6.0",
@@ -468,6 +464,25 @@
} }
} }
}, },
"node_modules/discord.js/node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"node_modules/discord.js/node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"node_modules/discord.js/node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/ee-first": { "node_modules/ee-first": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -862,9 +877,9 @@
} }
}, },
"node_modules/mongodb": { "node_modules/mongodb": {
"version": "4.8.0", "version": "4.8.1",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.8.0.tgz", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.8.1.tgz",
"integrity": "sha512-a0eVzm1e1kxwnzJV1wZXIS54KegM2y6wXTXOGTSAxr/E2YOUkl/zGBHNSI4z+6z+YQtVdzDqy1nJ4n5MxYJRnQ==", "integrity": "sha512-/NyiM3Ox9AwP5zrfT9TXjRKDJbXlLaUDQ9Rg//2lbg8D2A8GXV0VidYYnA/gfdK6uwbnL4FnAflH7FbGw3TS7w==",
"dependencies": { "dependencies": {
"bson": "^4.6.5", "bson": "^4.6.5",
"denque": "^2.0.1", "denque": "^2.0.1",
@@ -879,45 +894,14 @@
} }
}, },
"node_modules/mongodb-connection-string-url": { "node_modules/mongodb-connection-string-url": {
"version": "2.5.2", "version": "2.5.3",
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.2.tgz", "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.3.tgz",
"integrity": "sha512-tWDyIG8cQlI5k3skB6ywaEA5F9f5OntrKKsT/Lteub2zgwSUlhqEN2inGgBTm8bpYJf8QYBdA/5naz65XDpczA==", "integrity": "sha512-f+/WsED+xF4B74l3k9V/XkTVj5/fxFH2o5ToKXd8Iyi5UhM+sO9u0Ape17Mvl/GkZaFtM0HQnzAG5OTmhKw+tQ==",
"dependencies": { "dependencies": {
"@types/whatwg-url": "^8.2.1", "@types/whatwg-url": "^8.2.1",
"whatwg-url": "^11.0.0" "whatwg-url": "^11.0.0"
} }
}, },
"node_modules/mongodb-connection-string-url/node_modules/tr46": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
"integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
"dependencies": {
"punycode": "^2.1.1"
},
"engines": {
"node": ">=12"
}
},
"node_modules/mongodb-connection-string-url/node_modules/webidl-conversions": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
"integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
"engines": {
"node": ">=12"
}
},
"node_modules/mongodb-connection-string-url/node_modules/whatwg-url": {
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
"integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
"dependencies": {
"tr46": "^3.0.0",
"webidl-conversions": "^7.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/ms": { "node_modules/ms": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
@@ -962,9 +946,9 @@
} }
}, },
"node_modules/node-fetch": { "node_modules/node-fetch": {
"version": "3.2.9", "version": "3.2.10",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.9.tgz", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.10.tgz",
"integrity": "sha512-/2lI+DBecVvVm9tDhjziTVjo2wmTsSxSk58saUYP0P/fRJ3xxtfMDY24+CKTkfm0Dlhyn3CSXNL0SoRiCZ8Rzg==", "integrity": "sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==",
"dependencies": { "dependencies": {
"data-uri-to-buffer": "^4.0.0", "data-uri-to-buffer": "^4.0.0",
"fetch-blob": "^3.1.4", "fetch-blob": "^3.1.4",
@@ -1202,9 +1186,9 @@
} }
}, },
"node_modules/stripe": { "node_modules/stripe": {
"version": "9.15.0", "version": "9.16.0",
"resolved": "https://registry.npmjs.org/stripe/-/stripe-9.15.0.tgz", "resolved": "https://registry.npmjs.org/stripe/-/stripe-9.16.0.tgz",
"integrity": "sha512-0Irs+6mNpZKhiXS/aieweXZEcOrJtUjPU0fIzEzrRg9VF9wyXWdUELWJbkxDhuyYMMKrrjA6c2YNtccBZX6tew==", "integrity": "sha512-Dn8K+jSoQcXjxCobRI4HXUdHjOXsiF/KszK49fJnkbeCFjZ3EZxLG2JiM/CX+Hcq27NBDtv/Sxhvy+HhTmvyaQ==",
"dependencies": { "dependencies": {
"@types/node": ">=8.1.0", "@types/node": ">=8.1.0",
"qs": "^6.10.3" "qs": "^6.10.3"
@@ -1233,9 +1217,15 @@
} }
}, },
"node_modules/tr46": { "node_modules/tr46": {
"version": "0.0.3", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
"dependencies": {
"punycode": "^2.1.1"
},
"engines": {
"node": ">=12"
}
}, },
"node_modules/ts-mixer": { "node_modules/ts-mixer": {
"version": "6.0.1", "version": "6.0.1",
@@ -1260,9 +1250,9 @@
} }
}, },
"node_modules/undici": { "node_modules/undici": {
"version": "5.8.0", "version": "5.8.2",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.8.0.tgz", "resolved": "https://registry.npmjs.org/undici/-/undici-5.8.2.tgz",
"integrity": "sha512-1F7Vtcez5w/LwH2G2tGnFIihuWUlc58YidwLiCv+jR2Z50x0tNXpRRw7eOIJ+GvqCqIkg9SB7NWAJ/T9TLfv8Q==", "integrity": "sha512-3KLq3pXMS0Y4IELV045fTxqz04Nk9Ms7yfBBHum3yxsTR4XNn+ZCaUbf/mWitgYDAhsplQ0B1G4S5D345lMO3A==",
"engines": { "engines": {
"node": ">=12.18" "node": ">=12.18"
} }
@@ -1283,6 +1273,14 @@
"node": ">= 0.4.0" "node": ">= 0.4.0"
} }
}, },
"node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/vary": { "node_modules/vary": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
@@ -1300,17 +1298,23 @@
} }
}, },
"node_modules/webidl-conversions": { "node_modules/webidl-conversions": {
"version": "3.0.1", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
"engines": {
"node": ">=12"
}
}, },
"node_modules/whatwg-url": { "node_modules/whatwg-url": {
"version": "5.0.0", "version": "11.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
"dependencies": { "dependencies": {
"tr46": "~0.0.3", "tr46": "^3.0.0",
"webidl-conversions": "^3.0.0" "webidl-conversions": "^7.0.0"
},
"engines": {
"node": ">=12"
} }
}, },
"node_modules/ws": { "node_modules/ws": {
@@ -1336,16 +1340,22 @@
}, },
"dependencies": { "dependencies": {
"@discordjs/builders": { "@discordjs/builders": {
"version": "0.14.0", "version": "0.16.0",
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.14.0.tgz", "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.16.0.tgz",
"integrity": "sha512-+fqLIqa9wN3R+kvlld8sgG0nt04BAZxdCDP4t2qZ9TJsquLWA+xMtT8Waibb3d4li4AQS+IOfjiHAznv/dhHgQ==", "integrity": "sha512-9/NCiZrLivgRub2/kBc0Vm5pMBE5AUdYbdXsLu/yg9ANgvnaJ0bZKTY8yYnLbsEc/LYUP79lEIdC73qEYhWq7A==",
"requires": { "requires": {
"@sapphire/shapeshift": "^3.1.0", "@sapphire/shapeshift": "^3.5.1",
"@sindresorhus/is": "^4.6.0", "discord-api-types": "^0.36.2",
"discord-api-types": "^0.33.3",
"fast-deep-equal": "^3.1.3", "fast-deep-equal": "^3.1.3",
"ts-mixer": "^6.0.1", "ts-mixer": "^6.0.1",
"tslib": "^2.4.0" "tslib": "^2.4.0"
},
"dependencies": {
"discord-api-types": {
"version": "0.36.3",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz",
"integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg=="
}
} }
}, },
"@discordjs/collection": { "@discordjs/collection": {
@@ -1354,28 +1364,23 @@
"integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA==" "integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA=="
}, },
"@sapphire/async-queue": { "@sapphire/async-queue": {
"version": "1.3.1", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.1.tgz", "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.4.0.tgz",
"integrity": "sha512-FFTlPOWZX1kDj9xCAsRzH5xEJfawg1lNoYAA+ecOWJMHOfiZYb1uXOI3ne9U4UILSEPwfE68p3T9wUHwIQfR0g==" "integrity": "sha512-1npoLO1YPPXCsWCfuonsSdtHbPUo6dvjWUJtmUHiK8yDTmy00LbkpRkdV/UycA1fh+QsxwOPhgx2zu64Z+19ww=="
}, },
"@sapphire/shapeshift": { "@sapphire/shapeshift": {
"version": "3.5.0", "version": "3.5.1",
"resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.5.0.tgz", "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.5.1.tgz",
"integrity": "sha512-r6Iw3ZWgwzWcWDtsPwHKHnc6LCD84AqyXi1IolSS8TGLodTuggYxQ63V+Si5Jb7KVLhMYPCdlwM0HEDHEeZ9Iw==", "integrity": "sha512-7JFsW5IglyOIUQI1eE0g6h06D/Far6HqpcowRScgCiLSqTf3hhkPWCWotVTtVycnDCMYIwPeaw6IEPBomKC8pA==",
"requires": { "requires": {
"fast-deep-equal": "^3.1.3", "fast-deep-equal": "^3.1.3",
"lodash.uniqwith": "^4.5.0" "lodash.uniqwith": "^4.5.0"
} }
}, },
"@sindresorhus/is": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
"integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="
},
"@types/node": { "@types/node": {
"version": "18.0.5", "version": "18.7.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.5.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.2.tgz",
"integrity": "sha512-En7tneq+j0qAiVwysBD79y86MT3ModuoIJbe7JXp+sb5UAjInSShmK3nXXMioBzfF7rXC12hv12d4IyCVwN4dA==" "integrity": "sha512-ce7MIiaYWCFv6A83oEultwhBXb22fxwNOQf5DIxWA4WXvDQ7K+L0fbWl/YOfCzlR5B/uFkSnVBhPcOfOECcWvA=="
}, },
"@types/node-fetch": { "@types/node-fetch": {
"version": "2.6.2", "version": "2.6.2",
@@ -1628,19 +1633,19 @@
"integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg==" "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg=="
}, },
"discord.js": { "discord.js": {
"version": "13.8.1", "version": "13.10.2",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.1.tgz", "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.10.2.tgz",
"integrity": "sha512-jOsD+4tEZWWx0RHVyH+FBcqoTrsL+d5Mm5p+ULQOdU0qSaxhLNkWYig+yDHNZoND7nlkXX3qi+BW+gO5erWylg==", "integrity": "sha512-zPhPaUvJRCqmsqMBmQ8gJ8k/O0rcuLj8tn/mOaJEiDPkpb5aFULHarOfqND6jRuLrKXd2to/bc0mjXTOgRW1MA==",
"requires": { "requires": {
"@discordjs/builders": "^0.14.0", "@discordjs/builders": "^0.16.0",
"@discordjs/collection": "^0.7.0", "@discordjs/collection": "^0.7.0",
"@sapphire/async-queue": "^1.3.1", "@sapphire/async-queue": "^1.3.2",
"@types/node-fetch": "^2.6.1", "@types/node-fetch": "^2.6.2",
"@types/ws": "^8.5.3", "@types/ws": "^8.5.3",
"discord-api-types": "^0.33.3", "discord-api-types": "^0.33.3",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.7",
"ws": "^8.7.0" "ws": "^8.8.1"
}, },
"dependencies": { "dependencies": {
"node-fetch": { "node-fetch": {
@@ -1650,6 +1655,25 @@
"requires": { "requires": {
"whatwg-url": "^5.0.0" "whatwg-url": "^5.0.0"
} }
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
} }
} }
}, },
@@ -1938,9 +1962,9 @@
} }
}, },
"mongodb": { "mongodb": {
"version": "4.8.0", "version": "4.8.1",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.8.0.tgz", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.8.1.tgz",
"integrity": "sha512-a0eVzm1e1kxwnzJV1wZXIS54KegM2y6wXTXOGTSAxr/E2YOUkl/zGBHNSI4z+6z+YQtVdzDqy1nJ4n5MxYJRnQ==", "integrity": "sha512-/NyiM3Ox9AwP5zrfT9TXjRKDJbXlLaUDQ9Rg//2lbg8D2A8GXV0VidYYnA/gfdK6uwbnL4FnAflH7FbGw3TS7w==",
"requires": { "requires": {
"bson": "^4.6.5", "bson": "^4.6.5",
"denque": "^2.0.1", "denque": "^2.0.1",
@@ -1950,36 +1974,12 @@
} }
}, },
"mongodb-connection-string-url": { "mongodb-connection-string-url": {
"version": "2.5.2", "version": "2.5.3",
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.2.tgz", "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.3.tgz",
"integrity": "sha512-tWDyIG8cQlI5k3skB6ywaEA5F9f5OntrKKsT/Lteub2zgwSUlhqEN2inGgBTm8bpYJf8QYBdA/5naz65XDpczA==", "integrity": "sha512-f+/WsED+xF4B74l3k9V/XkTVj5/fxFH2o5ToKXd8Iyi5UhM+sO9u0Ape17Mvl/GkZaFtM0HQnzAG5OTmhKw+tQ==",
"requires": { "requires": {
"@types/whatwg-url": "^8.2.1", "@types/whatwg-url": "^8.2.1",
"whatwg-url": "^11.0.0" "whatwg-url": "^11.0.0"
},
"dependencies": {
"tr46": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
"integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
"requires": {
"punycode": "^2.1.1"
}
},
"webidl-conversions": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
"integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="
},
"whatwg-url": {
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
"integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
"requires": {
"tr46": "^3.0.0",
"webidl-conversions": "^7.0.0"
}
}
} }
}, },
"ms": { "ms": {
@@ -2007,9 +2007,9 @@
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="
}, },
"node-fetch": { "node-fetch": {
"version": "3.2.9", "version": "3.2.10",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.9.tgz", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.10.tgz",
"integrity": "sha512-/2lI+DBecVvVm9tDhjziTVjo2wmTsSxSk58saUYP0P/fRJ3xxtfMDY24+CKTkfm0Dlhyn3CSXNL0SoRiCZ8Rzg==", "integrity": "sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==",
"requires": { "requires": {
"data-uri-to-buffer": "^4.0.0", "data-uri-to-buffer": "^4.0.0",
"fetch-blob": "^3.1.4", "fetch-blob": "^3.1.4",
@@ -2178,9 +2178,9 @@
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ=="
}, },
"stripe": { "stripe": {
"version": "9.15.0", "version": "9.16.0",
"resolved": "https://registry.npmjs.org/stripe/-/stripe-9.15.0.tgz", "resolved": "https://registry.npmjs.org/stripe/-/stripe-9.16.0.tgz",
"integrity": "sha512-0Irs+6mNpZKhiXS/aieweXZEcOrJtUjPU0fIzEzrRg9VF9wyXWdUELWJbkxDhuyYMMKrrjA6c2YNtccBZX6tew==", "integrity": "sha512-Dn8K+jSoQcXjxCobRI4HXUdHjOXsiF/KszK49fJnkbeCFjZ3EZxLG2JiM/CX+Hcq27NBDtv/Sxhvy+HhTmvyaQ==",
"requires": { "requires": {
"@types/node": ">=8.1.0", "@types/node": ">=8.1.0",
"qs": "^6.10.3" "qs": "^6.10.3"
@@ -2200,9 +2200,12 @@
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="
}, },
"tr46": { "tr46": {
"version": "0.0.3", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
"requires": {
"punycode": "^2.1.1"
}
}, },
"ts-mixer": { "ts-mixer": {
"version": "6.0.1", "version": "6.0.1",
@@ -2224,9 +2227,9 @@
} }
}, },
"undici": { "undici": {
"version": "5.8.0", "version": "5.8.2",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.8.0.tgz", "resolved": "https://registry.npmjs.org/undici/-/undici-5.8.2.tgz",
"integrity": "sha512-1F7Vtcez5w/LwH2G2tGnFIihuWUlc58YidwLiCv+jR2Z50x0tNXpRRw7eOIJ+GvqCqIkg9SB7NWAJ/T9TLfv8Q==" "integrity": "sha512-3KLq3pXMS0Y4IELV045fTxqz04Nk9Ms7yfBBHum3yxsTR4XNn+ZCaUbf/mWitgYDAhsplQ0B1G4S5D345lMO3A=="
}, },
"unpipe": { "unpipe": {
"version": "1.0.0", "version": "1.0.0",
@@ -2238,6 +2241,11 @@
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA=="
}, },
"uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
},
"vary": { "vary": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
@@ -2249,17 +2257,17 @@
"integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==" "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q=="
}, },
"webidl-conversions": { "webidl-conversions": {
"version": "3.0.1", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="
}, },
"whatwg-url": { "whatwg-url": {
"version": "5.0.0", "version": "11.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
"requires": { "requires": {
"tr46": "~0.0.3", "tr46": "^3.0.0",
"webidl-conversions": "^3.0.0" "webidl-conversions": "^7.0.0"
} }
}, },
"ws": { "ws": {
+2 -1
View File
@@ -17,7 +17,8 @@
"nginx": "^1.0.8", "nginx": "^1.0.8",
"node-fetch": "^3.2.9", "node-fetch": "^3.2.9",
"stripe": "^9.15.0", "stripe": "^9.15.0",
"undici": "^5.8.0" "undici": "^5.8.0",
"uuid": "^8.3.2"
}, },
"type": "module" "type": "module"
} }
+9 -2
View File
@@ -152,7 +152,7 @@
<script> <script>
window.onload = () => { window.onload = () => {
if (!window.localStorage.getItem('serverInfo')) { if (!window.localStorage.getItem('sessionId')) {
document.getElementById('guildslink').href = ''; document.getElementById('guildslink').href = '';
document.getElementById('guildslink').style = 'cursor: no-drop;'; document.getElementById('guildslink').style = 'cursor: no-drop;';
@@ -164,7 +164,14 @@
function logout() { function logout() {
window.localStorage.clear(); window.localStorage.clear();
window.location.href = 'index.html'; window.sessionStorage.clear();
var xhr = new XMLHttpRequest();
xhr.open('post', 'http://www.selmerbot.com/logout/', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.setRequestHeader('sessionid', window.localStorage.getItem('sessionId'));
xhr.onloadend = (e) => { window.location.href = 'index.html'; }
xhr.send();
} }
//Get the redirect link <!-- NOTE: "response_type=token" ALWAYS!!! http://www.selmerbot.com/ --> //Get the redirect link <!-- NOTE: "response_type=token" ALWAYS!!! http://www.selmerbot.com/ -->