Skip to content

Commit

Permalink
⬆️Updated dependencies with security flaws
Browse files Browse the repository at this point in the history
  • Loading branch information
wiki-Bird committed Jul 26, 2024
1 parent db287b9 commit ca20883
Show file tree
Hide file tree
Showing 13 changed files with 121 additions and 9,301 deletions.
9,280 changes: 0 additions & 9,280 deletions package-lock.json

This file was deleted.

14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,24 @@
"dependencies": {
"@discordjs/builders": "^0.15.0",
"@discordjs/rest": "^0.5.0",
"@grpc/grpc-js": "^1.8.22",
"braces": "^3.0.3",
"canvas": "^2.11.2",
"discord-api-types": "^0.36.1",
"discord.js": "^13.15.1",
"firebase-admin": "^11.0.0",
"jose": "^4.15.5",
"luxon": "^3.4.4",
"luxon-parser": "^0.9.4",
"nth-check": "^2.1.1",
"nth-check": "^2.0.1",
"overwatch-api": "^0.13.0",
"protobufjs": "^7.2.4",
"semver": "^7.5.4",
"protobufjs": "^7.2.5",
"semver": "^7.5.2",
"tar": "^6.2.1",
"tough-cookie": "^4.1.3",
"word-wrap": "^1.2.5"
"undici": "^5.28.4",
"word-wrap": "^1.2.5",
"ws": "^8.17.1"
},
"devDependencies": {
"@types/luxon": "^3.3.4",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/kick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const kick: Command = {

const embed = new MessageEmbed()
.setTitle("User Kicked:")
.setDescription("<@!" + userID + `> (` + userID + `) has been kicked by ${moderator.tag} for the following reason:`)
.setDescription("<@!" + userID + `> (` + userID + `) has been kicked by ${moderator.username} for the following reason:`)
.addFields(
{ name: "Reason:", value: reason, inline: true },
{ name: "Date:", value: currentDate.toLocaleDateString(), inline: true }
Expand Down
4 changes: 2 additions & 2 deletions src/commands/modlogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const modlog: Command = {
if (userID === client.user.id) {
embed.setTitle("User " + userID + "'s moderation history (user not in server):");
} else {
embed.setAuthor({ name: userNamed.tag + "'s moderation history:", iconURL: userNamed.displayAvatarURL() });
embed.setAuthor({ name: userNamed.username + "'s moderation history:", iconURL: userNamed.displayAvatarURL() });
}
if (page < totalPages) {
embed.setFooter({ text: "Page " + page + " of " + totalPages + " | /modlog " + userID + " " + (page + 1) + " for the next page."});
Expand Down Expand Up @@ -123,7 +123,7 @@ const modlog: Command = {
if (userID === client.user.id) {
embed.setTitle("User " + userID + "'s " + type + " history (user not in server):");
} else {
embed.setAuthor({ name: userNamed.tag + "'s " + type + " history:", iconURL: userNamed.displayAvatarURL() });
embed.setAuthor({ name: userNamed.username + "'s " + type + " history:", iconURL: userNamed.displayAvatarURL() });
}

totalPages = Math.ceil(addedFieldCount / 15);
Expand Down
4 changes: 2 additions & 2 deletions src/commands/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const report: Command = {

const reportEmbed = new MessageEmbed()
.setColor("#00f2ff")
.setAuthor({name: `${userNamed.tag} (${userNamed.id}) reported by ${reportingUser.tag}`, iconURL: userNamed.displayAvatarURL()})
.setAuthor({name: `${userNamed.username} (${userNamed.id}) reported by ${reportingUser.username}`, iconURL: userNamed.displayAvatarURL()})
.addFields(
{ name: "Reason:", value: reason},
{ name: "Channel:", value: "<#" + channel.id + ">", inline: true},
Expand Down Expand Up @@ -82,7 +82,7 @@ const report: Command = {
return;
}

interaction.reply({ content: `${userNamed.tag} reported to the mod team.`, ephemeral: true });
interaction.reply({ content: `${userNamed.username} reported to the mod team.`, ephemeral: true });
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/unban.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const unban: Command = {

const embed = new MessageEmbed()
.setTitle("User Unbanned:")
.setDescription("<@!" + userID + `> (` + userID + `) has been unbanned by ${moderator.tag} for the following reason:`)
.setDescription("<@!" + userID + `> (` + userID + `) has been unbanned by ${moderator.username} for the following reason:`)
.addFields(
{ name: "Reason:", value: reason, inline: true },
{ name: "Date:", value: currentDate.toLocaleDateString(), inline: true }
Expand Down
4 changes: 2 additions & 2 deletions src/commands/warn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const warn: Command = {
// Send a message to the user, with the reason and the moderator who warned them
const embed = new MessageEmbed()
.setTitle("Warning:")
.setDescription("<@!" + userID + `> (` + userID + `) has been warned by ${moderator.tag} for the following reason:`)
.setDescription("<@!" + userID + `> (` + userID + `) has been warned by ${moderator.username} for the following reason:`)
.addFields(
{ name: "Reason:", value: reason, inline: true },
{ name: "Date:", value: currentDate.toLocaleDateString(), inline: true }
Expand All @@ -101,7 +101,7 @@ const warn: Command = {
await interaction.editReply({ content: `<@${userID}> has been warned.`, embeds: [embed] });
}
catch (err) {
await interaction.editReply({ content: `Could not DM warning to ${userNamed.tag}.`, embeds: [embed] });
await interaction.editReply({ content: `Could not DM warning to ${userNamed.username}.`, embeds: [embed] });
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/whois.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const whois: Command = {
// .setColor("#00f2ff")
// .setColor(userGuildMember.displayHexColor)
.setColor(color as ColorResolvable)
.setDescription("**" + userNamed.tag + " - <@" + userGuildMember.id + ">**")
.setDescription("**" + userNamed.username + " - <@" + userGuildMember.id + ">**")
.setThumbnail(userGuildMember.user.displayAvatarURL())
.setFooter({ text: `User info requested by ${interaction.user.username} ` })
.setTimestamp();
Expand Down
2 changes: 1 addition & 1 deletion src/events/guildBanAdd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const guildBanAdd: Event<[GuildBan]> = {
.setAuthor({name: `${ban.user.username} (ID: ${ban.user.id}) was banned.`, iconURL: ban.user.displayAvatarURL()})
.addFields(
{ name: "Reason:", value: reasonGiven},
{ name: "Banned by:", value: executor!.tag, inline: true},
{ name: "Banned by:", value: executor!.username, inline: true},
{ name: "Date:", value: new Date().toLocaleDateString(), inline: true}
)
.setTimestamp();
Expand Down
2 changes: 1 addition & 1 deletion src/events/guildMemberRemove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const guildMemberRemove: Event<[GuildMember]> = {
.setAuthor({name: `${member.user.username} (ID: ${member.user.id}) was kicked.`, iconURL: member.user.displayAvatarURL()})
.addFields(
{ name: "Reason:", value: reasonGiven},
{ name: "Kicked by:", value: executor!.tag, inline: true},
{ name: "Kicked by:", value: executor!.username, inline: true},
{ name: "Date:", value: new Date().toLocaleDateString(), inline: true}
)
.setTimestamp();
Expand Down
4 changes: 2 additions & 2 deletions src/events/messageCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const messageCreate: Event<[Message]> = {
// console.log("DM message recieved")
// const DMEmbed = new MessageEmbed();
// DMEmbed.setColor('#00f2ff')
// .setAuthor({ name: `${message.author.tag} sent this message in DMs:`, iconURL: message.author.displayAvatarURL()})
// .setAuthor({ name: `${message.author.username} sent this message in DMs:`, iconURL: message.author.displayAvatarURL()})
// .setFooter({ text: `ID: ${message.id}` })
// .setDescription(message.content);
// // if the message has an image attached, send that too
Expand Down Expand Up @@ -68,7 +68,7 @@ const messageCreate: Event<[Message]> = {
const embed = new MessageEmbed()
.setColor('#ff0000')
.setTitle('Banned Message Deleted')
.setAuthor({ name: `${message.author.tag}`, iconURL: message.author.displayAvatarURL()})
.setAuthor({ name: `${message.author.username}`, iconURL: message.author.displayAvatarURL()})
.setFooter({ text: "Change banned words using /config blacklist" })

// if server punishment is set
Expand Down
4 changes: 2 additions & 2 deletions src/functions/muteUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default async function muteUser(interaction: CommandInteraction<"cached"

const embed = new MessageEmbed()
.setTitle("User Muted:")
.setDescription("<@!" + userID + `> (` + userID + `) has been muted by ${moderator.tag} for the following reason:`)
.setDescription("<@!" + userID + `> (` + userID + `) has been muted by ${moderator.username} for the following reason:`)
.addFields(
{ name: "Reason:", value: reason, inline: true },
{ name: "Date:", value: currentDate.toLocaleDateString(), inline: true },
Expand Down Expand Up @@ -126,7 +126,7 @@ export default async function muteUser(interaction: CommandInteraction<"cached"
if (interaction !== undefined) await interaction.editReply({ content: `<@${userID}> has been muted.`, embeds: [embed] });
}
catch (err) {
if (interaction !== undefined) await interaction.editReply({ content: `Could not DM the kick information to ${userNamed.tag}.`, embeds: [embed] });
if (interaction !== undefined) await interaction.editReply({ content: `Could not DM the kick information to ${userNamed.username}.`, embeds: [embed] });
}

return userConfig;
Expand Down
98 changes: 96 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@
dependencies:
text-decoding "^1.0.0"

"@fastify/busboy@^2.0.0":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.1.tgz#b9da6a878a371829a0502c9b6c1c143ef6663f4d"
integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==

"@firebase/[email protected]":
version "0.9.0"
resolved "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.9.0.tgz"
Expand Down Expand Up @@ -214,6 +219,14 @@
teeny-request "^8.0.0"
uuid "^8.0.0"

"@grpc/grpc-js@^1.8.22":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.11.1.tgz#a92f33e98f1959feffcd1b25a33b113d2c977b70"
integrity sha512-gyt/WayZrVPH2w/UTLansS7F9Nwld472JxxaETamrM8HNlsa+jSLNyKAZmhxI2Me4c3mQHFiS1wWHDY1g1Kthw==
dependencies:
"@grpc/proto-loader" "^0.7.13"
"@js-sdsl/ordered-map" "^4.4.2"

"@grpc/grpc-js@~1.8.0":
version "1.8.21"
resolved "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.8.21.tgz"
Expand All @@ -233,6 +246,16 @@
protobufjs "^7.2.4"
yargs "^17.7.2"

"@grpc/proto-loader@^0.7.13":
version "0.7.13"
resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.7.13.tgz#f6a44b2b7c9f7b609f5748c6eac2d420e37670cf"
integrity sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==
dependencies:
lodash.camelcase "^4.3.0"
long "^5.0.0"
protobufjs "^7.2.5"
yargs "^17.7.2"

"@humanwhocodes/config-array@^0.11.10":
version "0.11.10"
resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz"
Expand Down Expand Up @@ -270,6 +293,11 @@
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"

"@js-sdsl/ordered-map@^4.4.2":
version "4.4.2"
resolved "https://registry.yarnpkg.com/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz#9299f82874bab9e4c7f9c48d865becbfe8d6907c"
integrity sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==

"@jsdoc/salty@^0.2.1":
version "0.2.5"
resolved "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.5.tgz"
Expand Down Expand Up @@ -868,6 +896,13 @@ braces@^3.0.2, braces@~3.0.2:
dependencies:
fill-range "^7.0.1"

braces@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
dependencies:
fill-range "^7.1.1"

[email protected]:
version "1.0.1"
resolved "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz"
Expand Down Expand Up @@ -1450,6 +1485,13 @@ fill-range@^7.0.1:
dependencies:
to-regex-range "^5.0.1"

fill-range@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
dependencies:
to-regex-range "^5.0.1"

find-up@^5.0.0:
version "5.0.0"
resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz"
Expand Down Expand Up @@ -1876,6 +1918,11 @@ jose@^4.10.4:
resolved "https://registry.npmjs.org/jose/-/jose-4.14.4.tgz"
integrity sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g==

jose@^4.15.5:
version "4.15.9"
resolved "https://registry.yarnpkg.com/jose/-/jose-4.15.9.tgz#9b68eda29e9a0614c042fa29387196c7dd800100"
integrity sha512-1vUQX+IdDMVPj4k8kOxgUqlcK518yluMuGZwqlr44FS1ppZB/5GWh4rZG89erpOBOJjU/OBsnCVFfapsRz6nEA==

js-yaml@^4.1.0:
version "4.1.0"
resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz"
Expand Down Expand Up @@ -2370,9 +2417,9 @@ npmlog@^5.0.1:
gauge "^3.0.0"
set-blocking "^2.0.0"

nth-check@^2.1.1:
nth-check@^2.0.1:
version "2.1.1"
resolved "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz"
resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d"
integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==
dependencies:
boolbase "^1.0.0"
Expand Down Expand Up @@ -2543,6 +2590,24 @@ [email protected], protobufjs@^7.0.0, protobufjs@^7.2.4:
"@types/node" ">=13.7.0"
long "^5.0.0"

protobufjs@^7.2.5:
version "7.3.2"
resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.3.2.tgz#60f3b7624968868f6f739430cfbc8c9370e26df4"
integrity sha512-RXyHaACeqXeqAKGLDl68rQKbmObRsTIn4TYVUUug1KfS47YWCo5MacGITEryugIgZqORCvJWEk4l449POg5Txg==
dependencies:
"@protobufjs/aspromise" "^1.1.2"
"@protobufjs/base64" "^1.1.2"
"@protobufjs/codegen" "^2.0.4"
"@protobufjs/eventemitter" "^1.1.0"
"@protobufjs/fetch" "^1.1.0"
"@protobufjs/float" "^1.0.2"
"@protobufjs/inquire" "^1.1.0"
"@protobufjs/path" "^1.1.2"
"@protobufjs/pool" "^1.1.0"
"@protobufjs/utf8" "^1.1.0"
"@types/node" ">=13.7.0"
long "^5.0.0"

pseudomap@^1.0.1:
version "1.0.2"
resolved "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz"
Expand Down Expand Up @@ -2718,6 +2783,11 @@ semver@^7.1.2, semver@^7.3.5, semver@^7.3.8, semver@^7.5.4:
dependencies:
lru-cache "^6.0.0"

semver@^7.5.2:
version "7.6.3"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143"
integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==

semver@~7.0.0:
version "7.0.0"
resolved "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz"
Expand Down Expand Up @@ -2882,6 +2952,18 @@ tar@^6.1.11:
mkdirp "^1.0.3"
yallist "^4.0.0"

tar@^6.2.1:
version "6.2.1"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a"
integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==
dependencies:
chownr "^2.0.0"
fs-minipass "^2.0.0"
minipass "^5.0.0"
minizlib "^2.1.1"
mkdirp "^1.0.3"
yallist "^4.0.0"

teeny-request@^8.0.0:
version "8.0.3"
resolved "https://registry.npmjs.org/teeny-request/-/teeny-request-8.0.3.tgz"
Expand Down Expand Up @@ -3037,6 +3119,13 @@ underscore@~1.13.2:
resolved "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz"
integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==

undici@^5.28.4:
version "5.28.4"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.4.tgz#6b280408edb6a1a604a9b20340f45b422e373068"
integrity sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==
dependencies:
"@fastify/busboy" "^2.0.0"

undici@^5.4.0:
version "5.23.0"
resolved "https://registry.npmjs.org/undici/-/undici-5.23.0.tgz"
Expand Down Expand Up @@ -3163,6 +3252,11 @@ ws@^8.13.0:
resolved "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz"
integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==

ws@^8.17.1:
version "8.18.0"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc"
integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==

xmlcreate@^2.0.4:
version "2.0.4"
resolved "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz"
Expand Down

0 comments on commit ca20883

Please sign in to comment.