From 36badff8ea63b012f61f045958d42ae054cd103e Mon Sep 17 00:00:00 2001 From: Sobhan <90289153+Sobhan-SRZA@users.noreply.github.com> Date: Thu, 23 Feb 2023 20:03:08 +0330 Subject: [PATCH] Last version: ^1.3.1 --- "commands/Owner \360\237\221\221/post.js" | 106 +-- "commands/Setup \360\237\222\273/settings.js" | 47 +- "commands/Ticket \360\237\216\253/ticket.js" | 40 +- events/interaction/interactionCreate.js | 6 +- events/modal/interactionCreate.js | 51 +- events/ready/ready.js | 4 +- example.env | 1 - index.js | 9 +- package-lock.json | 694 +----------------- package.json | 13 +- start/1-events.js | 12 +- start/2-handlers.js | 31 + storage/colors.json | 2 +- storage/config.js | 2 +- storage/emotes.json | 2 + storage/languages.json | 4 + 16 files changed, 149 insertions(+), 875 deletions(-) create mode 100644 start/2-handlers.js create mode 100644 storage/languages.json diff --git "a/commands/Owner \360\237\221\221/post.js" "b/commands/Owner \360\237\221\221/post.js" index 9814b1a..2003927 100644 --- "a/commands/Owner \360\237\221\221/post.js" +++ "b/commands/Owner \360\237\221\221/post.js" @@ -160,45 +160,44 @@ module.exports = { let timestamp = interaction.options.getBoolean("timestamp"); let embed = new EmbedBuilder() try{ - if(color){ - embed.setColor(color.toLowerCase().split(' ').map(string => string.charAt(0).toUpperCase() + string.slice(1)).join('')) + embed.setColor(`${color}`) } if(description){ - embed.setDescription(description) + embed.setDescription(`${description}`) } if(image){ - embed.setImage(image) + embed.setImage(`${image}`) } if(timestamp === true){ embed.setTimestamp(new Date()) } if(title){ - embed.setTitle(title) + embed.setTitle(`${title}`) } if(author_text){ embed.setAuthor({ - name: author_text + name: `${author_text}` }) } if(author_iconURL && author_text){ embed.setAuthor({ - iconURL: author_iconURL, - name: author_text + iconURL: `${author_iconURL}`, + name: `${author_text}` }) } if(footer_text){ embed.setFooter({ - text: footer_text + text: `${footer_text}` }) } if(footer_iconURL && footer_text){ embed.setFooter({ - iconURL: footer_iconURL, - text: footer_text + iconURL: `${footer_iconURL}`, + text: `${footer_text}` }) } - let embeds = embed?.description || embed?.title || embed?.author || embed?.footer || embed?.image; + let embeds = embed.data.description || embed.data.title || embed.data.author || embed.data.footer || embed.data.image; if(embeds && text){ interaction.reply({ content: `**✅| successfully post your embed and text in${channel}**`, @@ -225,42 +224,10 @@ module.exports = { content: text }) }else if(!embeds && !text){ - interaction.reply({ - embeds: [new EmbedBuilder() - .setAuthor({ - name: `Requested by ` + interaction.user.tag, - iconURL: interaction.user.displayAvatarURL({ dynamic: true }) - }) - .setTitle('⛔️| **We Got An Error**') - .setColor("RED") - .setDescription("```js\nPlese for post some text and embed, you have to fill \"text\" or fill the embed arrays.\n```") - .setFooter({ - text: "Error • "+client.embed.footerText, - iconURL: interaction.guild.iconURL({ dynamic: true }) - }) - ], - components: [new ActionRowBuilder().addComponents(new ButtonBuilder().setStyle(ButtonStyle.Danger).setLabel("Error").setEmoji("⚠️").setCustomId("error").setDisabled(true))], - ephemeral: true, - }) + errorMessage(client, interaction, `\`\`\`js\nPlese for post some text or embed, you have to fill \"text\" or fill the embed arrays.\n\`\`\``) } - }catch (e){ - interaction.reply({ - embeds: [new EmbedBuilder() - .setAuthor({ - name: `Requested by ` + interaction.user.tag, - iconURL: interaction.user.displayAvatarURL({ dynamic: true }) - }) - .setTitle('⛔️| **We Got An Error**') - .setColor("RED") - .setDescription(`\`\`\`js\n${e}\n\`\`\``) - .setFooter({ - text: "Error • "+client.embed.footerText, - iconURL: interaction.guild.iconURL({ dynamic: true }) - }) - ], - components: [new ActionRowBuilder().addComponents(new ButtonBuilder().setStyle(ButtonStyle.Danger).setLabel("Error").setEmoji("⚠️").setCustomId("error").setDisabled(true))], - ephemeral: true, - }) + }catch(e){ + errorMessage(client, interaction, `\`\`\`js\n${e}\n\`\`\``) } }break; case "dm":{ @@ -277,9 +244,8 @@ module.exports = { let timestamp = interaction.options.getBoolean("timestamp"); let embed = new EmbedBuilder() try{ - if(color){ - embed.setColor(color.toLowerCase().split(' ').map(string => string.charAt(0).toUpperCase() + string.slice(1)).join('')) + embed.setColor(`${color}`) } if(description){ embed.setDescription(description) @@ -315,7 +281,7 @@ module.exports = { text: footer_text }) } - let embeds = embed?.description || embed?.title || embed?.author || embed?.footer || embed?.image; + let embeds = embed.data.description || embed.data.title || embed.data.author || embed.data.footer || embed.data.image; if(embeds && text){ interaction.reply({ content: `**✅| successfully post your embed and text in${channel}**`, @@ -342,46 +308,14 @@ module.exports = { content: text }) }else if(!embeds && !text){ - interaction.reply({ - embeds: [new EmbedBuilder() - .setAuthor({ - name: `Requested by ` + interaction.user.tag, - iconURL: interaction.user.displayAvatarURL({ dynamic: true }) - }) - .setTitle('⛔️| **We Got An Error**') - .setColor("RED") - .setDescription("```js\nPlese for post some text and embed, you have to fill \"text\" or fill the embed arrays.\n```") - .setFooter({ - text: "Error • "+client.embed.footerText, - iconURL: interaction.guild.iconURL({ dynamic: true }) - }) - ], - components: [new ActionRowBuilder().addComponents(new ButtonBuilder().setStyle(ButtonStyle.Danger).setLabel("Error").setEmoji("⚠️").setCustomId("error").setDisabled(true))], - ephemeral: true, - }) + errorMessage(client, interaction, `\`\`\`js\nPlese for post some text or embed, you have to fill \"text\" or fill the embed arrays.\n\`\`\``) } - }catch (e){ - interaction.reply({ - embeds: [new EmbedBuilder() - .setAuthor({ - name: `Requested by ` + interaction.user.tag, - iconURL: interaction.user.displayAvatarURL({ dynamic: true }) - }) - .setTitle('⛔️| **We Got An Error**') - .setColor("RED") - .setDescription(`\`\`\`js\n${e}\n\`\`\``) - .setFooter({ - text: "Error • "+client.embed.footerText, - iconURL: interaction.guild.iconURL({ dynamic: true }) - }) - ], - components: [new ActionRowBuilder().addComponents(new ButtonBuilder().setStyle(ButtonStyle.Danger).setLabel("Error").setEmoji("⚠️").setCustomId("error").setDisabled(true))], - ephemeral: true, - }) + }catch(e){ + errorMessage(client, interaction, `\`\`\`js\n${e}\n\`\`\``) } }break; } - }catch (e){ + }catch(e){ errorMessage(client, interaction, `\`\`\`js\n${e}\n\`\`\``) } } diff --git "a/commands/Setup \360\237\222\273/settings.js" "b/commands/Setup \360\237\222\273/settings.js" index 17a9875..fab6bc7 100644 --- "a/commands/Setup \360\237\222\273/settings.js" +++ "b/commands/Setup \360\237\222\273/settings.js" @@ -25,23 +25,22 @@ module.exports = { description: "Show a dashboard of guild setting for you.", userPermissions: ["ManageChannels", "ManageGuild", "SendMessages"], botPermissions: ["ManageChannels", "SendMessages", "EmbedLinks"], - run: async (client, interaction, args, prefix) => { + run: async (client, interaction, args, lang) => { let db = client.db; try { - let menu = new StringSelectMenuBuilder().setCustomId("setup_menu").setMaxValues(1).setMinValues(1).setPlaceholder(`${client.emotes.setting}| Click me to setup !!`).addOptions([{ label: `Setup Admin Role`, value: `stadmin`, emoji: `${client.emotes.admin}` }, { label: `Setup Ticket Category`, value: `stcategory`, emoji: `${client.emotes.category}` }, { label: `Setup Ticket Log`, value: `stlog`, emoji: `${client.emotes.log}` }, { label: `Setup Ticket Type`, value: `sttype`, emoji: `${client.emotes.type}` }, { label: `Setup Ticket Menu Option`, value: `stoption`, emoji: `${client.emotes.option}` }]) - + let menu = new StringSelectMenuBuilder().setCustomId("setup_menu").setMaxValues(1).setMinValues(1).setPlaceholder(`${client.emotes.setting}| Click me to setup !!`).addOptions([{ label: `Setup Bot Language`, value: `stlanguage`, emoji: `${client.emotes.language}` }, { label: `Setup Admin Role`, value: `stadmin`, emoji: `${client.emotes.admin}` }, { label: `Setup Ticket Category`, value: `stcategory`, emoji: `${client.emotes.category}` }, { label: `Setup Ticket Log`, value: `stlog`, emoji: `${client.emotes.log}` }, { label: `Setup Ticket Type`, value: `sttype`, emoji: `${client.emotes.type}` }, { label: `Setup Ticket Menu Option`, value: `stoption`, emoji: `${client.emotes.option}` }]) + let time = 120000; interaction.reply({ - embeds: [new EmbedBuilder().setTitle(`${client.emotes.setting}| Welcome to the setting`).setColor(client.colors.none).setDescription(`This is __${client.user.username}__ setting from **${interaction.guild.name}** and you can setup all things you need for setting up your guild.`).addFields([{ name: `Bot Language:`, value: `${client.emotes.reply} 🇬🇧|English (Default)`, inline: false }, { name: `Guild Ticket Type:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.type`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply} \`${await db.get(`guild_${interaction.guild.id}.ticket.type`)}\`` : `${client.emotes.reply} \`Reason - Menu - UserTag\` (Default)`}`, inline: false }, { name: `Guild Admin Role:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.admin_role`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply}<@&${await db.get(`guild_${interaction.guild.id}.ticket.admin_role`)}>` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }, { name: `Guild Mod Log:`, value: `${await db.has(`guild_${interaction.guild.id}.modlog`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply} <#${await db.get(`guild_${interaction.guild.id}.modlog`)}>` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }, { name: `Guild Parent Channel:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.category`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply} <#${await db.get(`guild_${interaction.guild.id}.ticket.category`)}>` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }, { name: `Guild Ticket Menu Option:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.menu_option`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply}${(await db.get(`guild_${interaction.guild.id}.ticket.menu_option`)).map(o => `**Name:** \`${o.value}\` | **Emoji:** ${o.emoji ? o.emoji : "none"}`).join(`\n${client.emotes.reply}`)}` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }]).setFooter({ text: `Setting • Requested By ${interaction.user.tag} `, iconURL: interaction.user.displayAvatarURL({ dynamic: true }) }).setThumbnail(interaction.guild.iconURL({ dynamic: true })).setTimestamp()], + embeds: [new EmbedBuilder().setTitle(`${client.emotes.setting}| Welcome to the setting`).setColor(client.colors.none).setDescription(`This is __${client.user.username}__ setting from **${interaction.guild.name}** and you can setup all things you need for setting up your guild.`).addFields([{ name: `Bot Language:`, value: `${client.emotes.reply} ${client.emotes[lang]}|${client.findlang[lang]}`, inline: false }, { name: `Guild Ticket Type:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.type`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply} \`${await db.get(`guild_${interaction.guild.id}.ticket.type`)}\`` : `${client.emotes.reply} \`Reason - Menu - UserTag\` (Default)`}`, inline: false }, { name: `Guild Admin Role:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.admin_role`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply}<@&${await db.get(`guild_${interaction.guild.id}.ticket.admin_role`)}>` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }, { name: `Guild Mod Log:`, value: `${await db.has(`guild_${interaction.guild.id}.modlog`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply} <#${await db.get(`guild_${interaction.guild.id}.modlog`)}>` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }, { name: `Guild Parent Channel:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.category`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply} <#${await db.get(`guild_${interaction.guild.id}.ticket.category`)}>` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }, { name: `Guild Ticket Menu Option:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.menu_option`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply}${(await db.get(`guild_${interaction.guild.id}.ticket.menu_option`)).map(o => `**Name:** \`${o.value}\` | **Emoji:** ${o.emoji ? o.emoji : "none"}`).join(`\n${client.emotes.reply}`)}` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }]).setFooter({ text: `Setting • Requested By ${interaction.user.tag} `, iconURL: interaction.user.displayAvatarURL({ dynamic: true }) }).setThumbnail(interaction.guild.iconURL({ dynamic: true })).setTimestamp()], components: [new ActionRowBuilder().addComponents(menu), new ActionRowBuilder().addComponents(new ButtonBuilder().setStyle(ButtonStyle.Secondary).setLabel('Report').setEmoji(client.emotes.report).setCustomId(`report`), new ButtonBuilder().setStyle(ButtonStyle.Link).setLabel('Support').setEmoji(client.emotes.help).setURL(`${client.config.discord.server_support}`)), new ActionRowBuilder().addComponents(new ButtonBuilder().setStyle(ButtonStyle.Success).setLabel('Home Page').setDisabled(true).setEmoji(client.emotes.home).setCustomId("home_page"))], fetchReply: true - }).then(msg => { - const collector = msg.createMessageComponentCollector({ time: 120000 }) - collector.on('collect', async (m) => { + }).then(async(msg) =>{ + await msg.createMessageComponentCollector({ time: time }).on('collect', async (m) => { if(m.user.id === interaction.user.id){ if (m.isButton()) { if (m.customId === "home_page") { m.update({ - embeds: [new EmbedBuilder().setTitle(`${client.emotes.setting}| Welcome to the setting`).setColor(client.colors.none).setDescription(`This is __${client.user.username}__ setting from **${interaction.guild.name}** and you can setup all things you need for setting up your guild.`).addFields([{ name: `Bot Language:`, value: `${client.emotes.reply} 🇬🇧|English (Default)`, inline: false }, { name: `Guild Ticket Type:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.type`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply} \`${await db.get(`guild_${interaction.guild.id}.ticket.type`)}\`` : `${client.emotes.reply} \`Reason - Menu - UserTag\` (Default)`}`, inline: false }, { name: `Guild Admin Role:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.admin_role`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply}<@&${await db.get(`guild_${interaction.guild.id}.ticket.admin_role`)}>` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }, { name: `Guild Mod Log:`, value: `${await db.has(`guild_${interaction.guild.id}.modlog`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply} <#${await db.get(`guild_${interaction.guild.id}.modlog`)}>` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }, { name: `Guild Parent Channel:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.category`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply} <#${await db.get(`guild_${interaction.guild.id}.ticket.category`)}>` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }, { name: `Guild Ticket Menu Option:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.menu_option`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply}${(await db.get(`guild_${interaction.guild.id}.ticket.menu_option`)).map(o => `**Name:** \`${o.value}\` | **Emoji:** ${o.emoji ? o.emoji : "none"}`).join(`\n${client.emotes.reply}`)}` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }]).setFooter({ text: `Setting • Requested By ${m.user.tag} `, iconURL: m.user.displayAvatarURL({ dynamic: true }) }).setThumbnail(m.guild.iconURL({ dynamic: true })).setTimestamp()], + embeds: [new EmbedBuilder().setTitle(`${client.emotes.setting}| Welcome to the setting`).setColor(client.colors.none).setDescription(`This is __${client.user.username}__ setting from **${interaction.guild.name}** and you can setup all things you need for setting up your guild.`).addFields([{ name: `Bot Language:`, value: `${client.emotes.reply} ${client.emotes[lang]}|${client.findlang[lang]}`, inline: false }, { name: `Guild Ticket Type:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.type`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply} \`${await db.get(`guild_${interaction.guild.id}.ticket.type`)}\`` : `${client.emotes.reply} \`Reason - Menu - UserTag\` (Default)`}`, inline: false }, { name: `Guild Admin Role:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.admin_role`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply}<@&${await db.get(`guild_${interaction.guild.id}.ticket.admin_role`)}>` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }, { name: `Guild Mod Log:`, value: `${await db.has(`guild_${interaction.guild.id}.modlog`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply} <#${await db.get(`guild_${interaction.guild.id}.modlog`)}>` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }, { name: `Guild Parent Channel:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.category`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply} <#${await db.get(`guild_${interaction.guild.id}.ticket.category`)}>` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }, { name: `Guild Ticket Menu Option:`, value: `${await db.has(`guild_${interaction.guild.id}.ticket.menu_option`) ? `${client.emotes.reply} Enable ${client.emotes.enable1}${client.emotes.enable2}\n${client.emotes.reply}${(await db.get(`guild_${interaction.guild.id}.ticket.menu_option`)).map(o => `**Name:** \`${o.value}\` | **Emoji:** ${o.emoji ? o.emoji : "none"}`).join(`\n${client.emotes.reply}`)}` : `${client.emotes.reply} Disabled ${client.emotes.disable1}${client.emotes.disable2}`}`, inline: false }]).setFooter({ text: `Setting • Requested By ${m.user.tag} `, iconURL: m.user.displayAvatarURL({ dynamic: true }) }).setThumbnail(m.guild.iconURL({ dynamic: true })).setTimestamp()], components: [new ActionRowBuilder().addComponents(menu), new ActionRowBuilder().addComponents(new ButtonBuilder().setStyle(ButtonStyle.Secondary).setLabel('Report').setEmoji(client.emotes.report).setCustomId(`report`), new ButtonBuilder().setStyle(ButtonStyle.Link).setLabel('Support').setEmoji(client.emotes.help).setURL(`${client.config.discord.server_support}`)), new ActionRowBuilder().addComponents(new ButtonBuilder().setStyle(ButtonStyle.Success).setLabel('Home Page').setEmoji(client.emotes.home).setCustomId("home_page").setDisabled(true))], }) } @@ -123,6 +122,12 @@ module.exports = { } if (m.isStringSelectMenu()) { if (m.customId === "setup_menu") { + if (m.values[0] === "stlanguage") { + m.update({ + embeds: [new EmbedBuilder().setTitle(`${client.emotes.system}| Bot Language Setting`).setColor(client.colors.none).setDescription(`please select some languages you need to add on bot **language** on menu below.`).setFooter({ text: `Setting • Requested By ${m.user.tag} `, iconURL: m.user.displayAvatarURL({ dynamic: true }) }).setThumbnail(m.guild.iconURL({ dynamic: true }))], + components: [new ActionRowBuilder().addComponents(new StringSelectMenuBuilder().setDisabled(true).setMaxValues(1).setMinValues(1).setPlaceholder(`In soon!!`).setCustomId(`bot_language`).addOptions([{ label: "English (en-US)", value: "en-US", emoji: client.emotes["en-US"] }])), new ActionRowBuilder().addComponents(new ButtonBuilder().setStyle(ButtonStyle.Secondary).setLabel('Report').setEmoji(client.emotes.report).setCustomId(`report`), new ButtonBuilder().setStyle(ButtonStyle.Link).setLabel('Support').setEmoji(client.emotes.help).setURL(`${client.config.discord.server_support}`)), new ActionRowBuilder().addComponents(new ButtonBuilder().setStyle(ButtonStyle.Success).setLabel('Home Page').setEmoji(client.emotes.home).setCustomId("home_page").setDisabled(false))] + }) + } if (m.values[0] === "stadmin") { m.update({ embeds: [new EmbedBuilder().setTitle(`${client.emotes.system}| Admin Role Setting`).setColor(client.colors.none).setDescription(`please select role you need to add on bot **admin role** on menu below.`).setFooter({ text: `Setting • Requested By ${m.user.tag} `, iconURL: m.user.displayAvatarURL({ dynamic: true }) }).setThumbnail(m.guild.iconURL({ dynamic: true }))], @@ -193,24 +198,24 @@ module.exports = { return errorMessage(client, m, `This message only for ${interaction.user} and you can't use it.`) } }) - client.on("interactionCreate",async(m)=>{ + await interaction.awaitModalSubmit({ time: time }).then(async(m)=>{ try{ - if(!m.user.id === interaction.user.id) return errorMessage(client, m, `This message only for ${interaction.user} and you can't use it.`) + if(!m.user.id === interaction.user.id) return errorMessage(client, m, `This message only for ${m.user} and you can't use it.`) if(m.isModalSubmit()){ - if(m.customId === "menu_option_modal") { - const name = interaction.fields.getTextInputValue('name'); - const emoji = interaction.fields.getTextInputValue('emoji'); - if (emoji) await db.push(`guild_${interaction.guild.id}.ticket.menu_option`, { + if(m.customId === "menu_option_modal"){ + const name = m.fields.getTextInputValue('name'); + const emoji = m.fields.getTextInputValue('emoji'); + if (emoji) await db.push(`guild_${m.guild.id}.ticket.menu_option`, { label: name, value: name, emoji: emoji }) - else await db.push(`guild_${interaction.guild.id}.ticket.menu_option`, { + else await db.push(`guild_${m.guild.id}.ticket.menu_option`, { label: name, value: name }) - interaction.update({ - embeds: [new EmbedBuilder().setTitle(`${client.emotes.system}| Menu Option Setuped`).setColor(client.colors.none).setDescription(`guild **menu option** successfully setuped.\n**Name:** \`${name}\` | **Emoji:** ${emoji ? `${emoji}` : "none"}.`).setFooter({ text: `Setting • Requested By ${interaction.user.tag} `, iconURL: interaction.user.displayAvatarURL({ dynamic: true }) }).setThumbnail(interaction.guild.iconURL({ dynamic: true }))], + m.update({ + embeds: [new EmbedBuilder().setTitle(`${client.emotes.system}| Menu Option Setuped`).setColor(client.colors.none).setDescription(`guild **menu option** successfully setuped.\n**Name:** \`${name}\` | **Emoji:** ${emoji ? `${emoji}` : "none"}.`).setFooter({ text: `Setting • Requested By ${m.user.tag} `, iconURL: m.user.displayAvatarURL({ dynamic: true }) }).setThumbnail(m.guild.iconURL({ dynamic: true }))], components: [new ActionRowBuilder().addComponents(new ButtonBuilder().setStyle(ButtonStyle.Primary).setLabel('Menu Option Enabel').setEmoji(client.emotes.option).setCustomId(`menu_option`).setDisabled(true)), new ActionRowBuilder().addComponents(new ButtonBuilder().setStyle(ButtonStyle.Secondary).setLabel('Report').setEmoji(client.emotes.report).setCustomId(`report`), new ButtonBuilder().setStyle(ButtonStyle.Link).setLabel('Support').setEmoji(client.emotes.help).setURL(`${client.config.discord.server_support}`)), new ActionRowBuilder().addComponents(new ButtonBuilder().setStyle(ButtonStyle.Danger).setLabel('Remove Menu Option').setEmoji(client.emotes.trash).setCustomId("remove_menu_option"), new ButtonBuilder().setStyle(ButtonStyle.Success).setLabel('Home Page').setEmoji(client.emotes.home).setCustomId("home_page").setDisabled(false))] }) } @@ -219,12 +224,12 @@ module.exports = { errorMessage(client, m, `\`\`\`js\n${e}\n\`\`\``) } }) - setTimeout(() => { - msg.edit({ + }) + setTimeout(() => { + interaction.editReply({ components: [new ActionRowBuilder().addComponents(new ButtonBuilder().setCustomId('timeout').setEmoji(client.emotes.alert).setLabel('Time Is Up').setStyle(ButtonStyle.Primary).setDisabled(true)).addComponents(new ButtonBuilder().setStyle(ButtonStyle.Secondary).setLabel('Report').setEmoji(client.emotes.report).setCustomId(`report`), new ButtonBuilder().setStyle(ButtonStyle.Link).setLabel('Support').setEmoji(client.emotes.help).setURL(`${client.config.discord.server_support}`))] }) - }, 60 * 1000) - }) + }, time) } catch (e) { console.error(e) errorMessage(client, interaction, `\`\`\`js\n${e}\`\`\``) diff --git "a/commands/Ticket \360\237\216\253/ticket.js" "b/commands/Ticket \360\237\216\253/ticket.js" index 93b687f..8a48abe 100644 --- "a/commands/Ticket \360\237\216\253/ticket.js" +++ "b/commands/Ticket \360\237\216\253/ticket.js" @@ -9,6 +9,7 @@ const { TextInputStyle, ButtonStyle, ChannelType, + ComponentType, ApplicationCommandType, ApplicationCommandOptionType } = require('discord.js'); @@ -260,8 +261,9 @@ module.exports = { components: [new ActionRowBuilder().addComponents(new ButtonBuilder().setCustomId('ticket_default').setEmoji(client.emotes.system).setLabel("Setup Ticket To Default").setStyle(ButtonStyle.Primary), new ButtonBuilder().setCustomId('ticket_setup_custom').setEmoji(client.emotes.hamer).setLabel("Setup Ticket To Customize").setStyle(ButtonStyle.Success)), new ActionRowBuilder().addComponents([new ButtonBuilder().setStyle(ButtonStyle.Link).setEmoji(client.emotes.help).setLabel("Support").setURL(client.config.discord.server_support)])], fetchReply: true }).then(async(msg)=>{ - let collector = await msg.createMessageComponentCollector({ time: 120000 }) - collector.on('collect', async (collect)=>{ + let time = 120000; + await msg.createMessageComponentCollector({ time: time }).on('collect', async (collect)=>{ + if(!collect.guild.id === interaction.guild.id) return; if(!collect.user.id === interaction.user.id){ return errorMessage(client, collect, `**${client.emotes.error}| This component only for ${interaction.user} and you can't use it.\nuse "\` c.name === "ticket").id}>\`" for setup the ticket system**`) } @@ -292,8 +294,11 @@ module.exports = { }) } } - }) - client.on('interactionCreate', async (collect)=>{ + }) + await interaction.awaitModalSubmit({ time: time }).then(async(collect)=>{ + try{ + if(!collect.guild.id === interaction.guild.id) return; + if(!collect.user.id === interaction.user.id) return errorMessage(client, collect, `This message only for ${collect.user} and you can't use it.`) if(collect.isModalSubmit()){ if(collect.customId === 'ticket_modal'){ let title = collect.fields.getTextInputValue('ticket_title') @@ -303,21 +308,10 @@ module.exports = { let button_emoji = collect.fields.getTextInputValue('ticket_button_emoji') let embed = new EmbedBuilder() let button = new ButtonBuilder().setCustomId('create_ticket').setStyle(ButtonStyle.Success) - if(button_name){ - button.setLabel(`${button_name}`) - }else{ - button.setLabel("Create Ticket") - } - if(button_emoji){ - button.setEmoji(`${button_emoji}`) - }else{ - button.setEmoji(client.emotes.ticket) - } - if(color){ - embed.setColor(`${color}`) - }else{ - embed.setColor(client.colors.none) - } + button.setLabel(`${button_name? button_name : "Create Ticket"}`) + button.setEmoji(`${button_emoji? button_emoji : client.emotes.ticket}`) + embed.setColor(`${color? color : client.colors.none}`) + if(description){ embed.setDescription(description) } @@ -334,12 +328,16 @@ module.exports = { }) } } + + }catch(e){ + //errorMessage(client, collect, `\`\`\`js\n${e}\n\`\`\``) + } }) - collector.on('end', (collect)=>{ + setTimeout(()=>{ interaction.editReply({ components: [new ActionRowBuilder().addComponents(new ButtonBuilder().setCustomId('timeout').setEmoji(client.emotes.alert).setLabel('Time Is Up').setStyle(ButtonStyle.Primary).setDisabled(true)).addComponents(new ButtonBuilder().setStyle(ButtonStyle.Secondary).setLabel('Report').setEmoji(client.emotes.report).setCustomId(`report`), new ButtonBuilder().setStyle(ButtonStyle.Link).setLabel('Support').setEmoji(client.emotes.help).setURL(`${client.config.discord.server_support}`))] }) - }) + }, time) }) }break; } diff --git a/events/interaction/interactionCreate.js b/events/interaction/interactionCreate.js index 608ca83..ce86a10 100644 --- a/events/interaction/interactionCreate.js +++ b/events/interaction/interactionCreate.js @@ -16,7 +16,7 @@ const clc = require("cli-color"); module.exports = async (client, interaction) => { try { let db = client.db; - let prefix = await db.has(`guild_${interaction.guild.id}.prefix`)? db.get(`guild_${interaction.guild.id}.prefix`) : client.prefix; + let lang = await db.has(`guild_${interaction.guild.id}.language`)? await db.get(`guild_${interaction.guild.id}.language`) : "en-US"; if(!interaction.channel.permissionsFor(interaction.guild.members.me).has([PermissionsBitField.Flags.SendMessages])) return interaction.user.send({ content: `${client.emotes.off}| I am missing the Permission to \`SendMessages\` in ${interaction.channel}`, ephemeral: true }) if(!interaction.channel.permissionsFor(interaction.guild.members.me).has([PermissionsBitField.Flags.UseExternalEmojis])) return interaction.reply({ content: `${client.emotes.off}| I am missing the Permission to \`UseExternalEmojis\` in ${interaction.channel}`, ephemeral: true }) @@ -75,14 +75,14 @@ module.exports = async (client, interaction) => { setTimeout(() => timestamps.delete(interaction.user.id), cooldownAmount); //======== Slash Command Handler ======== - command.run(client, interaction, args, prefix); + command.run(client, interaction, args, lang); } else { return; } } if(interaction.isUserContextMenuCommand()){ const command = client.Commands.get(interaction.commandName); - if(command) command.run(client, interaction, prefix); + if(command) command.run(client, interaction, lang); } }catch(e){ console.log(e) diff --git a/events/modal/interactionCreate.js b/events/modal/interactionCreate.js index 9f614ee..4d19834 100644 --- a/events/modal/interactionCreate.js +++ b/events/modal/interactionCreate.js @@ -10,45 +10,50 @@ const { } = require(`${process.cwd()}/functions/functions`); module.exports = async (client, interaction) => { try{ -if (!interaction.isModalSubmit()) return; - if(interaction.customId === "reporting"){ + if (!interaction.isModalSubmit()) return; + if(interaction.customId === "reporting"){ let choice = interaction.fields.getTextInputValue('report'); let guild = client.guilds.cache.get(client.config.discord.server_id); let channel = guild.channels.cache.get(client.config.discord.server_channel_report); + if([" ", " "].includes(choice)) return errorMessage(client, interaction, `please write full content for reporting.`) + let invite = await interaction.channel.createInvite({ maxAge: 0, maxUses: 5 - }) - const report = new EmbedBuilder() + }) + const embed = new EmbedBuilder() .setAuthor({ name:`${interaction.user.tag}`, iconURL:interaction.user.displayAvatarURL({ dynamic: true }) }) .setTimestamp() - .setTitle(`This Guy Have a Report, User ID: "${interaction.user.id}"`) + .setTitle(`Report Message From \`${interaction.guild.name}\``) .setColor(client.colors.none) - .addFields([{ - name: `> **User :**`, - value: `${client.emotes.reply}${interaction.user}`, - inline: true + .addFields([{ + name: `${client.emotes.reply} **Guild:**`, + value: `**${interaction.guild.name} | ${interaction.guild.id} | ${invite.url? invite.url : "Cant' create invite :("}**`, + inline: false + },{ + name: `${client.emotes.reply} **User:**`, + value: `**${interaction.user} | ${interaction.user.tag} | ${interaction.user.id}**`, + inline: false + },{ + name: `${client.emotes.reply} **Date:**`, + value: `** | **`, + inline: false },{ - name: `> **Send :**`, - value: `${client.emotes.reply}${choice}`, - inline: true - },{ - name: `> **Server :**`, - value: `${client.emotes.reply}${invite.url}`, - inline: true + name: `${client.emotes.reply} **Message:**`, + value: `${choice}`, + inline: false }]) - .setURL(invite.url) .setThumbnail(interaction.guild.iconURL({ dynamic: true })) - .setFooter({ text:`${interaction.guild.name}`, iconURL: client.user.displayAvatarURL({ dynamic: true }) }) - channel.send({ - content: `${interaction.user}`, - embeds: [report] + + + await channel.send({ + embeds: [embed] }).then((msg)=> { msg.react(client.emotes.report) }) - interaction.reply({ + await interaction.reply({ ephemeral: true, - embeds: [new EmbedBuilder().setTimestamp().setTitle(`${client.emotes.success}| Successfully Sent`).setDescription(`\`\`\`js\nSuccessfuly your report or bug message send to My Developers ${client.emotes.hurt} \`\`\`**thank's for sending your message to us.\nFor helping you my develpoers or admins send a \`Friend-Request\` for you or just join to server and fix your problem. :)**`)], + embeds: [new EmbedBuilder().setColor(client.colors.none).setTimestamp().setTitle(`${client.emotes.success}| Successfully Sent`).setDescription(`\`\`\`js\nSuccessfuly your report or bug message send to My Developers ${client.emotes.hurt} \`\`\`**thank's for sending your message to us.\nFor helping you my develpoers or admins send a \`Friend-Request\` for you or just join to server and fix your problem. :)**`)], }) } }catch(e){ diff --git a/events/ready/ready.js b/events/ready/ready.js index 25860da..4fd0a0e 100644 --- a/events/ready/ready.js +++ b/events/ready/ready.js @@ -14,7 +14,7 @@ module.exports = async (client) => { }else{ Guilds = Guilds; } - let Presence = [ "dnd", "idle", "online" ]; //can be: online | dnd | idle | offline + let Presence = [ "dnd", "idle" ]; //can be: online | dnd | idle | offline let PresencePower = Presence[Math.floor(Math.random() * Presence.length)] let Activity = [ `/help`, @@ -23,7 +23,7 @@ module.exports = async (client) => { `${totalUsers} Users` ]; let ActivityPower = `${Activity[Math.floor(Math.random() * Activity.length)]} | Ticker Boy`; - let Display = [ Discord.ActivityType.Watching ]; //can be: Discord.ActivityType.Competing = 5 or Discord.ActivityType.Custom = 4 or Discord.ActivityType.Listening = 2 or Discord.ActivityType.Playing = 0 or Discord.ActivityType.Streaming = 1 or Discord.ActivityType.Watching = 3 + let Display = [ 1, 3 ]; //can be: Discord.ActivityType.Competing = 5 or Discord.ActivityType.Custom = 4 or Discord.ActivityType.Listening = 2 or Discord.ActivityType.Playing = 0 or Discord.ActivityType.Streaming = 1 or Discord.ActivityType.Watching = 3 let DisplayPower = Display[Math.floor(Math.random() * Display.length)]; let URL = [ `https://www.twitch.tv/sobhan_srza` ]; let URLPower = URL[Math.floor(Math.random() * URL.length)]; diff --git a/example.env b/example.env index b2d7251..205b63f 100644 --- a/example.env +++ b/example.env @@ -1,4 +1,3 @@ PREFIX="PLACE_BOT_PREFIX" CLIENT_ID="USER_CLIENT_ID" -USER_SECRET_ID="USER_SECRET_CLIENT_ID" TOKEN="PLACE_BOT_TOKEN" \ No newline at end of file diff --git a/index.js b/index.js index 2524a87..cd582c1 100644 --- a/index.js +++ b/index.js @@ -22,7 +22,7 @@ const client = new Client({ ws:{ properties: { browser: "Discord Android",//Discord Web | Discord Android | Discord Ios | Discord Client - os: "Android"//Other | Android | iOS | TempleOS | Linux | Mac OS X | Windows + os: "Linux"//Other | Android | iOS | TempleOS | Linux | Mac OS X | Windows }, }, }); @@ -33,23 +33,24 @@ client.token = client.config.discord.token; client.emotes = require(`${process.cwd()}/storage/emotes.json`); client.colors = require(`${process.cwd()}/storage/colors.json`); client.embed = require(`${process.cwd()}/storage/embed.json`); +client.findlang = require(`${process.cwd()}/storage/languages.json`); client.categories = fs.readdirSync(`${process.cwd()}/commands`); client.commands = new Collection(); client.cooldowns = new Collection(); //======== Loading Starts ========= var starts = fs.readdirSync(`${process.cwd()}/start`).filter(file => file.endsWith('.js')); -let start = new Map(); +let counter = 0; starts.forEach((file) => { require(`${process.cwd()}/start/${file}`)(client); - start.set(file); + counter += 1; }); try { const stringlength = 69; console.log("\n") console.log(clc.yellowBright(` ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓`)) console.log(clc.yellowBright(` ┃ `) + " ".repeat(-1 + stringlength - ` ┃ `.length) + clc.yellowBright("┃")) - console.log(clc.yellowBright(` ┃ `) + clc.greenBright(` ${clc.magentaBright(start.size)} Starts Is Loaded!!`) + " ".repeat(-1 + stringlength - ` ┃ `.length - ` ${start.size} Starts Is Loaded!!`.length) + clc.yellowBright("┃")) + console.log(clc.yellowBright(` ┃ `) + clc.greenBright(` ${clc.magentaBright(counter)} Starts Is Loaded!!`) + " ".repeat(-1 + stringlength - ` ┃ `.length - ` ${counter} Starts Is Loaded!!`.length) + clc.yellowBright("┃")) console.log(clc.yellowBright(` ┃ `) + " ".repeat(-1 + stringlength - ` ┃ `.length) + clc.yellowBright("┃")) console.log(clc.yellowBright(` ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛`)) console.log("\n") diff --git a/package-lock.json b/package-lock.json index c2f5bcb..3975b14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,31 +1,22 @@ { "name": "ticker-boy", - "version": "1.3.0", + "version": "1.3.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ticker-boy", - "version": "1.3.0", + "version": "1.3.1", "license": "BSD", "dependencies": { "better-sqlite3": "^8.0.1", - "body-parser": "^1.20.1", "cli-color": "^2.0.2", - "cpu-stat": "^2.0.1", "discord-html-transcripts": "^3.1.3", "discord.js": "^14.7.1", "dotenv": "^16.0.1", - "ejs": "^3.1.8", "express": "^4.18.1", - "express-session": "^1.17.3", "fs": "^0.0.1-security", - "memorystore": "^1.6.7", "moment": "^2.29.4", - "ms": "^2.1.3", - "os": "^0.1.2", - "passport": "^0.6.0", - "passport-discord": "^0.1.4", "quick.db": "^9.0.8" } }, @@ -202,35 +193,11 @@ "node": ">= 0.6" } }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, - "node_modules/async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -250,14 +217,6 @@ } ] }, - "node_modules/base64url": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", - "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/better-sqlite3": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-8.0.1.tgz", @@ -286,52 +245,6 @@ "readable-stream": "^3.4.0" } }, - "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -395,21 +308,6 @@ "upper-case": "^1.1.1" } }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", @@ -449,32 +347,11 @@ "node": ">=6" } }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -507,11 +384,6 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, - "node_modules/cpu-stat": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/cpu-stat/-/cpu-stat-2.0.1.tgz", - "integrity": "sha512-bC4ts/0IjYfNV6Dc7F2NauWM0tip0fneZjRek8HqX2ZERC4oSt6dmV+GTN1mfE9OKbLAppv58M2PVzKLGB731w==" - }, "node_modules/csstype": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", @@ -653,20 +525,6 @@ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, - "node_modules/ejs": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.8.tgz", - "integrity": "sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==", - "dependencies": { - "jake": "^10.8.5" - }, - "bin": { - "ejs": "bin/cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -798,32 +656,6 @@ "node": ">= 0.10.0" } }, - "node_modules/express-session": { - "version": "1.17.3", - "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.17.3.tgz", - "integrity": "sha512-4+otWXlShYlG1Ma+2Jnn+xgKUZTMJ5QD3YvfilX3AcocOAbIkVylSWEklzALe/+Pu4qV6TYBj5GwOBFfdKqLBw==", - "dependencies": { - "cookie": "0.4.2", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~2.0.0", - "on-headers": "~1.0.2", - "parseurl": "~1.3.3", - "safe-buffer": "5.2.1", - "uid-safe": "~2.1.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/express-session/node_modules/cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/express/node_modules/body-parser": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", @@ -886,33 +718,6 @@ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" }, - "node_modules/filelist": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", - "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "dependencies": { - "minimatch": "^5.0.1" - } - }, - "node_modules/filelist/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/finalhandler": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", @@ -1016,14 +821,6 @@ "node": ">= 0.4.0" } }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -1144,23 +941,6 @@ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" }, - "node_modules/jake": { - "version": "10.8.5", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.5.tgz", - "integrity": "sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==", - "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.1", - "minimatch": "^3.0.4" - }, - "bin": { - "jake": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -1203,15 +983,6 @@ "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", "integrity": "sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==" }, - "node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, "node_modules/lru-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", @@ -1243,39 +1014,6 @@ "timers-ext": "^0.1.7" } }, - "node_modules/memorystore": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/memorystore/-/memorystore-1.6.7.tgz", - "integrity": "sha512-OZnmNY/NDrKohPQ+hxp0muBcBKrzKNtHr55DbqSx9hLsYVNnomSAMRAtI7R64t3gf3ID7tHQA7mG4oL3Hu9hdw==", - "dependencies": { - "debug": "^4.3.0", - "lru-cache": "^4.0.3" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/memorystore/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/memorystore/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -1330,17 +1068,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/minimist": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", @@ -1404,11 +1131,6 @@ "node": ">=10" } }, - "node_modules/oauth": { - "version": "0.9.15", - "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", - "integrity": "sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA==" - }, "node_modules/object-inspect": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", @@ -1428,14 +1150,6 @@ "node": ">= 0.8" } }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1444,11 +1158,6 @@ "wrappy": "1" } }, - "node_modules/os": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/os/-/os-0.1.2.tgz", - "integrity": "sha512-ZoXJkvAnljwvc56MbvhtKVWmSkzV712k42Is2mA0+0KTSRakq5XXuXpjZjgAt9ctzl51ojhQWakQQpmOvXWfjQ==" - }, "node_modules/param-case": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", @@ -1465,68 +1174,11 @@ "node": ">= 0.8" } }, - "node_modules/passport": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/passport/-/passport-0.6.0.tgz", - "integrity": "sha512-0fe+p3ZnrWRW74fe8+SvCyf4a3Pb2/h7gFkQ8yTJpAO50gDzlfjZUZTO1k5Eg9kUct22OxHLqDZoKUWRHOh9ug==", - "dependencies": { - "passport-strategy": "1.x.x", - "pause": "0.0.1", - "utils-merge": "^1.0.1" - }, - "engines": { - "node": ">= 0.4.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jaredhanson" - } - }, - "node_modules/passport-discord": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/passport-discord/-/passport-discord-0.1.4.tgz", - "integrity": "sha512-VJWPYqSOmh7SaCLw/C+k1ZqCzJnn2frrmQRx1YrcPJ3MQ+Oa31XclbbmqFICSvl8xv3Fqd6YWQ4H4p1MpIN9rA==", - "dependencies": { - "passport-oauth2": "^1.5.0" - } - }, - "node_modules/passport-oauth2": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.6.1.tgz", - "integrity": "sha512-ZbV43Hq9d/SBSYQ22GOiglFsjsD1YY/qdiptA+8ej+9C1dL1TVB+mBE5kDH/D4AJo50+2i8f4bx0vg4/yDDZCQ==", - "dependencies": { - "base64url": "3.x.x", - "oauth": "0.9.x", - "passport-strategy": "1.x.x", - "uid2": "0.0.x", - "utils-merge": "1.x.x" - }, - "engines": { - "node": ">= 0.4.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jaredhanson" - } - }, - "node_modules/passport-strategy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", - "integrity": "sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA==", - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, - "node_modules/pause": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", - "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==" - }, "node_modules/peek-readable": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", @@ -1576,11 +1228,6 @@ "node": ">= 0.10" } }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==" - }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -1612,14 +1259,6 @@ "lodash": "^4.17.21" } }, - "node_modules/random-bytes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", - "integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -1939,17 +1578,6 @@ "url": "https://github.com/sponsors/Borewit" } }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/tar-fs": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", @@ -2074,22 +1702,6 @@ "node": ">=0.8.0" } }, - "node_modules/uid-safe": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", - "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", - "dependencies": { - "random-bytes": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/uid2": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.4.tgz", - "integrity": "sha512-IevTus0SbGwQzYh3+fRsAMTVVPOoIVufzacXcHPmdlle1jUpq7BRL+mw3dgeLanvGZdwwbWhRV6XrcFNdBmjWA==" - }, "node_modules/undici": { "version": "5.16.0", "resolved": "https://registry.npmjs.org/undici/-/undici-5.16.0.tgz", @@ -2167,11 +1779,6 @@ "optional": true } } - }, - "node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==" } }, "dependencies": { @@ -2304,39 +1911,16 @@ "negotiator": "0.6.3" } }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, - "async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, - "base64url": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", - "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" - }, "better-sqlite3": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-8.0.1.tgz", @@ -2364,44 +1948,6 @@ "readable-stream": "^3.4.0" } }, - "body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", - "requires": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "dependencies": { - "qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "requires": { - "side-channel": "^1.0.4" - } - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -2442,15 +1988,6 @@ "upper-case": "^1.1.1" } }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, "chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", @@ -2481,29 +2018,11 @@ "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==" }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, "content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -2527,11 +2046,6 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, - "cpu-stat": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/cpu-stat/-/cpu-stat-2.0.1.tgz", - "integrity": "sha512-bC4ts/0IjYfNV6Dc7F2NauWM0tip0fneZjRek8HqX2ZERC4oSt6dmV+GTN1mfE9OKbLAppv58M2PVzKLGB731w==" - }, "csstype": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", @@ -2647,14 +2161,6 @@ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, - "ejs": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.8.tgz", - "integrity": "sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==", - "requires": { - "jake": "^10.8.5" - } - }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -2791,28 +2297,6 @@ } } }, - "express-session": { - "version": "1.17.3", - "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.17.3.tgz", - "integrity": "sha512-4+otWXlShYlG1Ma+2Jnn+xgKUZTMJ5QD3YvfilX3AcocOAbIkVylSWEklzALe/+Pu4qV6TYBj5GwOBFfdKqLBw==", - "requires": { - "cookie": "0.4.2", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~2.0.0", - "on-headers": "~1.0.2", - "parseurl": "~1.3.3", - "safe-buffer": "5.2.1", - "uid-safe": "~2.1.5" - }, - "dependencies": { - "cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==" - } - } - }, "ext": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", @@ -2848,32 +2332,6 @@ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" }, - "filelist": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", - "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "requires": { - "minimatch": "^5.0.1" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "requires": { - "brace-expansion": "^2.0.1" - } - } - } - }, "finalhandler": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", @@ -2961,11 +2419,6 @@ "function-bind": "^1.1.1" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -3045,17 +2498,6 @@ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" }, - "jake": { - "version": "10.8.5", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.5.tgz", - "integrity": "sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==", - "requires": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.1", - "minimatch": "^3.0.4" - } - }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3093,15 +2535,6 @@ "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", "integrity": "sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==" }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, "lru-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", @@ -3130,30 +2563,6 @@ "timers-ext": "^0.1.7" } }, - "memorystore": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/memorystore/-/memorystore-1.6.7.tgz", - "integrity": "sha512-OZnmNY/NDrKohPQ+hxp0muBcBKrzKNtHr55DbqSx9hLsYVNnomSAMRAtI7R64t3gf3ID7tHQA7mG4oL3Hu9hdw==", - "requires": { - "debug": "^4.3.0", - "lru-cache": "^4.0.3" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -3187,14 +2596,6 @@ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==" }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, "minimist": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", @@ -3246,11 +2647,6 @@ "semver": "^7.3.5" } }, - "oauth": { - "version": "0.9.15", - "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", - "integrity": "sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA==" - }, "object-inspect": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", @@ -3264,11 +2660,6 @@ "ee-first": "1.1.1" } }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -3277,11 +2668,6 @@ "wrappy": "1" } }, - "os": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/os/-/os-0.1.2.tgz", - "integrity": "sha512-ZoXJkvAnljwvc56MbvhtKVWmSkzV712k42Is2mA0+0KTSRakq5XXuXpjZjgAt9ctzl51ojhQWakQQpmOvXWfjQ==" - }, "param-case": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", @@ -3295,51 +2681,11 @@ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, - "passport": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/passport/-/passport-0.6.0.tgz", - "integrity": "sha512-0fe+p3ZnrWRW74fe8+SvCyf4a3Pb2/h7gFkQ8yTJpAO50gDzlfjZUZTO1k5Eg9kUct22OxHLqDZoKUWRHOh9ug==", - "requires": { - "passport-strategy": "1.x.x", - "pause": "0.0.1", - "utils-merge": "^1.0.1" - } - }, - "passport-discord": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/passport-discord/-/passport-discord-0.1.4.tgz", - "integrity": "sha512-VJWPYqSOmh7SaCLw/C+k1ZqCzJnn2frrmQRx1YrcPJ3MQ+Oa31XclbbmqFICSvl8xv3Fqd6YWQ4H4p1MpIN9rA==", - "requires": { - "passport-oauth2": "^1.5.0" - } - }, - "passport-oauth2": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.6.1.tgz", - "integrity": "sha512-ZbV43Hq9d/SBSYQ22GOiglFsjsD1YY/qdiptA+8ej+9C1dL1TVB+mBE5kDH/D4AJo50+2i8f4bx0vg4/yDDZCQ==", - "requires": { - "base64url": "3.x.x", - "oauth": "0.9.x", - "passport-strategy": "1.x.x", - "uid2": "0.0.x", - "utils-merge": "1.x.x" - } - }, - "passport-strategy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", - "integrity": "sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA==" - }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, - "pause": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", - "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==" - }, "peek-readable": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", @@ -3373,11 +2719,6 @@ "ipaddr.js": "1.9.1" } }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==" - }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -3403,11 +2744,6 @@ "lodash": "^4.17.21" } }, - "random-bytes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", - "integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==" - }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -3622,14 +2958,6 @@ "peek-readable": "^5.0.0" } }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - }, "tar-fs": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", @@ -3729,19 +3057,6 @@ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==" }, - "uid-safe": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", - "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", - "requires": { - "random-bytes": "~1.0.0" - } - }, - "uid2": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.4.tgz", - "integrity": "sha512-IevTus0SbGwQzYh3+fRsAMTVVPOoIVufzacXcHPmdlle1jUpq7BRL+mw3dgeLanvGZdwwbWhRV6XrcFNdBmjWA==" - }, "undici": { "version": "5.16.0", "resolved": "https://registry.npmjs.org/undici/-/undici-5.16.0.tgz", @@ -3790,11 +3105,6 @@ "resolved": "https://registry.npmjs.org/ws/-/ws-8.12.0.tgz", "integrity": "sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig==", "requires": {} - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==" } } } diff --git a/package.json b/package.json index c3142a8..80dac83 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "name": "ticker-boy", "main": "index.js", "author": "Mr.SIN RE#1528 | Persian Caesar", - "version": "1.3.0", - "description": "this is wonderful ticket bot with slash commands & buttons. | Build by Persian Caesar", + "version": "1.3.1", + "description": "this is wonderful ticket bot with perfect handlering and had perfect tools.", "license": "BSD", "repository": { "type": "git", @@ -29,22 +29,13 @@ }, "dependencies": { "better-sqlite3": "^8.0.1", - "body-parser": "^1.20.1", "cli-color": "^2.0.2", - "cpu-stat": "^2.0.1", "discord-html-transcripts": "^3.1.3", "discord.js": "^14.7.1", "dotenv": "^16.0.1", - "ejs": "^3.1.8", "express": "^4.18.1", - "express-session": "^1.17.3", "fs": "^0.0.1-security", - "memorystore": "^1.6.7", "moment": "^2.29.4", - "ms": "^2.1.3", - "os": "^0.1.2", - "passport": "^0.6.0", - "passport-discord": "^0.1.4", "quick.db": "^9.0.8" } } diff --git a/start/1-events.js b/start/1-events.js index 040d31f..644aa9c 100644 --- a/start/1-events.js +++ b/start/1-events.js @@ -2,22 +2,16 @@ const fs = require('fs'); var clc = require("cli-color"); module.exports = async (bot) => { try{ - bot.events = new Map(); + let counter = 0; const stringlength = 69; fs.readdirSync(`${process.cwd()}/events`).forEach(dirs => { const events = fs.readdirSync(`${process.cwd()}/events/${dirs}`).filter(files => files.endsWith('.js')); for (const file of events) { const event = require(`${process.cwd()}/events/${dirs}/${file}`); - bot.events.set(event); + counter += 1; bot.on(file.split(".")[0], event.bind(null, bot)); }; }); - /*const events = fs.readdirSync(`${process.cwd()}/events`).filter(file => file.endsWith('.js')); - for (const file of events) { - const event = require(`${process.cwd()}/events/${file}`); - bot.events.set(event); - bot.on(file.split(".")[0], event.bind(null, bot)); - };*/ try { console.log("\n") console.log(clc.greenBright(` ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓`)) @@ -45,7 +39,7 @@ try { console.log("\n") console.log(clc.yellowBright(` ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓`)) console.log(clc.yellowBright(` ┃ `) + " ".repeat(-1 + stringlength - ` ┃ `.length) + clc.yellowBright("┃")) - console.log(clc.yellowBright(` ┃ `) + clc.greenBright(` ${clc.redBright(bot.events.size)} Events Is Loaded!!`) + " ".repeat(-1 + stringlength - ` ┃ `.length - ` ${bot.events.size} Events Is Loaded!!`.length) + clc.yellowBright("┃")) + console.log(clc.yellowBright(` ┃ `) + clc.greenBright(` ${clc.redBright(counter)} Events Is Loaded!!`) + " ".repeat(-1 + stringlength - ` ┃ `.length - ` ${counter} Events Is Loaded!!`.length) + clc.yellowBright("┃")) console.log(clc.yellowBright(` ┃ `) + " ".repeat(-1 + stringlength - ` ┃ `.length) + clc.yellowBright("┃")) console.log(clc.yellowBright(` ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛`)) console.log("\n") diff --git a/start/2-handlers.js b/start/2-handlers.js new file mode 100644 index 0000000..0baf225 --- /dev/null +++ b/start/2-handlers.js @@ -0,0 +1,31 @@ +const fs = require('fs'); +var clc = require("cli-color"); +module.exports = async (client) => { +//======== Loading Handlers ========= +var counter = 0; +Array ("slashCommandHandler.js", client.config.source.keep_alive ? "keepAlive.js" : null , "extraEvents.js" , client.config.source.anti_crash ? "antiCrash.js" : null) + .filter(Boolean) + .forEach((handler) => { + require(`${process.cwd()}/handlers/${handler}`)(client); + counter += 1; +}); +try { + const stringlength = 69; + console.log("\n") + console.log(clc.yellowBright(` ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓`)) + console.log(clc.yellowBright(` ┃ `) + " ".repeat(-1 + stringlength - ` ┃ `.length) + clc.yellowBright("┃")) + console.log(clc.yellowBright(` ┃ `) + clc.greenBright(` ${clc.magentaBright(counter)} Handlers Is Loaded!!`) + " ".repeat(-1 + stringlength - ` ┃ `.length - ` ${counter} Handlers Is Loaded!!`.length) + clc.yellowBright("┃")) + console.log(clc.yellowBright(` ┃ `) + " ".repeat(-1 + stringlength - ` ┃ `.length) + clc.yellowBright("┃")) + console.log(clc.yellowBright(` ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛`)) + console.log("\n") + } catch { /* */ } +} +/** + * @Info + * Bot Coded by Mr.SIN RE#1528 :) | https://dsc.gg/persian-caesar + * @Info + * Work for Persian Caesar | https://dsc.gg/persian-caesar + * @Info + * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! + * @Info + */ \ No newline at end of file diff --git a/storage/colors.json b/storage/colors.json index a364110..91269b0 100644 --- a/storage/colors.json +++ b/storage/colors.json @@ -1,5 +1,5 @@ { - "none": "#2F3136", + "none": "#2B2D31", "red": "#ff4d4d", "green": "#ddcc33", "uptime": "#51ff23", diff --git a/storage/config.js b/storage/config.js index def1bb9..9a0386c 100644 --- a/storage/config.js +++ b/storage/config.js @@ -43,4 +43,4 @@ module.exports = { * @Info * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! * @Info - */ + */ \ No newline at end of file diff --git a/storage/emotes.json b/storage/emotes.json index bf09386..2243f55 100644 --- a/storage/emotes.json +++ b/storage/emotes.json @@ -57,6 +57,8 @@ "ping": "🏓", "typing": "👩🏻‍💻", "learn": "🎓", + "language": "📚", + "en-US": "🇺🇸", "disable1": "<:disable_1:1063663071752638534>", "disable2": "<:disable_2:1063662987996569701>", "enable1": "<:enable_1:1063662460986470520>", diff --git a/storage/languages.json b/storage/languages.json new file mode 100644 index 0000000..19a0802 --- /dev/null +++ b/storage/languages.json @@ -0,0 +1,4 @@ +{ + "en-US": "English (Defualt)", + "per": "فارسی" +} \ No newline at end of file