Browse Source

Major Internal Changes (#7)

* Made some minor changes, still need to make bug fixes

* Added some minor changes, still need to make bug fixes

* Added some minor changes, still need to make bug fixes

* Still need to fix auth issue with Docker

* Major changes: going to detail more

* Major changes detailed in PR, also added functionality that makes it so you have to react to previous question before requesting another

* Changes are detailed in PR

* Fixed minor bugs with packages

Co-authored-by: Abheek <67982792+ADawesomeguy@users.noreply.github.com>
pull/8/head
TejasOS 4 years ago
committed by GitHub
parent
commit
d7d5781f6c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .gitignore
  2. 555
      bot/awesomescibo.mjs
  3. 14
      bot/mongooseModels/mongooseUserScoreModel.js
  4. 580
      bot/package-lock.json
  5. 8
      bot/package.json
  6. 1
      bot/userScore/id
  7. 2868
      package-lock.json
  8. 10
      package.json

4
.gitignore

@ -5,4 +5,6 @@ round.html
round.md
round.pdf
bot/README.md
.eslintrc.json
.eslintrc
.json
.env

555
bot/awesomescibo.mjs

@ -1,76 +1,551 @@
#!/usr/bin/env node
import * as Discord from 'discord.js';
import { execSync } from 'child_process';
import fetch from 'node-fetch';
import * as fs from 'fs';
import * as path from 'path';
import * as commands from './commands.js';
import * as Discord from "discord.js";
import { execSync } from "child_process";
const client = new Discord.Client({
partials: ["MESSAGE", "CHANNEL", "REACTION"],
});
import fetch from "node-fetch";
import * as fs from "fs";
import axios from "axios";
import userScore from "./mongooseModels/mongooseUserScoreModel.js";
import {} from "dotenv/config.js";
import mongoose from "mongoose";
const helpMessage =
"`do be helping`: display this help message\n`do be roundgen`: send a pdf round to the channel\n`do be roundgen dm`: dm a pdf round to you\n`do be scoring`: start a scoring session\n > `do be scoring (a/b)(4/10)`: add points to Team A or Team B\n > `do be scoring stop`: end scoring session and post final points\n > `do be servers`: send the number of servers this bot is a part of\n > `do be iss`: show the current location of the International Space Station\n`do be training`: send a quick practice problem (you **must** react to your answer, or the bot will yell at you)\n > subject options: astro, phys, chem, math, bio, ess, energy\n`do be top`: list cross-server top 10 players\n `do be about`: List people who contributed to this bot\n Source Code: https://github.com/ADawesomeguy/AwesomeSciBo (don't forget to star!)";
const client = new Discord.Client({ partials: ['MESSAGE', 'CHANNEL', 'REACTION'] });
client.once("ready", () => {
mongoose
.connect(process.env.MONGO_URI, {
useUnifiedTopology: true,
useNewUrlParser: true,
})
.then(() => {
console.log(client.user.username);
client.user.setActivity(
'for "do be helping" | Add me to your own server: adat.link/awscibo',
{ type: "WATCHING" }
);
})
.catch((err) => console.log(err));
});
let hits = 0;
client.on("guildCreate", (guild) => {
guild.channels.cache
.find(
(channel) =>
channel.name === process.env.WELCOME_CHANNEL && channel.type === "text"
)
.send("'Sup, I'm the AwesomeSciBo bot!")
.catch(console.error);
});
if (fs.existsSync('numhits.txt')) {
fs.readFile('numhits.txt', 'utf8', function (err, data) {
hits = data;
if (err) {
function getSubjectUrl(subject) {
return `https://moose.lcsrc.org/subjects/${subject}.json`;
}
async function updateScore(isCorrect, score, authorId) {
if (!isCorrect) {
return `Nice try! Your score is still ${score}.`;
} else {
score += 4;
if (score == 4) {
const newUserScore = new userScore({
authorID: authorId,
score: score,
});
newUserScore.save((err) =>
err
? console.log("Error creating new user for scoring")
: console.log("Sucessfully created user to score.")
);
} else {
const doc = await userScore.findOne({
authorID: authorId,
});
doc.score = doc.score + 4;
doc.save();
console.log("Succesfully updated score.");
}
return `Great job! Your score is now ${score}.`;
}
}
async function otherCommands(message) {
if (
message.content.toLowerCase().startsWith("do be announcing") &&
(message.author.id === process.env.ABHEEK_USER_ID ||
message.author.id === process.env.TEJAS_USER_ID)
) {
const announcement = message.content.substring(17);
client.guilds.cache.forEach((guild) => {
const channel = guild.channels.cache.find(
(channelGeneral) =>
channelGeneral.name === process.env.ANNOUNCING_CHANNEL
);
if (channel) {
if (channel.type === "text") {
channel.send(announcement).catch(console.error);
}
}
});
} else if (message.content.toLowerCase().startsWith("do be training")) {
const authorId = message.author.id;
let score;
userScore
.findOne({ authorID: authorId })
.lean()
.then((obj, err) => {
if (!obj) {
score = 0;
} else if (obj) {
score = obj.score;
} else {
console.log(err);
}
});
if (message.content === "do be training") {
axios.get("https://scibowldb.com/api/questions/random").then((res) => {
const data = res.data;
const messageAuthorFilter = (m) => m.author.id === message.author.id;
message.reply(data.question.tossup_question).then(() => {
message.channel
.awaitMessages(messageAuthorFilter, {
max: 1,
time: 30000,
errors: ["time"],
})
.then((answerMsg) => {
answerMsg = answerMsg.first();
let predicted = null;
if (data.question.tossup_format === "Multiple Choice") {
if (
answerMsg.content.charAt(0).toLowerCase() ===
data.question.tossup_answer.charAt(0).toLowerCase()
) {
predicted = "correct";
} else {
fs.writeFile('numhits.txt', hits.toString(), (error) => { if (error) { console.log(error); } });
predicted = "incorrect";
}
} else {
if (
answerMsg.content.toLowerCase() ===
data.question.tossup_answer.toLowerCase()
) {
predicted = "correct";
} else {
predicted = "incorrect";
}
}
client.once('ready', () => {
console.log(client.user.username);
client.user.setActivity("for \"do be helping\" | Add me to your own server: adat.link/awscibo", { type: "WATCHING" });
answerMsg.channel.send(
`Correct answer: **${data.question.tossup_answer}**. Predicted: **${predicted}**. Please react to your answer!`
);
answerMsg.react("✅");
answerMsg.react("❌");
const filter = (reaction, user) => {
return (
["❌", "✅"].includes(reaction.emoji.name) &&
user.id === answerMsg.author.id
);
};
answerMsg
.awaitReactions(filter, {
max: 1,
time: 600000,
errors: ["time"],
})
.then((userReaction) => {
const reaction = userReaction.first();
if (reaction.emoji.name === "❌") {
updateScore(false, score, authorId).then((msgToReply) =>
answerMsg.reply(msgToReply)
);
} else {
updateScore(true, score, authorId).then((msgToReply) =>
answerMsg.reply(msgToReply)
);
}
});
});
});
});
} else {
const subject = message.content.substring(15);
let subjectURL;
switch (subject) {
case "astro":
case "astronomy":
subjectURL = getSubjectUrl("astronomy");
break;
case "bio":
case "biology":
subjectURL = getSubjectUrl("biology");
break;
case "ess":
case "earth science":
case "es":
subjectURL = getSubjectUrl("ess");
break;
case "chem":
case "chemistry":
subjectURL = getSubjectUrl("astronomy");
break;
case "phys":
case "physics":
subjectURL = getSubjectUrl("physics");
break;
case "math":
subjectURL = getSubjectUrl("math");
break;
case "energy":
subjectURL = getSubjectUrl("energy");
break;
default:
message.channel.send("Not a valid subject!");
return;
}
axios
.get(subjectURL)
.then((res) => {
const data = res.data;
const questionNum = Math.floor(Math.random() * data.length);
const messageFilter = (m) => m.author.id === authorId;
message.reply(data[questionNum].tossup_question).then(() => {
message.channel
.awaitMessages(messageFilter, {
max: 1,
time: 30000,
errors: ["time"],
})
.then((answerMsg) => {
answerMsg = answerMsg.first();
let predicted = null;
if (data[questionNum].tossup_format === "Multiple Choice") {
if (
answerMsg.content.charAt(0).toLowerCase() ===
data[questionNum].tossup_answer.charAt(0).toLowerCase()
) {
predicted = "correct";
} else {
predicted = "incorrect";
}
} else {
if (
answerMsg.content.toLowerCase() ===
data[questionNum].tossup_answer.toLowerCase()
) {
predicted = "correct";
} else {
predicted = "incorrect";
}
}
answerMsg.channel.send(
`Correct answer: **${data[questionNum].tossup_answer}**. Predicted: **${predicted}**. Please react to your answer!`
);
answerMsg.react("✅");
answerMsg.react("❌");
const reactionFilter = (reaction, user) => {
return (
["❌", "✅"].includes(reaction.emoji.name) &&
user.id === answerMsg.author.id
);
};
answerMsg
.awaitReactions(reactionFilter, {
max: 1,
time: 600000,
errors: ["time"],
})
.then(async (userReaction) => {
const reaction = userReaction.first();
if (reaction.emoji.name == "❌") {
updateScore(false, score, authorId).then((msgToReply) =>
answerMsg.reply(msgToReply)
);
} else {
updateScore(true, score, authorId).then((msgToReply) =>
answerMsg.reply(msgToReply)
);
}
})
.catch((collected) => {}); // Reaction message filter
})
.catch((collected, error) => {
message.reply("\n**ANSWER TIMEOUT**");
});
});
})
.catch(console.error);
}
} else {
// Not any of the commands supported
message.channel.send(
"That didn't quite make sense! Please use `do be helping` to see the available commands."
);
}
}
function sendHelpMessage(message) {
message.channel.send(
new Discord.MessageEmbed().setTitle("Help").setDescription(helpMessage)
);
}
client.on('guildCreate', guild => {
guild.channels.cache.find(channel => channel.name === 'general' && channel.type === 'text').send("'Sup, I'm the AwesomeSciBo bot!").catch(console.error);
async function generateRound(message, isDM) {
fs.writeFile("index.html", "<h1>Here's your round!</h1>", (error) => {
if (error) {
console.log(error);
}
});
let i;
let generatingMsg = await message.channel.send("Generating...");
for (i = 1; i < 26; i++) {
let tossup_question;
let question_category;
let tossup_format;
let tossup_answer;
let bonus_question;
let bonus_format;
let bonus_answer;
let htmlContent = "";
await fetch("https://scibowldb.com/api/questions/random")
.then((response) => response.json())
.then((data) => {
tossup_question = data.question.tossup_question;
tossup_answer = data.question.tossup_answer;
question_category = data.question.category;
tossup_format = data.question.tossup_format;
bonus_question = data.question.bonus_question;
bonus_answer = data.question.bonus_answer;
bonus_format = data.question.bonus_format;
htmlContent =
`<br><br>${i}. Tossup\n<br><br>` +
`<strong>${question_category}</strong>` +
" " +
`<em>${tossup_format}</em>` +
" " +
tossup_question +
"<br><br>" +
"<strong>ANSWER:</strong> " +
tossup_answer +
"<br><br>";
htmlContent +=
"<br><br>Bonus\n<br><br>" +
`<strong>${question_category}</strong>` +
" " +
`<em>${bonus_format}</em>` +
" " +
bonus_question +
"<br><br>" +
"<strong>ANSWER:</strong> " +
bonus_answer +
"<br><br>";
htmlContent = htmlContent.replace(/\n/g, "<br>");
fs.appendFile("index.html", htmlContent, (error) => {
if (error) {
console.log(error);
}
});
});
}
if (generatingMsg) {
generatingMsg.delete({ timeout: 100 }).catch(console.error);
}
execSync(
"curl --request POST --url https://localhost:3136/convert/html --header 'Content-Type: multipart/form-data' --form files=@index.html -o round.pdf",
{ encoding: "utf-8" }
);
if (isDM) {
client.users.cache
.get(message.author.id)
.send(
new Discord.MessageEmbed()
.setTitle("Here's your round!")
.attachFiles("round.pdf")
)
.catch(() =>
message.reply(
"Unable to DM you! Make sure DMs from server members are allowed."
)
);
} else {
message.channel.send(
new Discord.MessageEmbed()
.setTitle("Here's your round!")
.attachFiles("round.pdf")
);
}
}
async function startScoring(message) {
let scoreA = 0;
let scoreB = 0;
await message.channel
.send(`Here's the score:\nTeam A: ${scoreA}\nTeam B: ${scoreB}`)
.then((scoreboard) => {
const filter = (m) => m.content.includes("do be");
const collector = message.channel.createMessageCollector(filter, {
time: 1500000,
});
collector.on("collect", (m) => {
if (m.content.toLowerCase() === "do be scoring a 4") {
// A team gets toss-up
m.delete({ timeout: 1000 }).catch(console.error);
scoreA += 4;
scoreboard.channel.send(
`Here's the score:\nTeam A: ${scoreA}\nTeam B: ${scoreB}`
);
} else if (m.content.toLowerCase() === "do be scoring a 10") {
// A team gets bonus
m.delete({ timeout: 1000 }).catch(console.error);
scoreA += 10;
scoreboard.channel.send(
`Here's the score:\nTeam A: ${scoreA}\nTeam B: ${scoreB}`
);
} else if (m.content.toLowerCase() === "do be scoring b 4") {
// B team gets toss up
m.delete({ timeout: 1000 }).catch(console.error);
scoreB += 4;
scoreboard.channel.send(
`Here's the score:\nTeam A: ${scoreA}\nTeam B: ${scoreB}`
);
} else if (m.content.toLowerCase() === "do be scoring b 10") {
// B team gets bonus
m.delete({ timeout: 1000 }).catch(console.error);
scoreB += 10;
scoreboard.channel.send(
`Here's the score:\nTeam A: ${scoreA}\nTeam B: ${scoreB}`
);
} else if (m.content === "do be scoring stop") {
m.delete({ timeout: 1000 }).catch(console.error);
scoreboard.delete({ timeout: 1000 });
m.channel.send(
`**FINAL SCORE:**\nTeam A: ${scoreA}\nTeam B: ${scoreB}`
);
collector.stop();
}
});
});
}
function dontWorryBeHappy(message) {
message.channel.send(
new Discord.MessageEmbed()
.setTitle(`Don't Worry Be Happy!`)
.setImage("https://media.giphy.com/media/7OKC8ZpTT0PVm/giphy.gif")
.setURL("https://youtu.be/d-diB65scQU")
);
}
client.on('message', async message => {
function showServerNumber(message) {
message.channel.send(client.guilds.cache.size);
}
async function showIssLocation(message) {
await fetch("http://api.open-notify.org/iss-now.json")
.then((request) => request.json())
.then((data) => {
message.channel.send(
new Discord.MessageEmbed()
.setTitle("The current location of the ISS!")
.setImage(
`https://api.mapbox.com/styles/v1/mapbox/light-v10/static/pin-s+000(${data.iss_position.longitude},${data.iss_position.latitude})/-87.0186,20,1/1000x1000?access_token=pk.eyJ1IjoiYWRhd2Vzb21lZ3V5IiwiYSI6ImNrbGpuaWdrYzJ0bGYydXBja2xsNmd2YTcifQ.Ude0UFOf9lFcQ-3BANWY5A`
)
.setURL("https://spotthestation.nasa.gov/tracking_map.cfm")
);
});
}
function showLeaderboard(message) {
let messageContent = "";
userScore
.find({})
.sort({ score: -1 }) // Sort by descending order
.exec((err, obj) => {
if (err) {
console.log(err);
return message.reply(
"Uh oh! :( There was an internal error. Please try again."
);
}
if (obj.length < 10) {
// Need at least 10 scores for top 10
return message.reply(
`There are only ${obj.length} users, we need at least 10!`
);
}
for (let i = 0; i < 10; i++) {
messageContent += `${i + 1}: <@${obj[i].authorID}>: ${obj[i].score}\n`; // Loop through each user and add their name and score to leaderboard content
}
message.channel.send(
new Discord.MessageEmbed()
.setTitle("Top Ten!")
.setDescription(messageContent)
);
});
}
function aboutMessage(message) {
message.channel.send(
new Discord.MessageEmbed().setTitle("Contributors: ").setDescription(`
<@745063586422063214>
<@650525101048987649>
`) // Add more contributors here, first one is Abheek, second one is Tejas
);
}
client.on("message", async (message) => {
if (message.author.bot) {
return;
}
const formattedMessage = message.content.toLowerCase().replace(/\s+/g, '');
const formattedMessage = message.content.toLowerCase().replace(" ", "");
if (formattedMessage.startsWith("dobe")) {
// Bot prefix is "do be"
switch (formattedMessage) {
case 'dobehits':
commands.checkHits(message, hits);
case "dobehelping": // Display help message
sendHelpMessage(message);
break;
case 'dobehelping':
commands.sendHelpMessage(message);
case "doberoundgen": // Generate round publicly
generateRound(message, false);
break;
case 'doberoundgen':
commands.generateRound(message, false);
case "doberoundgendm": // Generate round through DM
generateRound(message, true);
break;
case 'doberoundgendm':
commands.generateRound(message, true);
case "dobescoring": // Start scoring
startScoring(message);
break;
case 'dobescoring':
commands.startScoring(message);
case "dobetop": // Top 10 scores
showLeaderboard(message);
break;
case 'dobetop':
commands.showLeaderboard(message);
case "dobehappy": // Send happy message
dontWorryBeHappy(message);
break;
case 'dobehappy':
commands.dontWorryBeHappy(message);
case "dobeservers": // Shows number of servers bot is in
showServerNumber(message);
break;
case 'dobeservers':
commands.showServerNumber(message);
case "dobeiss": // Show location of ISS
showIssLocation(message);
break;
case 'dobeiss':
commands.showIssLocation(message);
case "dobeabout": // Show about message of bot
aboutMessage(message);
break;
default:
commands.otherCommands(message);
// Do be training
otherCommands(message);
}
}
});
client.login(process.argv[2]).catch(error => console.log(error));
client
.login(process.env.TOKEN)
.then(() => console.log("Running!"))
.catch((error) => console.log(error));

14
bot/mongooseModels/mongooseUserScoreModel.js

@ -0,0 +1,14 @@
const mongoose = require("mongoose");
const userScoreSchema = new mongoose.Schema({
authorID: {
type: String,
required: true,
},
score: {
type: Number,
required: true,
},
});
module.exports = mongoose.model("UserScore", userScoreSchema);

580
bot/package-lock.json

@ -9,9 +9,12 @@
"version": "0.4.1",
"license": "Apache 2.0",
"dependencies": {
"axios": "^0.21.1",
"discord.js": "^12.5.1",
"dotenv": "^8.2.0",
"eslint": "^7.21.0",
"fs": "^0.0.1-security",
"mongoose": "^5.12.5",
"node-fetch": "^2.6.1"
},
"bin": {
@ -134,6 +137,28 @@
"node": "^10.12.0 || >=12.0.0"
}
},
"node_modules/@types/bson": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.3.tgz",
"integrity": "sha512-mVRvYnTOZJz3ccpxhr3wgxVmSeiYinW+zlzQz3SXWaJmD1DuL05Jeq7nKw3SnbKmbleW5qrLG5vdyWe/A9sXhw==",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/mongodb": {
"version": "3.6.12",
"resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.12.tgz",
"integrity": "sha512-49aEzQD5VdHPxyd5dRyQdqEveAg9LanwrH8RQipnMuulwzKmODXIZRp0umtxi1eBUfEusRkoy8AVOMr+kVuFog==",
"dependencies": {
"@types/bson": "*",
"@types/node": "*"
}
},
"node_modules/@types/node": {
"version": "14.14.41",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.41.tgz",
"integrity": "sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g=="
},
"node_modules/abort-controller": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
@ -220,11 +245,33 @@
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"node_modules/axios": {
"version": "0.21.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
"dependencies": {
"follow-redirects": "^1.10.0"
}
},
"node_modules/balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"node_modules/bl": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz",
"integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==",
"dependencies": {
"readable-stream": "^2.3.5",
"safe-buffer": "^5.1.1"
}
},
"node_modules/bluebird": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
"integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
},
"node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@ -234,6 +281,14 @@
"concat-map": "0.0.1"
}
},
"node_modules/bson": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz",
"integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg==",
"engines": {
"node": ">=0.6.19"
}
},
"node_modules/callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@ -286,6 +341,11 @@
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"node_modules/core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@ -323,6 +383,15 @@
"node": ">=0.4.0"
}
},
"node_modules/denque": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz",
"integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==",
"engines": {
"node": ">=0.10"
}
},
"node_modules/discord.js": {
"version": "12.5.1",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.5.1.tgz",
@ -352,6 +421,14 @@
"node": ">=6.0.0"
}
},
"node_modules/dotenv": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
"integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==",
"engines": {
"node": ">=8"
}
},
"node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
@ -603,6 +680,25 @@
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz",
"integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA=="
},
"node_modules/follow-redirects": {
"version": "1.13.3",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz",
"integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/fs": {
"version": "0.0.1-security",
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
@ -733,6 +829,11 @@
"node": ">=0.10.0"
}
},
"node_modules/isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"node_modules/isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
@ -765,6 +866,11 @@
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
"integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE="
},
"node_modules/kareem": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz",
"integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ=="
},
"node_modules/levn": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
@ -793,6 +899,12 @@
"node": ">=10"
}
},
"node_modules/memory-pager": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
"integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
"optional": true
},
"node_modules/mime-db": {
"version": "1.46.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz",
@ -823,6 +935,120 @@
"node": "*"
}
},
"node_modules/mongodb": {
"version": "3.6.6",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.6.tgz",
"integrity": "sha512-WlirMiuV1UPbej5JeCMqE93JRfZ/ZzqE7nJTwP85XzjAF4rRSeq2bGCb1cjfoHLOF06+HxADaPGqT0g3SbVT1w==",
"dependencies": {
"bl": "^2.2.1",
"bson": "^1.1.4",
"denque": "^1.4.1",
"optional-require": "^1.0.2",
"safe-buffer": "^5.1.2",
"saslprep": "^1.0.0"
},
"engines": {
"node": ">=4"
},
"optionalDependencies": {
"saslprep": "^1.0.0"
},
"peerDependenciesMeta": {
"aws4": {
"optional": true
},
"bson-ext": {
"optional": true
},
"kerberos": {
"optional": true
},
"mongodb-client-encryption": {
"optional": true
},
"mongodb-extjson": {
"optional": true
},
"snappy": {
"optional": true
}
}
},
"node_modules/mongoose": {
"version": "5.12.5",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.12.5.tgz",
"integrity": "sha512-VVoqiELZcoI2HhHDuPpfN3qmExrtIeXSWNb1nihf4w1SJoWGXilU/g2cQgeeSMc2vAHSZd5Nv2sNPvbZHFw+pg==",
"dependencies": {
"@types/mongodb": "^3.5.27",
"bson": "^1.1.4",
"kareem": "2.3.2",
"mongodb": "3.6.6",
"mongoose-legacy-pluralize": "1.0.2",
"mpath": "0.8.3",
"mquery": "3.2.5",
"ms": "2.1.2",
"regexp-clone": "1.0.0",
"safe-buffer": "5.2.1",
"sift": "7.0.1",
"sliced": "1.0.1"
},
"engines": {
"node": ">=4.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mongoose"
}
},
"node_modules/mongoose-legacy-pluralize": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz",
"integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==",
"peerDependencies": {
"mongoose": "*"
}
},
"node_modules/mpath": {
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.3.tgz",
"integrity": "sha512-eb9rRvhDltXVNL6Fxd2zM9D4vKBxjVVQNLNijlj7uoXUy19zNDsIif5zR+pWmPCWNKwAtqyo4JveQm4nfD5+eA==",
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/mquery": {
"version": "3.2.5",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.5.tgz",
"integrity": "sha512-VjOKHHgU84wij7IUoZzFRU07IAxd5kWJaDmyUzQlbjHjyoeK5TNeeo8ZsFDtTYnSgpW6n/nMNIHvE3u8Lbrf4A==",
"dependencies": {
"bluebird": "3.5.1",
"debug": "3.1.0",
"regexp-clone": "^1.0.0",
"safe-buffer": "5.1.2",
"sliced": "1.0.1"
},
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/mquery/node_modules/debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dependencies": {
"ms": "2.0.0"
}
},
"node_modules/mquery/node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"node_modules/mquery/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@ -849,6 +1075,14 @@
"wrappy": "1"
}
},
"node_modules/optional-require": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.0.3.tgz",
"integrity": "sha512-RV2Zp2MY2aeYK5G+B/Sps8lW5NHAzE5QClbFP15j+PWmP+T9PxlJXBOOLoSAdgwFvS4t0aMR4vpedMkbHfh0nA==",
"engines": {
"node": ">=4"
}
},
"node_modules/optionator": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
@ -905,6 +1139,11 @@
"resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.2.7.tgz",
"integrity": "sha512-thS1z3L6BDmf724sqLC73bHGjSYArFTYHa7cqInyS3EdDNTHKgDCXy7l+IhRvlnX7aFNiUb8jJcC+R8ezxwgMA=="
},
"node_modules/process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"node_modules/progress": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
@ -921,6 +1160,30 @@
"node": ">=6"
}
},
"node_modules/readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"node_modules/readable-stream/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/regexp-clone": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz",
"integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw=="
},
"node_modules/regexpp": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz",
@ -956,6 +1219,37 @@
"rimraf": "bin.js"
}
},
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/saslprep": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
"integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
"optional": true,
"dependencies": {
"sparse-bitfield": "^3.0.3"
},
"engines": {
"node": ">=6"
}
},
"node_modules/semver": {
"version": "7.3.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
@ -994,6 +1288,11 @@
"node": ">=8"
}
},
"node_modules/sift": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz",
"integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g=="
},
"node_modules/slice-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
@ -1007,11 +1306,38 @@
"node": ">=10"
}
},
"node_modules/sliced": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
"integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
},
"node_modules/sparse-bitfield": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
"integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
"optional": true,
"dependencies": {
"memory-pager": "^1.0.2"
}
},
"node_modules/sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
},
"node_modules/string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dependencies": {
"safe-buffer": "~5.1.0"
}
},
"node_modules/string_decoder/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/string-width": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
@ -1122,6 +1448,11 @@
"punycode": "^2.1.0"
}
},
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"node_modules/v8-compile-cache": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
@ -1269,6 +1600,28 @@
"strip-json-comments": "^3.1.1"
}
},
"@types/bson": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.3.tgz",
"integrity": "sha512-mVRvYnTOZJz3ccpxhr3wgxVmSeiYinW+zlzQz3SXWaJmD1DuL05Jeq7nKw3SnbKmbleW5qrLG5vdyWe/A9sXhw==",
"requires": {
"@types/node": "*"
}
},
"@types/mongodb": {
"version": "3.6.12",
"resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.12.tgz",
"integrity": "sha512-49aEzQD5VdHPxyd5dRyQdqEveAg9LanwrH8RQipnMuulwzKmODXIZRp0umtxi1eBUfEusRkoy8AVOMr+kVuFog==",
"requires": {
"@types/bson": "*",
"@types/node": "*"
}
},
"@types/node": {
"version": "14.14.41",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.41.tgz",
"integrity": "sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g=="
},
"abort-controller": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
@ -1334,11 +1687,33 @@
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"axios": {
"version": "0.21.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
"requires": {
"follow-redirects": "^1.10.0"
}
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"bl": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz",
"integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==",
"requires": {
"readable-stream": "^2.3.5",
"safe-buffer": "^5.1.1"
}
},
"bluebird": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
"integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@ -1348,6 +1723,11 @@
"concat-map": "0.0.1"
}
},
"bson": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz",
"integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg=="
},
"callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@ -1388,6 +1768,11 @@
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@ -1416,6 +1801,11 @@
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"denque": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz",
"integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ=="
},
"discord.js": {
"version": "12.5.1",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.5.1.tgz",
@ -1439,6 +1829,11 @@
"esutils": "^2.0.2"
}
},
"dotenv": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
"integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
},
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
@ -1634,6 +2029,11 @@
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz",
"integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA=="
},
"follow-redirects": {
"version": "1.13.3",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz",
"integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA=="
},
"fs": {
"version": "0.0.1-security",
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
@ -1734,6 +2134,11 @@
"is-extglob": "^2.1.1"
}
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
@ -1763,6 +2168,11 @@
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
"integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE="
},
"kareem": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz",
"integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ=="
},
"levn": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
@ -1785,6 +2195,12 @@
"yallist": "^4.0.0"
}
},
"memory-pager": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
"integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
"optional": true
},
"mime-db": {
"version": "1.46.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz",
@ -1806,6 +2222,81 @@
"brace-expansion": "^1.1.7"
}
},
"mongodb": {
"version": "3.6.6",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.6.tgz",
"integrity": "sha512-WlirMiuV1UPbej5JeCMqE93JRfZ/ZzqE7nJTwP85XzjAF4rRSeq2bGCb1cjfoHLOF06+HxADaPGqT0g3SbVT1w==",
"requires": {
"bl": "^2.2.1",
"bson": "^1.1.4",
"denque": "^1.4.1",
"optional-require": "^1.0.2",
"safe-buffer": "^5.1.2",
"saslprep": "^1.0.0"
}
},
"mongoose": {
"version": "5.12.5",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.12.5.tgz",
"integrity": "sha512-VVoqiELZcoI2HhHDuPpfN3qmExrtIeXSWNb1nihf4w1SJoWGXilU/g2cQgeeSMc2vAHSZd5Nv2sNPvbZHFw+pg==",
"requires": {
"@types/mongodb": "^3.5.27",
"bson": "^1.1.4",
"kareem": "2.3.2",
"mongodb": "3.6.6",
"mongoose-legacy-pluralize": "1.0.2",
"mpath": "0.8.3",
"mquery": "3.2.5",
"ms": "2.1.2",
"regexp-clone": "1.0.0",
"safe-buffer": "5.2.1",
"sift": "7.0.1",
"sliced": "1.0.1"
}
},
"mongoose-legacy-pluralize": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz",
"integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==",
"requires": {}
},
"mpath": {
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.3.tgz",
"integrity": "sha512-eb9rRvhDltXVNL6Fxd2zM9D4vKBxjVVQNLNijlj7uoXUy19zNDsIif5zR+pWmPCWNKwAtqyo4JveQm4nfD5+eA=="
},
"mquery": {
"version": "3.2.5",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.5.tgz",
"integrity": "sha512-VjOKHHgU84wij7IUoZzFRU07IAxd5kWJaDmyUzQlbjHjyoeK5TNeeo8ZsFDtTYnSgpW6n/nMNIHvE3u8Lbrf4A==",
"requires": {
"bluebird": "3.5.1",
"debug": "3.1.0",
"regexp-clone": "^1.0.0",
"safe-buffer": "5.1.2",
"sliced": "1.0.1"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@ -1829,6 +2320,11 @@
"wrappy": "1"
}
},
"optional-require": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.0.3.tgz",
"integrity": "sha512-RV2Zp2MY2aeYK5G+B/Sps8lW5NHAzE5QClbFP15j+PWmP+T9PxlJXBOOLoSAdgwFvS4t0aMR4vpedMkbHfh0nA=="
},
"optionator": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
@ -1870,6 +2366,11 @@
"resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.2.7.tgz",
"integrity": "sha512-thS1z3L6BDmf724sqLC73bHGjSYArFTYHa7cqInyS3EdDNTHKgDCXy7l+IhRvlnX7aFNiUb8jJcC+R8ezxwgMA=="
},
"process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"progress": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
@ -1880,6 +2381,32 @@
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
},
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
"regexp-clone": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz",
"integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw=="
},
"regexpp": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz",
@ -1903,6 +2430,20 @@
"glob": "^7.1.3"
}
},
"safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
},
"saslprep": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
"integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
"optional": true,
"requires": {
"sparse-bitfield": "^3.0.3"
}
},
"semver": {
"version": "7.3.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
@ -1929,6 +2470,11 @@
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="
},
"sift": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz",
"integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g=="
},
"slice-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
@ -1939,11 +2485,40 @@
"is-fullwidth-code-point": "^3.0.0"
}
},
"sliced": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
"integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
},
"sparse-bitfield": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
"integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
"optional": true,
"requires": {
"memory-pager": "^1.0.2"
}
},
"sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
},
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
"string-width": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
@ -2035,6 +2610,11 @@
"punycode": "^2.1.0"
}
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"v8-compile-cache": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",

8
bot/package.json

@ -1,8 +1,11 @@
{
"dependencies": {
"axios": "^0.21.1",
"discord.js": "^12.5.1",
"dotenv": "^8.2.0",
"eslint": "^7.21.0",
"fs": "^0.0.1-security",
"mongoose": "^5.12.5",
"node-fetch": "^2.6.1"
},
"name": "awscibo",
@ -12,7 +15,8 @@
"awscibo": "./awesomescibo.mjs"
},
"scripts": {
"test": "node awesomescibo.mjs randomtoken"
"test": "node awesomescibo.mjs randomtoken",
"start": "nodemon awesomescibo.mjs"
},
"keywords": [
"discord",
@ -20,7 +24,7 @@
"science bowl",
"discord.js"
],
"author": "Abheek Dhawan",
"author": "Abheek Dhawan&Tejas Chugh",
"license": "Apache 2.0",
"description": "A simple Discord bot that automatically generates Science Bowl rounds using the ScibowlDB API!"
}

1
bot/userScore/id

@ -1 +0,0 @@
0

2868
package-lock.json

File diff suppressed because it is too large

10
package.json

@ -0,0 +1,10 @@
{
"dependencies": {
"axios": "^0.21.1",
"dotenv": "^8.2.0",
"mongoose": "^5.12.4"
},
"devDependencies": {
"nodemon": "^2.0.7"
}
}
Loading…
Cancel
Save