From b5eb33701db58e5faf7ef40bfaca6bbebf451315 Mon Sep 17 00:00:00 2001 From: HARSH PATEL <83941233+HarshPatel5940@users.noreply.github.com> Date: Sat, 6 Aug 2022 16:09:15 +0530 Subject: [PATCH 01/13] Fixed Bug -> `Attachment consideration` --- src/features/Anti-SelfBot.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/Anti-SelfBot.ts b/src/features/Anti-SelfBot.ts index 1cff21f..01b0d62 100644 --- a/src/features/Anti-SelfBot.ts +++ b/src/features/Anti-SelfBot.ts @@ -30,6 +30,7 @@ async function CheckSelfBot(targetMsg: Message | PartialMessage) { if (!targetMsg.guild) return; if (targetMsg.author?.bot) return; if (!targetMsg.embeds) return; + if (targetMsg.attachments.size !== 0) return; if (targetMsg.content?.length !== 0) return; await targetMsg.delete(); @@ -37,7 +38,7 @@ async function CheckSelfBot(targetMsg: Message | PartialMessage) { embeds: [ new MessageEmbed().setDescription( ` -:skull: <@&${targetMsg.member?.id}> is a possibly a self bot account!! +:skull: <@${targetMsg.member?.id}> is a possibly a self bot account!! Member Name: ${targetMsg.member?.user.username}#${targetMsg.member?.user.tag} Member ID:${targetMsg.member?.user.id} From aae3da3189356225528b87369ae5135d66a9cb12 Mon Sep 17 00:00:00 2001 From: HARSH PATEL <83941233+HarshPatel5940@users.noreply.github.com> Date: Sat, 6 Aug 2022 16:27:45 +0530 Subject: [PATCH 02/13] Delete Anti-SelfBot.ts Removed it because it was discovering many more bugs with this module... --- src/features/Anti-SelfBot.ts | 56 ------------------------------------ 1 file changed, 56 deletions(-) delete mode 100644 src/features/Anti-SelfBot.ts diff --git a/src/features/Anti-SelfBot.ts b/src/features/Anti-SelfBot.ts deleted file mode 100644 index 01b0d62..0000000 --- a/src/features/Anti-SelfBot.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - Copyright [2022] [HarshPatel5940] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. */ - -import { Client, Message, MessageEmbed, PartialMessage } from "discord.js"; - -export default (client: Client) => { - client.on("messageCreate", async (message) => { - CheckSelfBot(message); - }); - - client.on("messageUpdate", (oldMessage, newMessage) => { - CheckSelfBot(newMessage); - }); -}; - -async function CheckSelfBot(targetMsg: Message | PartialMessage) { - if (!targetMsg) return; - if (!targetMsg.guild) return; - if (targetMsg.author?.bot) return; - if (!targetMsg.embeds) return; - if (targetMsg.attachments.size !== 0) return; - if (targetMsg.content?.length !== 0) return; - - await targetMsg.delete(); - await targetMsg.channel.send({ - embeds: [ - new MessageEmbed().setDescription( - ` -:skull: <@${targetMsg.member?.id}> is a possibly a self bot account!! - -Member Name: ${targetMsg.member?.user.username}#${targetMsg.member?.user.tag} -Member ID:${targetMsg.member?.user.id} - -> It is suggested to kick/Ban this account after a manual investigation. -` - ), - ], - }); -} - -export const config = { - displayName: "Anti Self Bot System!!", - dbName: "ANTI_SELF_BOT", -}; From d9d419fa97051accd5bf57c4fa3338d2a4ea9219 Mon Sep 17 00:00:00 2001 From: HARSH PATEL <83941233+HarshPatel5940@users.noreply.github.com> Date: Fri, 12 Aug 2022 19:23:30 +0530 Subject: [PATCH 03/13] Starting v1.1.5 - dm-check verification was build - changed status changer order - start of echo category cmd and v1.1.5 --- package.json | 2 +- src/commands/config/Setup-dmcheck.ts | 118 ++++++++++++++++++++++++++ src/commands/utility/echo-category.ts | 14 +++ src/features/dms-check.ts | 87 +++++++++++++++++++ src/features/status-changer.ts | 5 +- src/models/main-role-schema.ts | 32 +++++++ 6 files changed, 254 insertions(+), 4 deletions(-) create mode 100644 src/commands/config/Setup-dmcheck.ts create mode 100644 src/commands/utility/echo-category.ts create mode 100644 src/features/dms-check.ts create mode 100644 src/models/main-role-schema.ts diff --git a/package.json b/package.json index aae7b86..2e4fb9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord-helper-bot", - "version": "1.1.4", + "version": "1.1.5", "description": "A Simple and Cool Discord Bot Written in Typescript (discord.js)", "main": "index.ts", "scripts": { diff --git a/src/commands/config/Setup-dmcheck.ts b/src/commands/config/Setup-dmcheck.ts new file mode 100644 index 0000000..6e973e8 --- /dev/null +++ b/src/commands/config/Setup-dmcheck.ts @@ -0,0 +1,118 @@ +/** + Copyright [2022] [HarshPatel5940] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ + +import DJS, { MessageActionRow, MessageButton, MessageEmbed } from "discord.js"; +import { ICommand } from "wokcommands"; +import mainRoleSchema from "../../models/main-role-schema"; + +const TYPES = DJS.Constants.ApplicationCommandOptionTypes; +export default { + category: "config", + description: "Force Dm closing verification For Your Server!", + + slash: true, + guildOnly: true, + + cooldown: "10s", + permissions: ["ADMINISTRATOR"], + + options: [ + { + name: "channel", + description: "The Channel You Want the DM'check embed", + required: true, + type: TYPES.CHANNEL, + channelTypes: ["GUILD_TEXT"], + }, + { + name: "role", + description: "The Role You want to give after Dm's Checking", + required: true, + type: TYPES.ROLE, + }, + ], + + callback: async ({ interaction }) => { + await interaction.reply({ + content: "setting up DM checking", + ephemeral: true, + }); + + if (!interaction.guild) return "cannot fetch guild"; + + const CChannel = interaction.options.getChannel("channel"); + const Crole = interaction.options.getRole("role"); + + if (!CChannel || !Crole) return "Role/Channel Fetching problems"; + if (CChannel.type !== "GUILD_TEXT") + return "Cannot fetch a proper text channel"; + + const Buttons = new MessageActionRow(); + Buttons.addComponents( + new MessageButton() + .setCustomId("DM-Close-Check") + .setLabel("Close Your Dm's to verify further") + .setStyle("PRIMARY") + ); + + await CChannel.send({ + embeds: [ + new MessageEmbed() + .setTitle("Turn off your DMs to access the server") + .setDescription( + ` + + For your safety we just allow users whose DMs are turned off. To get access to the server you need to turn off your DMs for your own security. + + ❓ How to Turn off your Direct Messages (DMs) + \`\`\`💻 On PC\`\`\` + :one: Right-click on the server icon + :two: Navigate to “Privacy Settings” + :three: Turn off “Allow direct messages from server members” + + \`\`\`📱 On Mobile\`\`\` + :one: Tap and hold the server icon + :two: Navigate to more options and scroll down + :three: Turn off “Direct Messages” +` + ) + .setThumbnail( + "https://images-ext-2.discordapp.net/external/WMCux1XvdlLmurrOZK3F0IBRQj1DM-9eTSowDBD1f-s/%3Fsize%3D128/https/cdn.discordapp.com/avatars/935082756642308096/f6c782bf3cdc21b10a57ad4f6a67c87e.webp?width=115&height=115" + ), + new MessageEmbed() + .setTitle("Why Getting stuck on 'verifying...' ?") + .setDescription( + "**since your dms are on**, please follow the above steps to turn off dms and get access to the server" + ), + ], + components: [Buttons], + }); + + await mainRoleSchema.findOneAndUpdate( + { _id: interaction.guild.id }, + { + _id: interaction.guild.id, + channelID: CChannel.id, + roleID: Crole.id, + }, + { + new: true, + upsert: true, + } + ); + + await interaction.editReply("Setup Done ✅"); + }, +} as ICommand; diff --git a/src/commands/utility/echo-category.ts b/src/commands/utility/echo-category.ts new file mode 100644 index 0000000..8913e2e --- /dev/null +++ b/src/commands/utility/echo-category.ts @@ -0,0 +1,14 @@ +/** + Copyright [2022] [HarshPatel5940] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ diff --git a/src/features/dms-check.ts b/src/features/dms-check.ts new file mode 100644 index 0000000..dd9c54f --- /dev/null +++ b/src/features/dms-check.ts @@ -0,0 +1,87 @@ +/** + Copyright [2022] [HarshPatel5940] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ + +import { Client, MessageEmbed } from "discord.js"; +import mainRoleSchema from "../models/main-role-schema"; + +export default (client: Client) => { + client.on("interactionCreate", async (interaction) => { + if (!interaction) return; + if (!interaction.isButton()) return; + if (interaction.customId !== "DM-Close-Check") return; + if (!interaction.member || !interaction.guild) return; + + const member = interaction.member; + + const user1 = await client.users.fetch(member.user.id); + try { + interaction.reply({ content: "verifying...", ephemeral: true }); + await user1.send({ + embeds: [ + new MessageEmbed() + .setTitle("Turn off your DMs to access the server") + .setDescription( + ` + + For your safety we just allow users whose DMs are turned off. To get access to the server you need to turn off your DMs for your own security. + + ❓ How to Turn off your Direct Messages (DMs) + \`\`\`💻 On PC\`\`\` + :one: Right-click on the server icon + :two: Navigate to “Privacy Settings” + :three: Turn off “Allow direct messages from server members” + + \`\`\`📱 On Mobile\`\`\` + :one: Tap and hold the server icon + :two: Navigate to more options and scroll down + :three: Turn off “Direct Messages” + ` + ) + .setThumbnail( + "https://images-ext-2.discordapp.net/external/WMCux1XvdlLmurrOZK3F0IBRQj1DM-9eTSowDBD1f-s/%3Fsize%3D128/https/cdn.discordapp.com/avatars/935082756642308096/f6c782bf3cdc21b10a57ad4f6a67c87e.webp?width=115&height=115" + ), + new MessageEmbed() + .setTitle("Why Getting this msg?") + .setDescription( + "Follow the above steps to turn off dms and get access to the server" + ), + ], + }); + } catch (error) { + const DATA = await mainRoleSchema.findById({ + _id: interaction.guild.id, + }); + + if (!DATA) return; + let { roleID } = DATA; + + let member1 = await interaction.guild.members.fetch( + interaction.member.user.id + ); + try { + await member1.roles.add(roleID); + } catch (error) {} + await interaction.followUp({ + content: "you have been verified ✅", + ephemeral: true, + }); + } + }); +}; + +export const config = { + displayName: "Close Your DM's", + dbName: "DM_CHECK", +}; diff --git a/src/features/status-changer.ts b/src/features/status-changer.ts index 358723f..00a5fc5 100644 --- a/src/features/status-changer.ts +++ b/src/features/status-changer.ts @@ -16,11 +16,10 @@ import { Client } from "discord.js"; export default (client: Client) => { const statusOptions = [ - "Discord.JS Bots", - "OpenSource Community", "HarshPatel5940#3210", + "Version: 1.1.4", ">>help - /help", - "Bot Version 1.1.3", + "OpenSource Community", ]; let counter = 0; diff --git a/src/models/main-role-schema.ts b/src/models/main-role-schema.ts new file mode 100644 index 0000000..77085ec --- /dev/null +++ b/src/models/main-role-schema.ts @@ -0,0 +1,32 @@ +/** + Copyright [2022] [HarshPatel5940] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ + +import mongoose, { Schema } from "mongoose"; + +const reqString = { + type: String, + require: true, +}; + +const mainRoleSchema = new Schema({ + _id: reqString, + channelID: reqString, + roleID: reqString, +}); + +const name = "DM-close-verification"; + +export default mongoose.models[name] || + mongoose.model(name, mainRoleSchema, name); From 866b111642316527ce9cedbdf17f3e5f3f9d4c2d Mon Sep 17 00:00:00 2001 From: HARSH PATEL <83941233+HarshPatel5940@users.noreply.github.com> Date: Tue, 16 Aug 2022 17:13:05 +0530 Subject: [PATCH 04/13] Fixed Dm-Check --- package.json | 5 +-- src/commands/config/Setup-dmcheck.ts | 30 +++++++--------- src/commands/utility/echo-category.ts | 49 +++++++++++++++++++++++++++ src/features/dms-check.ts | 48 ++++++++++---------------- 4 files changed, 81 insertions(+), 51 deletions(-) diff --git a/package.json b/package.json index 2e4fb9c..a5d77d0 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,9 @@ "description": "A Simple and Cool Discord Bot Written in Typescript (discord.js)", "main": "index.ts", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "dev": "nodemon src/index.ts" + "start": "node dist/index.js", + "dev": "nodemon src/index.ts", + "web": "npx ts-node --transpile-only src/index.ts" }, "repository": { "type": "git", diff --git a/src/commands/config/Setup-dmcheck.ts b/src/commands/config/Setup-dmcheck.ts index 6e973e8..697091d 100644 --- a/src/commands/config/Setup-dmcheck.ts +++ b/src/commands/config/Setup-dmcheck.ts @@ -73,29 +73,23 @@ export default { .setTitle("Turn off your DMs to access the server") .setDescription( ` - - For your safety we just allow users whose DMs are turned off. To get access to the server you need to turn off your DMs for your own security. - - ❓ How to Turn off your Direct Messages (DMs) - \`\`\`💻 On PC\`\`\` - :one: Right-click on the server icon - :two: Navigate to “Privacy Settings” - :three: Turn off “Allow direct messages from server members” - - \`\`\`📱 On Mobile\`\`\` - :one: Tap and hold the server icon - :two: Navigate to more options and scroll down - :three: Turn off “Direct Messages” +For your safety we just allow users whose DMs are turned off. To get access to the server you need to turn off your DMs for your own security. + +❓ How to Turn off your Direct Messages (DMs) +\`\`\`💻 On PC\`\`\` +:one: Right-click on the server icon +:two: Navigate to “Privacy Settings” +:three: Turn off “Allow direct messages from server members” + +\`\`\`📱 On Mobile\`\`\` +:one: Tap and hold the server icon +:two: Navigate to more options and scroll down +:three: Turn off “Direct Messages” ` ) .setThumbnail( "https://images-ext-2.discordapp.net/external/WMCux1XvdlLmurrOZK3F0IBRQj1DM-9eTSowDBD1f-s/%3Fsize%3D128/https/cdn.discordapp.com/avatars/935082756642308096/f6c782bf3cdc21b10a57ad4f6a67c87e.webp?width=115&height=115" ), - new MessageEmbed() - .setTitle("Why Getting stuck on 'verifying...' ?") - .setDescription( - "**since your dms are on**, please follow the above steps to turn off dms and get access to the server" - ), ], components: [Buttons], }); diff --git a/src/commands/utility/echo-category.ts b/src/commands/utility/echo-category.ts index 8913e2e..73f7d35 100644 --- a/src/commands/utility/echo-category.ts +++ b/src/commands/utility/echo-category.ts @@ -12,3 +12,52 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + +import { ICommand } from "wokcommands"; +import DJS, { MessageEmbed } from "discord.js"; + +const TYPES = DJS.Constants.ApplicationCommandOptionTypes; + +export default { + category: "utility", + description: "It will repeat the message in all the channels of a category", + + slash: true, + testOnly: true, + guildOnly: true, + + cooldown: "5s", + + options: [ + { + name: "category", + description: "Category in which you want to send the message", + required: true, + type: TYPES.CHANNEL, + channelTypes: ["GUILD_CATEGORY"], + }, + { + name: "text", + description: "The Text you want to send to the channels", + required: true, + type: TYPES.STRING, + }, + ], + + callback: async ({ interaction }) => { + if (!interaction || !interaction.guild) return; + + const category1 = interaction.options.getChannel("category"); + const text1 = interaction.options.getString("text"); + + if (!category1) return "can't fetch category"; + + const Ccategory = interaction.guild.channels.cache.get(category1.id); + + if (!Ccategory || Ccategory.type !== "GUILD_CATEGORY") return; + + let childs = Ccategory.children; + + console.log(childs); + }, +} as ICommand; diff --git a/src/features/dms-check.ts b/src/features/dms-check.ts index dd9c54f..d4b5364 100644 --- a/src/features/dms-check.ts +++ b/src/features/dms-check.ts @@ -22,43 +22,27 @@ export default (client: Client) => { if (!interaction.isButton()) return; if (interaction.customId !== "DM-Close-Check") return; if (!interaction.member || !interaction.guild) return; - const member = interaction.member; const user1 = await client.users.fetch(member.user.id); + interaction.reply({ content: "verifying...", ephemeral: true }); try { - interaction.reply({ content: "verifying...", ephemeral: true }); await user1.send({ embeds: [ - new MessageEmbed() - .setTitle("Turn off your DMs to access the server") - .setDescription( - ` - - For your safety we just allow users whose DMs are turned off. To get access to the server you need to turn off your DMs for your own security. - - ❓ How to Turn off your Direct Messages (DMs) - \`\`\`💻 On PC\`\`\` - :one: Right-click on the server icon - :two: Navigate to “Privacy Settings” - :three: Turn off “Allow direct messages from server members” - - \`\`\`📱 On Mobile\`\`\` - :one: Tap and hold the server icon - :two: Navigate to more options and scroll down - :three: Turn off “Direct Messages” - ` - ) - .setThumbnail( - "https://images-ext-2.discordapp.net/external/WMCux1XvdlLmurrOZK3F0IBRQj1DM-9eTSowDBD1f-s/%3Fsize%3D128/https/cdn.discordapp.com/avatars/935082756642308096/f6c782bf3cdc21b10a57ad4f6a67c87e.webp?width=115&height=115" - ), new MessageEmbed() .setTitle("Why Getting this msg?") .setDescription( - "Follow the above steps to turn off dms and get access to the server" - ), + `Please Turn Of Your Dm's in ${interaction.guild.name} to proceed further verification` + ) + .setFooter({ + text: `Guild ID: ${interaction.guild.id}`, + }) + .setColor("RED"), ], }); + await interaction.editReply( + ":x: You Have Not Been Verified. \n> please close your dms in this server" + ); } catch (error) { const DATA = await mainRoleSchema.findById({ _id: interaction.guild.id, @@ -70,13 +54,15 @@ export default (client: Client) => { let member1 = await interaction.guild.members.fetch( interaction.member.user.id ); + + await interaction.editReply("✅ You Have Been Verified!!"); try { await member1.roles.add(roleID); - } catch (error) {} - await interaction.followUp({ - content: "you have been verified ✅", - ephemeral: true, - }); + } catch (error) { + await interaction.editReply( + "✅ You Have Been Verified!!\n\n> Bot was not able to give role to the user, please say the administrator to check the permissions" + ); + } } }); }; From aac539b0f6e7d18927fab08aa11a7682f4872890 Mon Sep 17 00:00:00 2001 From: HARSH PATEL <83941233+HarshPatel5940@users.noreply.github.com> Date: Fri, 19 Aug 2022 14:04:50 +0530 Subject: [PATCH 05/13] Bolded Server Name --- src/features/dms-check.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/dms-check.ts b/src/features/dms-check.ts index d4b5364..369e311 100644 --- a/src/features/dms-check.ts +++ b/src/features/dms-check.ts @@ -32,7 +32,7 @@ export default (client: Client) => { new MessageEmbed() .setTitle("Why Getting this msg?") .setDescription( - `Please Turn Of Your Dm's in ${interaction.guild.name} to proceed further verification` + `Please Turn Of Your Dm's in __**${interaction.guild.name}**__ to proceed further verification` ) .setFooter({ text: `Guild ID: ${interaction.guild.id}`, From 45b136e041820bdb63b64dc1642a7b6c09798b5f Mon Sep 17 00:00:00 2001 From: HARSH PATEL <83941233+HarshPatel5940@users.noreply.github.com> Date: Fri, 19 Aug 2022 14:05:19 +0530 Subject: [PATCH 06/13] Added Error Handling I should really make it better smh --- src/features/error.ts | 74 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 src/features/error.ts diff --git a/src/features/error.ts b/src/features/error.ts new file mode 100644 index 0000000..adefdeb --- /dev/null +++ b/src/features/error.ts @@ -0,0 +1,74 @@ +/** + Copyright [2022] [HarshPatel5940] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ +import { Client, MessageEmbed } from "discord.js"; +import dotenv from "dotenv"; + +dotenv.config({ path: ".env.test" }); + +export default (client: Client) => { + var title: string = "something went wrong"; + var desc: any = "> *unknown error messsage*"; + + process.on("unhandledRejection", (reason) => { + title = "UNHANDLED REJECTION FOUND!!!"; + desc = reason; + ReportError(client, title, desc); + }); + + process.on("uncaughtExceptionMonitor", (reason) => { + title = "UNCAUGHT EXCEPTION FOUND!!!"; + desc = reason; + ReportError(client, title, desc); + }); + + process.on("multipleResolves", (type, reason) => { + title = "MULTIPLE RESOLVES FOUND!!!"; + desc = `${reason}\n\ntype:${type}`; + ReportError(client, title, desc); + }); +}; + +export const config = { + dbName: "INTERACTION_HANDLING", + displayName: "Error Handling", +}; + +function ReportError(client: Client, title: string, desc: string) { + const ErrEmbed = new MessageEmbed() + .setTitle(title) + .setDescription( + ` +\`\`\` +${desc} +\`\`\` +Error Reported at: +` + ) + .setColor("RED") + .setFooter({ text: "Error Handling System." }) + .setTimestamp(); + + console.log(title, "\n", desc, "\n\n"); + + if (!process.env.OWNER_ID) { + return; + } + const c = client.users.cache.get(process.env.OWNER_ID); + if (!c) { + return; + } + + c.send({ embeds: [ErrEmbed] }); +} From 2841ab2253b671f7ae376e1b7fded0815643d9ab Mon Sep 17 00:00:00 2001 From: HARSH PATEL <83941233+HarshPatel5940@users.noreply.github.com> Date: Fri, 19 Aug 2022 14:17:24 +0530 Subject: [PATCH 07/13] Update ticket-create.ts moved !data before extracting data --- src/features/Tickets/ticket-create.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/Tickets/ticket-create.ts b/src/features/Tickets/ticket-create.ts index 0e69f06..82520b4 100644 --- a/src/features/Tickets/ticket-create.ts +++ b/src/features/Tickets/ticket-create.ts @@ -33,6 +33,8 @@ export default (client: Client) => { if (!member) return; const Data = await TicketConfigSchema.findById(guild.id); + if (!Data) return; + let { EveryoneRoleID, SupportRoleID, @@ -40,7 +42,6 @@ export default (client: Client) => { GuildTicketCount, ButtonsName, } = Data; - if (!Data) return; let label1 = ""; try { From 610c4668e69c5fbfa283dfcbae1f8ac3c43a054a Mon Sep 17 00:00:00 2001 From: HARSH PATEL <83941233+HarshPatel5940@users.noreply.github.com> Date: Fri, 19 Aug 2022 15:07:41 +0530 Subject: [PATCH 08/13] added `await` | need to check if it works --- src/features/Tickets/ticket-create.ts | 4 ++-- src/features/Tickets/ticket-system.ts | 20 ++++++++++---------- src/features/error.ts | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/features/Tickets/ticket-create.ts b/src/features/Tickets/ticket-create.ts index 82520b4..ae0cba1 100644 --- a/src/features/Tickets/ticket-create.ts +++ b/src/features/Tickets/ticket-create.ts @@ -51,7 +51,7 @@ export default (client: Client) => { console.log("Ticket Create ERROR: -->", err); } - ButtonInteraction.reply({ + await ButtonInteraction.reply({ content: "creating ticket...", ephemeral: true, }); @@ -131,7 +131,7 @@ Ticket Category: ${label1} ChannelID: channel.id, Closed: false, }); - ButtonInteraction.editReply({ + await ButtonInteraction.editReply({ content: `:white_check_mark: Created Ticket Channel ${channel}`, }); msg1.pin(); diff --git a/src/features/Tickets/ticket-system.ts b/src/features/Tickets/ticket-system.ts index 350122b..c1531ab 100644 --- a/src/features/Tickets/ticket-system.ts +++ b/src/features/Tickets/ticket-system.ts @@ -65,7 +65,7 @@ export default (client: Client) => { ) => { if (err) throw err; if (!docs) { - return ButtonInteraction.reply({ + return await ButtonInteraction.reply({ embeds: [ new MessageEmbed() .setColor("RED") @@ -79,7 +79,7 @@ export default (client: Client) => { switch (customId) { case "ticket-close": if (docs.Closed == true) { - ButtonInteraction.reply({ + await ButtonInteraction.reply({ embeds: [ new MessageEmbed() .setColor("RED") @@ -101,7 +101,7 @@ export default (client: Client) => { .setStyle("PRIMARY") ); - ButtonInteraction.reply({ + await ButtonInteraction.reply({ content: `${ButtonInteraction.member}`, embeds: [ new MessageEmbed() @@ -149,7 +149,7 @@ export default (client: Client) => { .setStyle("DANGER") ); - ButtonInteraction.followUp({ + await ButtonInteraction.followUp({ embeds: [ new MessageEmbed() .setColor("GREEN") @@ -171,7 +171,7 @@ export default (client: Client) => { case "ticket-reopen": if (docs.Closed == false) { - ButtonInteraction.reply({ + await ButtonInteraction.reply({ embeds: [ new MessageEmbed() .setColor("RED") @@ -191,7 +191,7 @@ export default (client: Client) => { { ChannelID: channel.id }, { Closed: false } ); - ButtonInteraction.reply({ + await ButtonInteraction.reply({ embeds: [ new MessageEmbed() .setColor("GREEN") @@ -203,7 +203,7 @@ export default (client: Client) => { break; case "ticket-delete": if (docs.Closed == false) { - ButtonInteraction.reply({ + await ButtonInteraction.reply({ embeds: [ new MessageEmbed() .setColor("RED") @@ -215,7 +215,7 @@ export default (client: Client) => { }); return; } - ButtonInteraction.reply({ + await ButtonInteraction.reply({ embeds: [ new MessageEmbed() .setColor("GREEN") @@ -242,7 +242,7 @@ export default (client: Client) => { ); try { - TChannel.send({ + await TChannel.send({ embeds: [ new MessageEmbed() .setColor("GREEN") @@ -256,7 +256,7 @@ export default (client: Client) => { files: [attachment], }); - user1.send({ + await user1.send({ embeds: [ new MessageEmbed() .setColor("GREEN") diff --git a/src/features/error.ts b/src/features/error.ts index adefdeb..3478253 100644 --- a/src/features/error.ts +++ b/src/features/error.ts @@ -17,26 +17,26 @@ import dotenv from "dotenv"; dotenv.config({ path: ".env.test" }); -export default (client: Client) => { +export default async (client: Client) => { var title: string = "something went wrong"; var desc: any = "> *unknown error messsage*"; - process.on("unhandledRejection", (reason) => { + process.on("unhandledRejection", async (reason) => { title = "UNHANDLED REJECTION FOUND!!!"; desc = reason; - ReportError(client, title, desc); + await ReportError(client, title, desc); }); - process.on("uncaughtExceptionMonitor", (reason) => { + process.on("uncaughtExceptionMonitor", async (reason) => { title = "UNCAUGHT EXCEPTION FOUND!!!"; desc = reason; - ReportError(client, title, desc); + await ReportError(client, title, desc); }); - process.on("multipleResolves", (type, reason) => { + process.on("multipleResolves", async (type, reason) => { title = "MULTIPLE RESOLVES FOUND!!!"; desc = `${reason}\n\ntype:${type}`; - ReportError(client, title, desc); + await ReportError(client, title, desc); }); }; @@ -45,7 +45,7 @@ export const config = { displayName: "Error Handling", }; -function ReportError(client: Client, title: string, desc: string) { +async function ReportError(client: Client, title: string, desc: string) { const ErrEmbed = new MessageEmbed() .setTitle(title) .setDescription( From 172cd463431837fedaf88098022fcd24f5529966 Mon Sep 17 00:00:00 2001 From: HARSH PATEL <83941233+HarshPatel5940@users.noreply.github.com> Date: Sun, 21 Aug 2022 14:45:54 +0530 Subject: [PATCH 09/13] =?UTF-8?q?replaced=20to=20=E2=9D=8C=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commands/config/Setup-Ticket.ts | 16 +++++-------- src/commands/config/Setup-Welcome.ts | 8 +++---- src/commands/config/simWelcome.ts | 2 +- src/commands/config/status.ts | 4 +--- src/commands/moderation/ban.ts | 12 +++++----- src/commands/moderation/kick.ts | 12 +++++----- src/commands/moderation/mute.ts | 16 ++++++------- src/commands/moderation/tempban.ts | 10 ++++---- src/commands/moderation/tempmute.ts | 14 ++++++------ src/commands/moderation/timeout.ts | 14 ++++++------ src/commands/moderation/unmute.ts | 16 +++++-------- src/commands/utility/customembed.ts | 4 ++-- src/commands/utility/echo.ts | 6 ++--- src/commands/utility/embed.ts | 4 ++-- src/commands/utility/purge.ts | 2 +- src/commands/utility/slowmode.ts | 6 ++--- src/commands/utility/webhooks.ts | 11 +++++---- src/features/Tickets/ticket-create.ts | 2 +- src/features/Tickets/ticket-system.ts | 33 +++++++++++++++++++-------- src/features/dms-check.ts | 2 +- src/features/error.ts | 19 ++++++++------- 21 files changed, 110 insertions(+), 103 deletions(-) diff --git a/src/commands/config/Setup-Ticket.ts b/src/commands/config/Setup-Ticket.ts index 7fb8a84..cbebf07 100644 --- a/src/commands/config/Setup-Ticket.ts +++ b/src/commands/config/Setup-Ticket.ts @@ -139,7 +139,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - ":x: Please use this command within a server and text channel" + "❌ Please use this command within a server and text channel" ) .setColor("RED"), ], @@ -180,7 +180,7 @@ create a ticket under a appropriate category by clicking one of the buttons belo new MessageEmbed() .setDescription( - ":x: Please Provide Name and Id for Atleast Button 1" + "❌ Please Provide Name and Id for Atleast Button 1" ) .setColor("RED"), ], @@ -202,7 +202,7 @@ create a ticket under a appropriate category by clicking one of the buttons belo new MessageEmbed() .setDescription( - ":x: Please provide all the required fields." + "❌ Please provide all the required fields." ) .setColor("RED"), ], @@ -289,9 +289,7 @@ create a ticket under a appropriate category by clicking one of the buttons belo await interaction.editReply({ embeds: [ new MessageEmbed() - .setDescription( - ":white_check_mark: saving configuration..." - ) + .setDescription("✅ saving configuration...") .setColor("GREEN"), ], }); @@ -321,9 +319,7 @@ create a ticket under a appropriate category by clicking one of the buttons belo await interaction.editReply({ embeds: [ new MessageEmbed() - .setDescription( - ":white_check_mark: Ticket System Setup Done!!" - ) + .setDescription("✅ Ticket System Setup Done!!") .setColor("GREEN"), ], // ephemeral: true, @@ -339,7 +335,7 @@ create a ticket under a appropriate category by clicking one of the buttons belo new MessageEmbed() .setDescription( ` -:x: **__AN ERROR OCCURRED__ While Setting Up Your Ticket System** +❌ **__AN ERROR OCCURRED__ While Setting Up Your Ticket System** 1) Make Sure None of your Buttons Names are Duplicated! 2) Make Sure you use the **FORMAT** => name,emoji 3) Make Sure Buttons Names are not more than 100 characters diff --git a/src/commands/config/Setup-Welcome.ts b/src/commands/config/Setup-Welcome.ts index 7405d52..ae57c9a 100644 --- a/src/commands/config/Setup-Welcome.ts +++ b/src/commands/config/Setup-Welcome.ts @@ -60,7 +60,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - ":x: Please use this command within a server." + "❌ Please use this command within a server." ) .setColor("RED"), ], @@ -73,7 +73,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Please Tag a Valid Text Channel.") + .setDescription("❌ Please Tag a Valid Text Channel.") .setColor("RED"), ], ephemeral: true, @@ -105,9 +105,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription( - ":white_check_mark: Welcome Channel is setup done!" - ) + .setDescription("✅ Welcome Channel is setup done!") .setColor("GREEN"), ], ephmeral: false, diff --git a/src/commands/config/simWelcome.ts b/src/commands/config/simWelcome.ts index 7a95c74..a9ec8ec 100644 --- a/src/commands/config/simWelcome.ts +++ b/src/commands/config/simWelcome.ts @@ -32,7 +32,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - ":white_check_mark: Welcome Message Sent! **Event Has Triggered!**" + "✅ Welcome Message Sent! **Event Has Triggered!**" ) .setColor("GREEN"), ], diff --git a/src/commands/config/status.ts b/src/commands/config/status.ts index 5fda965..e5f402e 100644 --- a/src/commands/config/status.ts +++ b/src/commands/config/status.ts @@ -53,9 +53,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription( - `:white_check_mark: Status Changed to ${text}` - ) + .setDescription(`✅ Status Changed to ${text}`) .setColor("GREEN"), ], ephemeral: true, diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts index b367c8e..8df35ad 100644 --- a/src/commands/moderation/ban.ts +++ b/src/commands/moderation/ban.ts @@ -83,7 +83,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Please Mention the User to Ban!") + .setDescription("❌ Please Mention the User to Ban!") .setColor("RED"), ], ephemeral: true, @@ -94,7 +94,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Cannot Ban this User!") + .setDescription("❌ Cannot Ban this User!") .setColor("RED"), ], ephemeral: true, @@ -105,7 +105,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Cannot Ban Yourself **DUMB!!!**") + .setDescription("❌ Cannot Ban Yourself **DUMB!!!**") .setColor("RED"), ], ephemeral: true, @@ -118,7 +118,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - ":x: Maximum Only 400 Characters are allowed!" + "❌ Maximum Only 400 Characters are allowed!" ) .setColor("RED"), ], @@ -134,7 +134,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Cannot Ban that User!!!**") + .setDescription("❌ Cannot Ban that User!!!**") .setColor("RED"), ], ephemeral: true, @@ -146,7 +146,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:white_check_mark: @${target.id}> was **Banned** Indefinitely | \`${target.id}\`` + `✅ @${target.id}> was **Banned** Indefinitely | \`${target.id}\`` ) .setColor("GREEN"), ], diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts index a5066bc..9cf8f64 100644 --- a/src/commands/moderation/kick.ts +++ b/src/commands/moderation/kick.ts @@ -83,7 +83,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Please Mention the User to Kick!") + .setDescription("❌ Please Mention the User to Kick!") .setColor("RED"), ], ephemeral: true, @@ -94,7 +94,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Cannot Kick this User!") + .setDescription("❌ Cannot Kick this User!") .setColor("RED"), ], ephemeral: true, @@ -105,7 +105,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Cannot Kick Yourself **DUMB!!!**") + .setDescription("❌ Cannot Kick Yourself **DUMB!!!**") .setColor("RED"), ], ephemeral: true, @@ -118,7 +118,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - ":x: Maximum Only 400 Characters are allowed!" + "❌ Maximum Only 400 Characters are allowed!" ) .setColor("RED"), ], @@ -134,7 +134,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Cannot Kick that User!!!**") + .setDescription("❌ Cannot Kick that User!!!**") .setColor("RED"), ], ephemeral: true, @@ -146,7 +146,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:white_check_mark: <@${target.id}> was **Kicked** | \`${target.id}\`` + `✅ <@${target.id}> was **Kicked** | \`${target.id}\`` ) .setColor("GREEN"), ], diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts index 7606184..ef35a15 100644 --- a/src/commands/moderation/mute.ts +++ b/src/commands/moderation/mute.ts @@ -58,7 +58,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - ":x: Command Can Only Be Used In A Server" + "❌ Command Can Only Be Used In A Server" ) .setColor("RED"), ], @@ -86,7 +86,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `":x: Could not find a user with id \`${userId}\`` + `"❌ Could not find a user with id \`${userId}\`` ) .setColor("RED"), ], @@ -103,7 +103,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Please Mention the User to Mute!") + .setDescription("❌ Please Mention the User to Mute!") .setColor("RED"), ], ephemeral: true, @@ -115,7 +115,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Cannot Mute Yourself **DUMB!!!**") + .setDescription("❌ Cannot Mute Yourself **DUMB!!!**") .setColor("RED"), ], ephemeral: true, @@ -128,7 +128,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - ":x: Maximum Only 400 Characters are allowed!" + "❌ Maximum Only 400 Characters are allowed!" ) .setColor("RED"), ], @@ -146,7 +146,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Cannot Find 'Muted' Role.") + .setDescription("❌ Cannot Find 'Muted' Role.") .setColor("RED"), ], ephemeral: true, @@ -161,7 +161,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - ":x: Cannot Mute that User!! \n" + + "❌ Cannot Mute that User!! \n" + "```" + error + "```" @@ -177,7 +177,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:white_check_mark: <@${target.id}> was **Muted** Indefinitely | \`${target.id}\`` + `✅ <@${target.id}> was **Muted** Indefinitely | \`${target.id}\`` ) .setColor("GREEN"), ], diff --git a/src/commands/moderation/tempban.ts b/src/commands/moderation/tempban.ts index a506fa7..4ce88d6 100644 --- a/src/commands/moderation/tempban.ts +++ b/src/commands/moderation/tempban.ts @@ -39,7 +39,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - ":x: Command Can Only Be Used In A Server" + "❌ Command Can Only Be Used In A Server" ) .setColor("RED"), ], @@ -68,7 +68,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:x: Could Not Find a user with the ID of \`${userId}\`` + `❌ Could Not Find a user with the ID of \`${userId}\`` ) .setColor("RED"), ], @@ -91,7 +91,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Invalid Time Format") + .setDescription("❌ Invalid Time Format") .setColor("RED"), ], ephemeral: true, @@ -130,7 +130,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:x: <@${userId}> is already banned! \`${user.id}\`` + `❌ <@${userId}> is already banned! \`${user.id}\`` ) .setColor("RED"), ], @@ -153,7 +153,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Could Not Ban User") + .setDescription("❌ Could Not Ban User") .setColor("RED"), ], ephemeral: true, diff --git a/src/commands/moderation/tempmute.ts b/src/commands/moderation/tempmute.ts index 883f575..cac375a 100644 --- a/src/commands/moderation/tempmute.ts +++ b/src/commands/moderation/tempmute.ts @@ -66,7 +66,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - ":x: Command Can Only Be Used In A Server" + "❌ Command Can Only Be Used In A Server" ) .setColor("RED"), ], @@ -95,7 +95,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:x: Couldn't find user with id ${userId}` + `❌ Couldn't find user with id ${userId}` ) .setColor("RED"), ], @@ -109,7 +109,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Cannot Mute Yourself **DUMB!!!**") + .setDescription("❌ Cannot Mute Yourself **DUMB!!!**") .setColor("RED"), ], ephemeral: true, @@ -130,7 +130,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(`:x: Invalid Time Format`) + .setDescription(`❌ Invalid Time Format`) .setColor("RED"), ], ephemeral: true, @@ -169,7 +169,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:x: User is already muted \`${user.id}\`` + `❌ User is already muted \`${user.id}\`` ) .setColor("RED"), ], @@ -204,7 +204,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:x: Couldn't mute user with id ${user.id}` + `❌ Couldn't mute user with id ${user.id}` ) .setColor("RED"), ], @@ -216,7 +216,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:white_check_mark: <@${userId}> has been Muted for ${time}m! \`${user.id}\`` + `✅ <@${userId}> has been Muted for ${time}m! \`${user.id}\`` ) .setColor("GREEN"), ], diff --git a/src/commands/moderation/timeout.ts b/src/commands/moderation/timeout.ts index 70f8846..019136d 100644 --- a/src/commands/moderation/timeout.ts +++ b/src/commands/moderation/timeout.ts @@ -65,7 +65,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - ":x: Command Can Only Be Used In A Server" + "❌ Command Can Only Be Used In A Server" ) .setColor("RED"), ], @@ -94,7 +94,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:x: Couldn't find user with id ${userId}` + `❌ Couldn't find user with id ${userId}` ) .setColor("RED"), ], @@ -108,7 +108,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Cannot Mute Yourself **DUMB!!!**") + .setDescription("❌ Cannot Mute Yourself **DUMB!!!**") .setColor("RED"), ], ephemeral: true, @@ -129,7 +129,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(`:x: Invalid Time Format`) + .setDescription(`❌ Invalid Time Format`) .setColor("RED"), ], ephemeral: true, @@ -160,7 +160,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:x: You cannot timeout a user for more than 28 days` + `❌ You cannot timeout a user for more than 28 days` ) .setColor("RED"), ], @@ -183,7 +183,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:x: Couldn't timeout user with id ${user.id}` + `❌ Couldn't timeout user with id ${user.id}` ) .setColor("RED"), ], @@ -195,7 +195,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:white_check_mark: <@${userId}> has been timeout for ${time}m! | \`${user.id}\`` + `✅ <@${userId}> has been timeout for ${time}m! | \`${user.id}\`` ) .setColor("GREEN"), ], diff --git a/src/commands/moderation/unmute.ts b/src/commands/moderation/unmute.ts index 3499039..38b1967 100644 --- a/src/commands/moderation/unmute.ts +++ b/src/commands/moderation/unmute.ts @@ -84,9 +84,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription( - ":x: Please Mention the User to Unmute!" - ) + .setDescription("❌ Please Mention the User to Unmute!") .setColor("RED"), ], ephemeral: true, @@ -98,9 +96,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription( - ":x: Cannot Unmute Yourself **DUMB!!!**" - ) + .setDescription("❌ Cannot Unmute Yourself **DUMB!!!**") .setColor("RED"), ], ephemeral: true, @@ -113,7 +109,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - ":x: Maximum Only 400 Characters are allowed!" + "❌ Maximum Only 400 Characters are allowed!" ) .setColor("RED"), ], @@ -131,7 +127,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Cannot Find 'Muted' Role.") + .setDescription("❌ Cannot Find 'Muted' Role.") .setColor("RED"), ], ephemeral: true, @@ -145,7 +141,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Cannot Unmute that User!!") + .setDescription("❌ Cannot Unmute that User!!") .setColor("RED"), ], ephemeral: true, @@ -157,7 +153,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:white_check_mark: <@${user.id}> has been Unmuted! | \`${user.id}\`` + `✅ <@${user.id}> has been Unmuted! | \`${user.id}\`` ) .setColor("GREEN"), ], diff --git a/src/commands/utility/customembed.ts b/src/commands/utility/customembed.ts index 5e74dfa..bab3a66 100644 --- a/src/commands/utility/customembed.ts +++ b/src/commands/utility/customembed.ts @@ -56,7 +56,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - ":x: Please Use this Command within a Server." + "❌ Please Use this Command within a Server." ) .setColor("RED"), ], @@ -69,7 +69,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Please Tag a Valid Text Channel.") + .setDescription("❌ Please Tag a Valid Text Channel.") .setColor("RED"), ], ephemeral: true, diff --git a/src/commands/utility/echo.ts b/src/commands/utility/echo.ts index 9715d7d..12fc9aa 100644 --- a/src/commands/utility/echo.ts +++ b/src/commands/utility/echo.ts @@ -56,7 +56,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - ":x: Please Use this Command within a Server." + "❌ Please Use this Command within a Server." ) .setColor("RED"), ], @@ -69,7 +69,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Please Tag a Valid Text Channel.") + .setDescription("❌ Please Tag a Valid Text Channel.") .setColor("RED"), ], ephemeral: true, @@ -85,7 +85,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:white_check_mark: Message has Been Sent to <#${target.id}>` + `✅ Message has Been Sent to <#${target.id}>` ) .setColor("GREEN"), ], diff --git a/src/commands/utility/embed.ts b/src/commands/utility/embed.ts index 32a8dc6..aadf43e 100644 --- a/src/commands/utility/embed.ts +++ b/src/commands/utility/embed.ts @@ -57,7 +57,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - ":x: Please Use this Command within a Server." + "❌ Please Use this Command within a Server." ) .setColor("RED"), ], @@ -70,7 +70,7 @@ export default { custom: true, embeds: [ new MessageEmbed() - .setDescription(":x: Please tag a valid text channel.") + .setDescription("❌ Please tag a valid text channel.") .setColor("RED"), ], ephemeral: true, diff --git a/src/commands/utility/purge.ts b/src/commands/utility/purge.ts index 2f1c030..19028a2 100644 --- a/src/commands/utility/purge.ts +++ b/src/commands/utility/purge.ts @@ -48,7 +48,7 @@ export default { messages.forEach((message) => message.delete()); const emb = new MessageEmbed() - .setDescription(`:white_check_mark: Deleted ${size} messsages`) + .setDescription(`✅ Deleted ${size} messsages`) .setColor("GREEN"); const msg1 = await channel.send({ embeds: [emb] }); diff --git a/src/commands/utility/slowmode.ts b/src/commands/utility/slowmode.ts index f25361e..69af7d9 100644 --- a/src/commands/utility/slowmode.ts +++ b/src/commands/utility/slowmode.ts @@ -55,7 +55,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:x: Please Provide a valid number. convert into seconds!!` + `❌ Please Provide a valid number. convert into seconds!!` ) .setColor("RED"), ], @@ -75,7 +75,7 @@ export default { new MessageEmbed() .setDescription( ` -:white_check_mark: Status Changed to ${Number(args)} seconds. +✅ Status Changed to ${Number(args)} seconds. ` ) @@ -102,7 +102,7 @@ export default { embeds: [ new MessageEmbed() .setDescription( - `:white_check_mark: Status Changed to ${amount1} seconds.` + `✅ Status Changed to ${amount1} seconds.` ) .setColor("GREEN"), ], diff --git a/src/commands/utility/webhooks.ts b/src/commands/utility/webhooks.ts index fdbfa83..6692d14 100644 --- a/src/commands/utility/webhooks.ts +++ b/src/commands/utility/webhooks.ts @@ -28,6 +28,8 @@ export default { category: "utility", description: "Send Messages Through Webhooks", + permissions: ["ADMINISTRATOR"], + slash: true, guildOnly: true, Cooldown: "10s", @@ -54,14 +56,13 @@ export default { username: WEBHOOK_USERNAME, }); } catch (err) { - throw err + throw err; } interaction.reply({ - content: `Successfully Sent Data Thorugh Webhook`, - ephemeral: true - - }) + content: `✅ Successfully Sent Data Thorugh Webhook`, + ephemeral: true, + }); }); }, diff --git a/src/features/Tickets/ticket-create.ts b/src/features/Tickets/ticket-create.ts index ae0cba1..ca6ab79 100644 --- a/src/features/Tickets/ticket-create.ts +++ b/src/features/Tickets/ticket-create.ts @@ -132,7 +132,7 @@ Ticket Category: ${label1} Closed: false, }); await ButtonInteraction.editReply({ - content: `:white_check_mark: Created Ticket Channel ${channel}`, + content: `✅ Created Ticket Channel ${channel}`, }); msg1.pin(); }); diff --git a/src/features/Tickets/ticket-system.ts b/src/features/Tickets/ticket-system.ts index c1531ab..d81c5ea 100644 --- a/src/features/Tickets/ticket-system.ts +++ b/src/features/Tickets/ticket-system.ts @@ -70,7 +70,7 @@ export default (client: Client) => { new MessageEmbed() .setColor("RED") .setDescription( - ":x: No Data Was Found about this Channel, Delete/close it Manually!" + "❌ No Data Was Found about this Channel, Delete/close it Manually!" ), ], }); @@ -79,14 +79,29 @@ export default (client: Client) => { switch (customId) { case "ticket-close": if (docs.Closed == true) { + const row1 = new MessageActionRow(); + row1.addComponents( + new MessageButton() + .setCustomId("ticket-reopen") + .setLabel("Reopen Ticket") + .setEmoji("🔄") + .setStyle("SUCCESS"), + + new MessageButton() + .setCustomId("ticket-delete") + .setLabel("Delete Ticket") + .setEmoji("✅") + .setStyle("DANGER") + ); await ButtonInteraction.reply({ embeds: [ new MessageEmbed() .setColor("RED") .setDescription( - ":x: The Ticket is already Closed." + `❌ Ticket is already closed. ` ), ], + components: [row1], ephemeral: true, }); return; @@ -154,7 +169,7 @@ export default (client: Client) => { new MessageEmbed() .setColor("GREEN") .setDescription( - `:white_check_mark: Ticket Closed Successfully!` + `✅ Ticket Closed Successfully!` ), ], components: [row1], @@ -176,7 +191,7 @@ export default (client: Client) => { new MessageEmbed() .setColor("RED") .setDescription( - ":x: The Ticket is already Open." + "❌ The Ticket is already Open." ), ], ephemeral: true, @@ -196,7 +211,7 @@ export default (client: Client) => { new MessageEmbed() .setColor("GREEN") .setDescription( - `:white_check_mark: Ticket Reopened Successfully!` + `✅ Ticket Reopened Successfully!` ), ], }); @@ -208,7 +223,7 @@ export default (client: Client) => { new MessageEmbed() .setColor("RED") .setDescription( - ":x: *PLEASE CLOSE this ticket first!!*" + "❌ *PLEASE CLOSE this ticket first!!*" ), ], ephemeral: true, @@ -220,7 +235,7 @@ export default (client: Client) => { new MessageEmbed() .setColor("GREEN") .setDescription( - `:white_check_mark: Ticket Deletion has been started!` + `✅ Ticket Deletion has been started!` ), ], }); @@ -250,7 +265,7 @@ export default (client: Client) => { `Name: ${channel.name} | ID: ${channel.id}` ) .setDescription( - `:white_check_mark: Channel Closed by ${member} ` + `✅ Channel Closed by ${member} ` ), ], files: [attachment], @@ -261,7 +276,7 @@ export default (client: Client) => { new MessageEmbed() .setColor("GREEN") .setTitle( - `:white_check_mark: Your Ticket has been Closed!` + `✅ Your Ticket has been Closed!` ) .setDescription( ` diff --git a/src/features/dms-check.ts b/src/features/dms-check.ts index 369e311..8edad14 100644 --- a/src/features/dms-check.ts +++ b/src/features/dms-check.ts @@ -41,7 +41,7 @@ export default (client: Client) => { ], }); await interaction.editReply( - ":x: You Have Not Been Verified. \n> please close your dms in this server" + "❌ You Have Not Been Verified. \n> please close your dms in this server" ); } catch (error) { const DATA = await mainRoleSchema.findById({ diff --git a/src/features/error.ts b/src/features/error.ts index 3478253..e5197b3 100644 --- a/src/features/error.ts +++ b/src/features/error.ts @@ -21,22 +21,22 @@ export default async (client: Client) => { var title: string = "something went wrong"; var desc: any = "> *unknown error messsage*"; - process.on("unhandledRejection", async (reason) => { + process.on("unhandledRejection", async (reason, p) => { title = "UNHANDLED REJECTION FOUND!!!"; desc = reason; - await ReportError(client, title, desc); + await ReportError(client, title, desc, p); }); - process.on("uncaughtExceptionMonitor", async (reason) => { + process.on("uncaughtExceptionMonitor", async (reason, p) => { title = "UNCAUGHT EXCEPTION FOUND!!!"; desc = reason; - await ReportError(client, title, desc); + await ReportError(client, title, desc, p); }); - process.on("multipleResolves", async (type, reason) => { + process.on("multipleResolves", async (type, p, reason) => { title = "MULTIPLE RESOLVES FOUND!!!"; desc = `${reason}\n\ntype:${type}`; - await ReportError(client, title, desc); + await ReportError(client, title, desc, p); }); }; @@ -45,13 +45,16 @@ export const config = { displayName: "Error Handling", }; -async function ReportError(client: Client, title: string, desc: string) { +async function ReportError(client: Client, title: string, desc: any, p: any) { const ErrEmbed = new MessageEmbed() .setTitle(title) .setDescription( ` \`\`\` ${desc} + +>>> ${p} <<< + \`\`\` Error Reported at: ` @@ -70,5 +73,5 @@ Error Reported at: return; } - c.send({ embeds: [ErrEmbed] }); + await c.send({ embeds: [ErrEmbed] }); } From cba03c66b1dad93a4e3c2080a1b8a079c781db71 Mon Sep 17 00:00:00 2001 From: HARSH PATEL <83941233+HarshPatel5940@users.noreply.github.com> Date: Wed, 24 Aug 2022 16:52:11 +0530 Subject: [PATCH 10/13] Update welcome.ts Removed Unwanted spaces in the msg --- src/features/welcome.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/features/welcome.ts b/src/features/welcome.ts index 827e96e..ad646df 100644 --- a/src/features/welcome.ts +++ b/src/features/welcome.ts @@ -50,12 +50,12 @@ export default (client: Client) => { .setTitle(`Member Info`) .setDescription( ` - Member: <@${id}> | \`${id}\` - Created: | Joined: - Total Server Members: ${guild.memberCount} - ` +Member: <@${id}> | \`${id}\` +Created: | Joined: +Total Server Members: ${guild.memberCount} +` ), ], }); From 3d4d5acaf049b9bf706ffbfaa851cb9c4ac25921 Mon Sep 17 00:00:00 2001 From: HARSH PATEL <83941233+HarshPatel5940@users.noreply.github.com> Date: Wed, 24 Aug 2022 16:52:23 +0530 Subject: [PATCH 11/13] cleaning waste --- package-lock.json | 547 ++++++++++++++------------ src/commands/utility/echo-category.ts | 63 --- 2 files changed, 291 insertions(+), 319 deletions(-) delete mode 100644 src/commands/utility/echo-category.ts diff --git a/package-lock.json b/package-lock.json index 0eb0f59..74d0ae2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "discord-helper-bot", - "version": "1.1.4", + "version": "1.1.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "discord-helper-bot", - "version": "1.1.4", + "version": "1.1.5", "license": "SEE LICENSE IN 'LICENSE' ", "dependencies": { "black": "^0.3.0", @@ -36,13 +36,13 @@ } }, "node_modules/@discordjs/builders": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.14.0.tgz", - "integrity": "sha512-+fqLIqa9wN3R+kvlld8sgG0nt04BAZxdCDP4t2qZ9TJsquLWA+xMtT8Waibb3d4li4AQS+IOfjiHAznv/dhHgQ==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.16.0.tgz", + "integrity": "sha512-9/NCiZrLivgRub2/kBc0Vm5pMBE5AUdYbdXsLu/yg9ANgvnaJ0bZKTY8yYnLbsEc/LYUP79lEIdC73qEYhWq7A==", + "deprecated": "no longer supported", "dependencies": { - "@sapphire/shapeshift": "^3.1.0", - "@sindresorhus/is": "^4.6.0", - "discord-api-types": "^0.33.3", + "@sapphire/shapeshift": "^3.5.1", + "discord-api-types": "^0.36.2", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.1", "tslib": "^2.4.0" @@ -51,10 +51,16 @@ "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": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz", "integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA==", + "deprecated": "no longer supported", "engines": { "node": ">=16.9.0" } @@ -82,34 +88,27 @@ } }, "node_modules/@sapphire/async-queue": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.1.tgz", - "integrity": "sha512-FFTlPOWZX1kDj9xCAsRzH5xEJfawg1lNoYAA+ecOWJMHOfiZYb1uXOI3ne9U4UILSEPwfE68p3T9wUHwIQfR0g==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz", + "integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==", "engines": { "node": ">=v14.0.0", "npm": ">=7.0.0" } }, "node_modules/@sapphire/shapeshift": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.4.1.tgz", - "integrity": "sha512-OSR/yVE6butSlp/yvKntcg92k8IIDeTccfz1fw69lTZN02+JJ2GyKnA3Z1CLYelWc8Dh/yqO/iGTo9ypxFcAcg==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.5.1.tgz", + "integrity": "sha512-7JFsW5IglyOIUQI1eE0g6h06D/Far6HqpcowRScgCiLSqTf3hhkPWCWotVTtVycnDCMYIwPeaw6IEPBomKC8pA==", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "lodash.uniqwith": "^4.5.0" + }, "engines": { "node": ">=v14.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/@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", @@ -145,9 +144,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.0.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.3.tgz", - "integrity": "sha512-HzNRZtp4eepNitP+BD6k2L6DROIDG4Q0fm4x+dwfsr6LGmROENnok75VGw40628xf+iR24WeMFcHuuBDUAzzsQ==" + "version": "18.7.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz", + "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==" }, "node_modules/@types/node-fetch": { "version": "2.6.2", @@ -204,9 +203,9 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "node_modules/acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "bin": { "acorn": "bin/acorn" }, @@ -350,9 +349,9 @@ "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" }, "node_modules/bson": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.6.4.tgz", - "integrity": "sha512-TdQ3FzguAu5HKPPlr0kYQCyrYUYh8tFM+CMTpxjNzVzxeiJY00Rtuj3LXLHSgiGvmaWlZ8PE+4KyM2thqE38pQ==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.0.tgz", + "integrity": "sha512-VrlEE4vuiO1WTpfof4VmaVolCVYkYTgB9iWgYNOrVlnifpME/06fhFRmONgBhClD5pFC1t9ZWqFUQEQAzY43bA==", "dependencies": { "buffer": "^5.6.0" }, @@ -489,18 +488,6 @@ "node": ">=12" } }, - "node_modules/data-urls/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/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -523,9 +510,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/decimal.js": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", - "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==" + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.0.tgz", + "integrity": "sha512-Nv6ENEzyPQ6AItkGwLE2PGKinZZ9g59vSh2BeH6NqPu0OTKZ5ruJsVqh/orbAnqXc9pBbgXAIrc2EyaCj8NpGg==" }, "node_modules/deep-is": { "version": "0.1.4", @@ -541,9 +528,9 @@ } }, "node_modules/denque": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz", - "integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", "engines": { "node": ">=0.10" } @@ -562,32 +549,33 @@ "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg==" }, "node_modules/discord-html-transcripts": { - "version": "2.5.8", - "resolved": "https://registry.npmjs.org/discord-html-transcripts/-/discord-html-transcripts-2.5.8.tgz", - "integrity": "sha512-VS23t4mWMI2hOLe010hUJ7AWpMFmQF3qXcJhSJ1QxeCVs6y7ZmO6MkCuTj7M/Zsdv8l5gdqBZ9uDsCicXe1YjA==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/discord-html-transcripts/-/discord-html-transcripts-2.6.1.tgz", + "integrity": "sha512-CYR8gR5qqRHzhHXn6osfj0Uo4znZnVukKKTEmieYzRBmIu6jaOPLnINBhoIdw9YOIh4trz0HzwPTnqgCr9ltaw==", "dependencies": { "axios": "^0.27.2", + "dotenv": "^16.0.1", "he": "^1.2.0", - "highlight.js": "^11.5.1", + "highlight.js": "^11.6.0", "html-minifier": "^4.0.0", - "jsdom": "^19.0.0", + "jsdom": "^20.0.0", "twemoji-parser": "^14.0.0" } }, "node_modules/discord.js": { - "version": "13.8.1", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.1.tgz", - "integrity": "sha512-jOsD+4tEZWWx0RHVyH+FBcqoTrsL+d5Mm5p+ULQOdU0qSaxhLNkWYig+yDHNZoND7nlkXX3qi+BW+gO5erWylg==", + "version": "13.10.3", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.10.3.tgz", + "integrity": "sha512-cIARuxfpQDeqA9Zw3fz4IL20xAhtMsjwJIf7/K82R3n2xROG9/fAx+7qjX8ysp9BfflYqMu2ZskyWq1EAmL5BA==", "dependencies": { - "@discordjs/builders": "^0.14.0", + "@discordjs/builders": "^0.16.0", "@discordjs/collection": "^0.7.0", - "@sapphire/async-queue": "^1.3.1", - "@types/node-fetch": "^2.6.1", + "@sapphire/async-queue": "^1.5.0", + "@types/node-fetch": "^2.6.2", "@types/ws": "^8.5.3", "discord-api-types": "^0.33.3", "form-data": "^4.0.0", - "node-fetch": "^2.6.1", - "ws": "^8.7.0" + "node-fetch": "^2.6.7", + "ws": "^8.8.1" }, "engines": { "node": ">=16.6.0", @@ -613,6 +601,17 @@ "node": ">=12" } }, + "node_modules/entities": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", + "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/escodegen": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", @@ -756,9 +755,9 @@ } }, "node_modules/highlight.js": { - "version": "11.5.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.5.1.tgz", - "integrity": "sha512-LKzHqnxr4CrD2YsNoIf/o5nJ09j4yi/GcH5BnYz9UnVpZdS4ucMgvP61TDty5xJcFGRjnH4DpujkS9bHT3hq0Q==", + "version": "11.6.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.6.0.tgz", + "integrity": "sha512-ig1eqDzJaB0pqEvlPVIpSSyMaO92bH1N2rJpLMN/nX396wTpDA4Eq0uK+7I/2XG17pFaaKE0kjV/XPeGt7Evjw==", "engines": { "node": ">=12.0.0" } @@ -855,9 +854,9 @@ "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==" }, "node_modules/ip": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", - "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" }, "node_modules/is-binary-path": { "version": "2.1.0", @@ -903,27 +902,27 @@ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, "node_modules/jsdom": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-19.0.0.tgz", - "integrity": "sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==", + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.0.tgz", + "integrity": "sha512-x4a6CKCgx00uCmP+QakBDFXwjAJ69IkkIWHmtmjd3wvXPcdOS44hfX2vqkOQrVrq8l9DhNNADZRXaCEWvgXtVA==", "dependencies": { - "abab": "^2.0.5", - "acorn": "^8.5.0", + "abab": "^2.0.6", + "acorn": "^8.7.1", "acorn-globals": "^6.0.0", "cssom": "^0.5.0", "cssstyle": "^2.3.0", - "data-urls": "^3.0.1", + "data-urls": "^3.0.2", "decimal.js": "^10.3.1", "domexception": "^4.0.0", "escodegen": "^2.0.0", "form-data": "^4.0.0", "html-encoding-sniffer": "^3.0.0", "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", "is-potential-custom-element-name": "^1.0.1", "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", + "parse5": "^7.0.0", + "saxes": "^6.0.0", "symbol-tree": "^3.2.4", "tough-cookie": "^4.0.0", "w3c-hr-time": "^1.0.2", @@ -931,12 +930,12 @@ "webidl-conversions": "^7.0.0", "whatwg-encoding": "^2.0.0", "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^10.0.0", - "ws": "^8.2.3", + "whatwg-url": "^11.0.0", + "ws": "^8.8.0", "xml-name-validator": "^4.0.0" }, "engines": { - "node": ">=12" + "node": ">=14" }, "peerDependencies": { "canvas": "^2.5.0" @@ -964,6 +963,11 @@ "node": ">= 0.8.0" } }, + "node_modules/lodash.uniqwith": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz", + "integrity": "sha512-7lYL8bLopMoy4CTICbxygAUq6CdRJ36vFc80DucPueUee+d5NBRxz3FdT9Pes/HEx5mPoT9jwnsEJWz1N7uq7Q==" + }, "node_modules/lower-case": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", @@ -1011,11 +1015,11 @@ } }, "node_modules/mongodb": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.7.0.tgz", - "integrity": "sha512-HhVar6hsUeMAVlIbwQwWtV36iyjKd9qdhY+s4wcU8K6TOj4Q331iiMy+FoPuxEntDIijTYWivwFJkLv8q/ZgvA==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.8.1.tgz", + "integrity": "sha512-/NyiM3Ox9AwP5zrfT9TXjRKDJbXlLaUDQ9Rg//2lbg8D2A8GXV0VidYYnA/gfdK6uwbnL4FnAflH7FbGw3TS7w==", "dependencies": { - "bson": "^4.6.3", + "bson": "^4.6.5", "denque": "^2.0.1", "mongodb-connection-string-url": "^2.5.2", "socks": "^2.6.2" @@ -1028,34 +1032,22 @@ } }, "node_modules/mongodb-connection-string-url": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.2.tgz", - "integrity": "sha512-tWDyIG8cQlI5k3skB6ywaEA5F9f5OntrKKsT/Lteub2zgwSUlhqEN2inGgBTm8bpYJf8QYBdA/5naz65XDpczA==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.3.tgz", + "integrity": "sha512-f+/WsED+xF4B74l3k9V/XkTVj5/fxFH2o5ToKXd8Iyi5UhM+sO9u0Ape17Mvl/GkZaFtM0HQnzAG5OTmhKw+tQ==", "dependencies": { "@types/whatwg-url": "^8.2.1", "whatwg-url": "^11.0.0" } }, - "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/mongoose": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.4.4.tgz", - "integrity": "sha512-r6sp96veRNhNIWFtHHe4Lqak+ilgiExYnnMLhYTGdzjIMR90G1ayx0JKFVdHuC6dKNHGFX0ETJGbf36N8Romjg==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.5.2.tgz", + "integrity": "sha512-3CFDrSLtK2qjM1pZeZpLTUyqPRkc11Iuh74ZrwS4IwEJ3K2PqGnmyPLw7ex4Kzu37ujIMp3MAuiBlUjfrcb6hw==", "dependencies": { - "bson": "^4.6.2", + "bson": "^4.6.5", "kareem": "2.4.1", - "mongodb": "4.7.0", + "mongodb": "4.8.1", "mpath": "0.9.0", "mquery": "4.0.3", "ms": "2.1.3", @@ -1227,9 +1219,15 @@ } }, "node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", + "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", + "dependencies": { + "entities": "^4.3.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } }, "node_modules/picomatch": { "version": "2.3.1", @@ -1268,6 +1266,11 @@ "node": ">=6" } }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -1287,6 +1290,11 @@ "node": ">= 0.10" } }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -1305,14 +1313,14 @@ } }, "node_modules/saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dependencies": { "xmlchars": "^2.2.0" }, "engines": { - "node": ">=10" + "node": ">=v12.22.7" } }, "node_modules/semver": { @@ -1357,11 +1365,11 @@ } }, "node_modules/socks": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", - "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz", + "integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==", "dependencies": { - "ip": "^1.1.5", + "ip": "^2.0.0", "smart-buffer": "^4.2.0" }, "engines": { @@ -1425,13 +1433,14 @@ } }, "node_modules/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.0.tgz", + "integrity": "sha512-IVX6AagLelGwl6F0E+hoRpXzuD192cZhAcmT7/eoLr0PnsB1wv2E5c+A2O+V8xth9FlL2p0OstFsWn0bZpVn4w==", "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", - "universalify": "^0.1.2" + "universalify": "^0.2.0", + "url-parse": "^1.5.3" }, "engines": { "node": ">=6" @@ -1537,9 +1546,9 @@ } }, "node_modules/uglify-js": { - "version": "3.16.2", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.16.2.tgz", - "integrity": "sha512-AaQNokTNgExWrkEYA24BTNMSjyqEXPSfhqoS0AxmHkCJ4U+Dyy5AvbGV/sqxuxficEfGGoX3zWw9R7QpLFfEsg==", + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.0.tgz", + "integrity": "sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg==", "bin": { "uglifyjs": "bin/uglifyjs" }, @@ -1553,9 +1562,9 @@ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" }, "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", "engines": { "node": ">= 4.0.0" } @@ -1565,6 +1574,15 @@ "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", "integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==" }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -1617,9 +1635,9 @@ } }, "node_modules/whatwg-url": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-10.0.0.tgz", - "integrity": "sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==", + "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" @@ -1655,9 +1673,9 @@ } }, "node_modules/ws": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.0.tgz", - "integrity": "sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", + "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", "engines": { "node": ">=10.0.0" }, @@ -1706,16 +1724,22 @@ } }, "@discordjs/builders": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.14.0.tgz", - "integrity": "sha512-+fqLIqa9wN3R+kvlld8sgG0nt04BAZxdCDP4t2qZ9TJsquLWA+xMtT8Waibb3d4li4AQS+IOfjiHAznv/dhHgQ==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.16.0.tgz", + "integrity": "sha512-9/NCiZrLivgRub2/kBc0Vm5pMBE5AUdYbdXsLu/yg9ANgvnaJ0bZKTY8yYnLbsEc/LYUP79lEIdC73qEYhWq7A==", "requires": { - "@sapphire/shapeshift": "^3.1.0", - "@sindresorhus/is": "^4.6.0", - "discord-api-types": "^0.33.3", + "@sapphire/shapeshift": "^3.5.1", + "discord-api-types": "^0.36.2", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.1", "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": { @@ -1743,19 +1767,18 @@ } }, "@sapphire/async-queue": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.1.tgz", - "integrity": "sha512-FFTlPOWZX1kDj9xCAsRzH5xEJfawg1lNoYAA+ecOWJMHOfiZYb1uXOI3ne9U4UILSEPwfE68p3T9wUHwIQfR0g==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz", + "integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==" }, "@sapphire/shapeshift": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.4.1.tgz", - "integrity": "sha512-OSR/yVE6butSlp/yvKntcg92k8IIDeTccfz1fw69lTZN02+JJ2GyKnA3Z1CLYelWc8Dh/yqO/iGTo9ypxFcAcg==" - }, - "@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==" + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.5.1.tgz", + "integrity": "sha512-7JFsW5IglyOIUQI1eE0g6h06D/Far6HqpcowRScgCiLSqTf3hhkPWCWotVTtVycnDCMYIwPeaw6IEPBomKC8pA==", + "requires": { + "fast-deep-equal": "^3.1.3", + "lodash.uniqwith": "^4.5.0" + } }, "@tootallnate/once": { "version": "2.0.0", @@ -1789,9 +1812,9 @@ "dev": true }, "@types/node": { - "version": "18.0.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.3.tgz", - "integrity": "sha512-HzNRZtp4eepNitP+BD6k2L6DROIDG4Q0fm4x+dwfsr6LGmROENnok75VGw40628xf+iR24WeMFcHuuBDUAzzsQ==" + "version": "18.7.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz", + "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==" }, "@types/node-fetch": { "version": "2.6.2", @@ -1847,9 +1870,9 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==" + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==" }, "acorn-globals": { "version": "6.0.0", @@ -1951,9 +1974,9 @@ "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" }, "bson": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.6.4.tgz", - "integrity": "sha512-TdQ3FzguAu5HKPPlr0kYQCyrYUYh8tFM+CMTpxjNzVzxeiJY00Rtuj3LXLHSgiGvmaWlZ8PE+4KyM2thqE38pQ==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.0.tgz", + "integrity": "sha512-VrlEE4vuiO1WTpfof4VmaVolCVYkYTgB9iWgYNOrVlnifpME/06fhFRmONgBhClD5pFC1t9ZWqFUQEQAzY43bA==", "requires": { "buffer": "^5.6.0" } @@ -2050,17 +2073,6 @@ "abab": "^2.0.6", "whatwg-mimetype": "^3.0.0", "whatwg-url": "^11.0.0" - }, - "dependencies": { - "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" - } - } } }, "debug": { @@ -2079,9 +2091,9 @@ } }, "decimal.js": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", - "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==" + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.0.tgz", + "integrity": "sha512-Nv6ENEzyPQ6AItkGwLE2PGKinZZ9g59vSh2BeH6NqPu0OTKZ5ruJsVqh/orbAnqXc9pBbgXAIrc2EyaCj8NpGg==" }, "deep-is": { "version": "0.1.4", @@ -2094,9 +2106,9 @@ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" }, "denque": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz", - "integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==" }, "diff": { "version": "4.0.2", @@ -2109,32 +2121,33 @@ "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg==" }, "discord-html-transcripts": { - "version": "2.5.8", - "resolved": "https://registry.npmjs.org/discord-html-transcripts/-/discord-html-transcripts-2.5.8.tgz", - "integrity": "sha512-VS23t4mWMI2hOLe010hUJ7AWpMFmQF3qXcJhSJ1QxeCVs6y7ZmO6MkCuTj7M/Zsdv8l5gdqBZ9uDsCicXe1YjA==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/discord-html-transcripts/-/discord-html-transcripts-2.6.1.tgz", + "integrity": "sha512-CYR8gR5qqRHzhHXn6osfj0Uo4znZnVukKKTEmieYzRBmIu6jaOPLnINBhoIdw9YOIh4trz0HzwPTnqgCr9ltaw==", "requires": { "axios": "^0.27.2", + "dotenv": "^16.0.1", "he": "^1.2.0", - "highlight.js": "^11.5.1", + "highlight.js": "^11.6.0", "html-minifier": "^4.0.0", - "jsdom": "^19.0.0", + "jsdom": "^20.0.0", "twemoji-parser": "^14.0.0" } }, "discord.js": { - "version": "13.8.1", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.1.tgz", - "integrity": "sha512-jOsD+4tEZWWx0RHVyH+FBcqoTrsL+d5Mm5p+ULQOdU0qSaxhLNkWYig+yDHNZoND7nlkXX3qi+BW+gO5erWylg==", + "version": "13.10.3", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.10.3.tgz", + "integrity": "sha512-cIARuxfpQDeqA9Zw3fz4IL20xAhtMsjwJIf7/K82R3n2xROG9/fAx+7qjX8ysp9BfflYqMu2ZskyWq1EAmL5BA==", "requires": { - "@discordjs/builders": "^0.14.0", + "@discordjs/builders": "^0.16.0", "@discordjs/collection": "^0.7.0", - "@sapphire/async-queue": "^1.3.1", - "@types/node-fetch": "^2.6.1", + "@sapphire/async-queue": "^1.5.0", + "@types/node-fetch": "^2.6.2", "@types/ws": "^8.5.3", "discord-api-types": "^0.33.3", "form-data": "^4.0.0", - "node-fetch": "^2.6.1", - "ws": "^8.7.0" + "node-fetch": "^2.6.7", + "ws": "^8.8.1" } }, "domexception": { @@ -2150,6 +2163,11 @@ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz", "integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==" }, + "entities": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", + "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==" + }, "escodegen": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", @@ -2235,9 +2253,9 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" }, "highlight.js": { - "version": "11.5.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.5.1.tgz", - "integrity": "sha512-LKzHqnxr4CrD2YsNoIf/o5nJ09j4yi/GcH5BnYz9UnVpZdS4ucMgvP61TDty5xJcFGRjnH4DpujkS9bHT3hq0Q==" + "version": "11.6.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.6.0.tgz", + "integrity": "sha512-ig1eqDzJaB0pqEvlPVIpSSyMaO92bH1N2rJpLMN/nX396wTpDA4Eq0uK+7I/2XG17pFaaKE0kjV/XPeGt7Evjw==" }, "html-encoding-sniffer": { "version": "3.0.0", @@ -2299,9 +2317,9 @@ "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==" }, "ip": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", - "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" }, "is-binary-path": { "version": "2.1.0", @@ -2335,27 +2353,27 @@ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, "jsdom": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-19.0.0.tgz", - "integrity": "sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==", + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.0.tgz", + "integrity": "sha512-x4a6CKCgx00uCmP+QakBDFXwjAJ69IkkIWHmtmjd3wvXPcdOS44hfX2vqkOQrVrq8l9DhNNADZRXaCEWvgXtVA==", "requires": { - "abab": "^2.0.5", - "acorn": "^8.5.0", + "abab": "^2.0.6", + "acorn": "^8.7.1", "acorn-globals": "^6.0.0", "cssom": "^0.5.0", "cssstyle": "^2.3.0", - "data-urls": "^3.0.1", + "data-urls": "^3.0.2", "decimal.js": "^10.3.1", "domexception": "^4.0.0", "escodegen": "^2.0.0", "form-data": "^4.0.0", "html-encoding-sniffer": "^3.0.0", "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", "is-potential-custom-element-name": "^1.0.1", "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", + "parse5": "^7.0.0", + "saxes": "^6.0.0", "symbol-tree": "^3.2.4", "tough-cookie": "^4.0.0", "w3c-hr-time": "^1.0.2", @@ -2363,8 +2381,8 @@ "webidl-conversions": "^7.0.0", "whatwg-encoding": "^2.0.0", "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^10.0.0", - "ws": "^8.2.3", + "whatwg-url": "^11.0.0", + "ws": "^8.8.0", "xml-name-validator": "^4.0.0" } }, @@ -2382,6 +2400,11 @@ "type-check": "~0.3.2" } }, + "lodash.uniqwith": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz", + "integrity": "sha512-7lYL8bLopMoy4CTICbxygAUq6CdRJ36vFc80DucPueUee+d5NBRxz3FdT9Pes/HEx5mPoT9jwnsEJWz1N7uq7Q==" + }, "lower-case": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", @@ -2420,11 +2443,11 @@ } }, "mongodb": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.7.0.tgz", - "integrity": "sha512-HhVar6hsUeMAVlIbwQwWtV36iyjKd9qdhY+s4wcU8K6TOj4Q331iiMy+FoPuxEntDIijTYWivwFJkLv8q/ZgvA==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.8.1.tgz", + "integrity": "sha512-/NyiM3Ox9AwP5zrfT9TXjRKDJbXlLaUDQ9Rg//2lbg8D2A8GXV0VidYYnA/gfdK6uwbnL4FnAflH7FbGw3TS7w==", "requires": { - "bson": "^4.6.3", + "bson": "^4.6.5", "denque": "^2.0.1", "mongodb-connection-string-url": "^2.5.2", "saslprep": "^1.0.3", @@ -2432,33 +2455,22 @@ } }, "mongodb-connection-string-url": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.2.tgz", - "integrity": "sha512-tWDyIG8cQlI5k3skB6ywaEA5F9f5OntrKKsT/Lteub2zgwSUlhqEN2inGgBTm8bpYJf8QYBdA/5naz65XDpczA==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.3.tgz", + "integrity": "sha512-f+/WsED+xF4B74l3k9V/XkTVj5/fxFH2o5ToKXd8Iyi5UhM+sO9u0Ape17Mvl/GkZaFtM0HQnzAG5OTmhKw+tQ==", "requires": { "@types/whatwg-url": "^8.2.1", "whatwg-url": "^11.0.0" - }, - "dependencies": { - "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" - } - } } }, "mongoose": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.4.4.tgz", - "integrity": "sha512-r6sp96veRNhNIWFtHHe4Lqak+ilgiExYnnMLhYTGdzjIMR90G1ayx0JKFVdHuC6dKNHGFX0ETJGbf36N8Romjg==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.5.2.tgz", + "integrity": "sha512-3CFDrSLtK2qjM1pZeZpLTUyqPRkc11Iuh74ZrwS4IwEJ3K2PqGnmyPLw7ex4Kzu37ujIMp3MAuiBlUjfrcb6hw==", "requires": { - "bson": "^4.6.2", + "bson": "^4.6.5", "kareem": "2.4.1", - "mongodb": "4.7.0", + "mongodb": "4.8.1", "mpath": "0.9.0", "mquery": "4.0.3", "ms": "2.1.3", @@ -2587,9 +2599,12 @@ } }, "parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", + "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", + "requires": { + "entities": "^4.3.0" + } }, "picomatch": { "version": "2.3.1", @@ -2616,6 +2631,11 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, "readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -2629,6 +2649,11 @@ "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==" }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -2644,9 +2669,9 @@ } }, "saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "requires": { "xmlchars": "^2.2.0" } @@ -2682,11 +2707,11 @@ "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" }, "socks": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", - "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz", + "integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==", "requires": { - "ip": "^1.1.5", + "ip": "^2.0.0", "smart-buffer": "^4.2.0" } }, @@ -2734,13 +2759,14 @@ } }, "tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.0.tgz", + "integrity": "sha512-IVX6AagLelGwl6F0E+hoRpXzuD192cZhAcmT7/eoLr0PnsB1wv2E5c+A2O+V8xth9FlL2p0OstFsWn0bZpVn4w==", "requires": { "psl": "^1.1.33", "punycode": "^2.1.1", - "universalify": "^0.1.2" + "universalify": "^0.2.0", + "url-parse": "^1.5.3" } }, "tr46": { @@ -2807,9 +2833,9 @@ "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==" }, "uglify-js": { - "version": "3.16.2", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.16.2.tgz", - "integrity": "sha512-AaQNokTNgExWrkEYA24BTNMSjyqEXPSfhqoS0AxmHkCJ4U+Dyy5AvbGV/sqxuxficEfGGoX3zWw9R7QpLFfEsg==" + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.0.tgz", + "integrity": "sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg==" }, "undefsafe": { "version": "2.0.5", @@ -2817,15 +2843,24 @@ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" }, "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==" }, "upper-case": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", "integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==" }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -2866,9 +2901,9 @@ "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==" }, "whatwg-url": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-10.0.0.tgz", - "integrity": "sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==", + "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" @@ -2897,9 +2932,9 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" }, "ws": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.0.tgz", - "integrity": "sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", + "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", "requires": {} }, "xml-name-validator": { diff --git a/src/commands/utility/echo-category.ts b/src/commands/utility/echo-category.ts deleted file mode 100644 index 73f7d35..0000000 --- a/src/commands/utility/echo-category.ts +++ /dev/null @@ -1,63 +0,0 @@ -/** - Copyright [2022] [HarshPatel5940] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. */ - -import { ICommand } from "wokcommands"; -import DJS, { MessageEmbed } from "discord.js"; - -const TYPES = DJS.Constants.ApplicationCommandOptionTypes; - -export default { - category: "utility", - description: "It will repeat the message in all the channels of a category", - - slash: true, - testOnly: true, - guildOnly: true, - - cooldown: "5s", - - options: [ - { - name: "category", - description: "Category in which you want to send the message", - required: true, - type: TYPES.CHANNEL, - channelTypes: ["GUILD_CATEGORY"], - }, - { - name: "text", - description: "The Text you want to send to the channels", - required: true, - type: TYPES.STRING, - }, - ], - - callback: async ({ interaction }) => { - if (!interaction || !interaction.guild) return; - - const category1 = interaction.options.getChannel("category"); - const text1 = interaction.options.getString("text"); - - if (!category1) return "can't fetch category"; - - const Ccategory = interaction.guild.channels.cache.get(category1.id); - - if (!Ccategory || Ccategory.type !== "GUILD_CATEGORY") return; - - let childs = Ccategory.children; - - console.log(childs); - }, -} as ICommand; From d3ef5fe4ed1e37bdf21b9e96501346f62ce91a6d Mon Sep 17 00:00:00 2001 From: HARSH PATEL <83941233+HarshPatel5940@users.noreply.github.com> Date: Wed, 24 Aug 2022 16:52:53 +0530 Subject: [PATCH 12/13] Create purge-closed-tickets.ts A New Cmd which will delete closed tickets / channels starting with `tc-` --- src/commands/utility/purge-closed-tickets.ts | 100 +++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 src/commands/utility/purge-closed-tickets.ts diff --git a/src/commands/utility/purge-closed-tickets.ts b/src/commands/utility/purge-closed-tickets.ts new file mode 100644 index 0000000..3f7377b --- /dev/null +++ b/src/commands/utility/purge-closed-tickets.ts @@ -0,0 +1,100 @@ +/** + Copyright [2022] [HarshPatel5940] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ + +import { ICommand } from "wokcommands"; +import DJS, { MessageActionRow, MessageButton, MessageEmbed } from "discord.js"; + +const TYPES = DJS.Constants.ApplicationCommandOptionTypes; + +export default { + category: "utility", + description: "It will repeat the message in all the channels of a category", + + slash: true, + guildOnly: true, + permissions: ["ADMINISTRATOR"], + + cooldown: "5s", + + callback: async ({ interaction }) => { + if (!interaction || !interaction.guild || !interaction.channel) return; + + const row = new MessageActionRow().addComponents( + new MessageButton() + .setCustomId("closed-tickets-delete") + .setLabel("Delete Closed Tickets.") + .setStyle("DANGER") + ); + + await interaction.reply({ + embeds: [ + new MessageEmbed() + .setTitle("CLOSED TICKETS DELETION PANEL") + .setColor("RED") + .setDescription( + ` +This command will delete any channels starting with \`tc-\` + +> **__NOTE__**: You will need to change ur **closed ticket settings** to \`tc- something\` so we will able to detect it has a closed ticket and delete it. + +Click The Button Below To Start The Deletion Proccess. +` + ), + ], + components: [row], + ephemeral: false, + }); + + const collector = interaction.channel.createMessageComponentCollector({ + max: 1, + }); + + collector.on("end", async (collection: any) => { + if (collection.first()?.customId === "closed-tickets-delete") { + await interaction.deleteReply(); + + if (!interaction || !interaction.guild) { + return; + } + + interaction.guild.channels.cache.forEach((ch) => { + if (!ch.name.startsWith("tc-")) { + return; + } + if (ch?.type !== "GUILD_TEXT") { + return; + } + + setTimeout(async () => { + await ch.delete(); + }, 100); + }); + + interaction.channel?.send({ + embeds: [ + new MessageEmbed() + .setColor("GREEN") + .setDescription( + `✅ Successfully Deleted Closed Tickets` + ) + .setFooter({ + text: `User ID: ${interaction.member?.user.id}`, + }), + ], + }); + } + }); + }, +} as ICommand; From ec70eee4a72441c611ead481117961774e2c9c04 Mon Sep 17 00:00:00 2001 From: HARSH PATEL <83941233+HarshPatel5940@users.noreply.github.com> Date: Wed, 24 Aug 2022 17:02:28 +0530 Subject: [PATCH 13/13] Updated The Markdown Files --- README.md | 43 +++++++------------------------------------ docs/index.md | 43 +++++++------------------------------------ 2 files changed, 14 insertions(+), 72 deletions(-) diff --git a/README.md b/README.md index 530d2e0..59be926 100644 --- a/README.md +++ b/README.md @@ -22,47 +22,18 @@ This Bot also uses _**wokcommands handler**_ for handling the commands and event listeners of the bot. ---- - -## Hosting - -- Install Node.js from [here.](https://nodejs.org/en/download/) -- Clone This Repository. - -``` -git clone https://github.com/HarshPatel5940/Discord-Helper-Bot.git -``` - -- Installing Dependencies, first go to the project folder and run - -``` -npm install -``` - -- Save Your Token, ID & Mongo uri in the **[ENV](/.env)** carefully.. - -``` -TOKEN='' - -OWNER_ID='' - -MONGO_URI='' -``` - -- Now You Can Run The Bot +## Contributions -``` -npm run dev -``` +Make sure to open a [Issue in "Feature Request"](https://github.com/HarshPatel5940/Discord-Helper-Bot/issues/new/choose) or [Discussion in "Ideas"](https://github.com/HarshPatel5940/Discord-Helper-Bot/discussions) before creating a pull request. --- -## Contributions +### License -Fork This Repository First. [🍴](https://github.com/HarshPatel5940/Discord-Helper-Bot/fork) +Released under [**Apache License 2.0**](https://github.com/HarshPatel5940/Discord-Helper-Bot/blob/main/LICENSE) by [**@HarshPatel5940**](https://github.com/HarshPatel5940). -Make sure to open a [Issue in "Feature Request"](https://github.com/HarshPatel5940/Discord-Helper-Bot/issues/new/choose) or [Discussion in "Ideas"](https://github.com/HarshPatel5940/Discord-Helper-Bot/discussions) before creating a pull request. +--- -## License +### Self Hosting -Released under [**Apache License 2.0**](/LICENSE) by [**@HarshPatel5940**](https://github.com/HarshPatel5940). +Self-hosting your own copy of this bot is not supported nor recommended; the source code is provided here so users and other bot developers can see how the bot functions. No help will be provided for compiling, or building any code in this repository, and any changes must be documented as per the [license](https://github.com/HarshPatel5940/Discord-Helper-Bot/blob/main/LICENSE). diff --git a/docs/index.md b/docs/index.md index 5950154..8f42f6e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,47 +13,18 @@ This Bot also uses _**wokcommands handler**_ for handling the commands and event listeners of the bot. ---- - -## Hosting - -- Install Node.js from [here.](https://nodejs.org/en/download/) -- Clone This Repository. - -``` -git clone https://github.com/HarshPatel5940/Discord-Helper-Bot.git -``` - -- Installing Dependencies, first go to the project folder and run - -``` -npm install -``` - -- Save Your Token, ID & Mongo uri in the **[ENV](/.env)** carefully.. - -``` -TOKEN='' - -OWNER_ID='' - -MONGO_URI='' -``` - -- Now You Can Run The Bot +## Contributions -``` -npm run dev -``` +Make sure to open a [Issue in "Feature Request"](https://github.com/HarshPatel5940/Discord-Helper-Bot/issues/new/choose) or [Discussion in "Ideas"](https://github.com/HarshPatel5940/Discord-Helper-Bot/discussions) before creating a pull request. --- -## Contributions +### License -Fork This Repository First. [🍴](https://github.com/HarshPatel5940/Discord-Helper-Bot/fork) +Released under [**Apache License 2.0**](https://github.com/HarshPatel5940/Discord-Helper-Bot/blob/main/LICENSE) by [**@HarshPatel5940**](https://github.com/HarshPatel5940). -Make sure to open a [Issue in "Feature Request"](https://github.com/HarshPatel5940/Discord-Helper-Bot/issues/new/choose) or [Discussion in "Ideas"](https://github.com/HarshPatel5940/Discord-Helper-Bot/discussions) before creating a pull request. +--- -## License +### Self Hosting -Released under [**Apache License 2.0**](/LICENSE) by [**@HarshPatel5940**](https://github.com/HarshPatel5940). +Self-hosting your own copy of this bot is not supported nor recommended; the source code is provided here so users and other bot developers can see how the bot functions. No help will be provided for compiling, or building any code in this repository, and any changes must be documented as per the [license](https://github.com/HarshPatel5940/Discord-Helper-Bot/blob/main/LICENSE).