nyx

The first CODM discrod bot -- cath.exe Template
git clone https://codeberg.org/night0721/nyx
Log | Files | Refs | LICENSE

commit 9abb74fa84e5d8e71cb77449f7d919bbf41bffea
parent f078cd030a0fc362241506f94f8083d9b4b63b80
Author: night0721 <[email protected]>
Date:   Sat, 18 Sep 2021 00:28:39 +0800

moved unused commands to unused dir & new v13 cmds

Diffstat:
M.env.example | 16+++++++++-------
A.gitattributes | 2++
M.gitignore | 3---
AREADME.md | 115+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mbot.js | 20++++++++++++++++----
Dcat/Path/fantastic.js | 13-------------
Dcat/Path/fight.js | 72------------------------------------------------------------------------
Dcat/Path/gae.js | 37-------------------------------------
Dcat/Path/gg.js | 26--------------------------
Dcat/Path/how.js | 25-------------------------
Dcat/Path/nab.js | 30------------------------------
Dcat/Path/pp.js | 20--------------------
Dcat/fantastic.js | 13-------------
Dcat/fight.js | 72------------------------------------------------------------------------
Dcat/gae.js | 37-------------------------------------
Dcat/gg.js | 26--------------------------
Dcat/how.js | 19-------------------
Dcat/nab.js | 30------------------------------
Dcat/pp.js | 22----------------------
Acommand/Economy/bet.js | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommand/Economy/inv.js | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommand/Economy/lb.js | 37+++++++++++++++++++++++++++++++++++++
Acommand/Economy/profile.js | 46++++++++++++++++++++++++++++++++++++++++++++++
Acommand/Economy/shop.js | 28++++++++++++++++++++++++++++
Acommand/Economy/slots.js | 95+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommand/Economy/work.js | 24++++++++++++++++++++++++
Mcommand/Fun/8ball.js | 6++----
Mcommand/Fun/cat.js | 43++++++++++++++++++-------------------------
Mcommand/Fun/dog.js | 43++++++++++++++++++-------------------------
Mcommand/Fun/drake.js | 4++--
Mcommand/Fun/ds.js | 4++--
Acommand/Fun/hangman.js | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mcommand/Fun/kiss.js | 2+-
Mcommand/Fun/meme.js | 43++++++++++++++++++-------------------------
Acommand/Fun/simprate.js | 34++++++++++++++++++++++++++++++++++
Mcommand/Information/botinfo.js | 5++---
Mcommand/Information/help.js | 6+++++-
Mcommand/Moderation/purge.js | 100+++++++++++++++++++++++++++++++++++++++++++++++--------------------------------
Acommand/Moderation/slowmode.js | 102+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mcommand/Owner/eval.js | 3++-
Mcommand/Owner/restart.js | 3++-
Mcommand/Utilities/docs.js | 13+++++++------
Acommand/Utilities/github.js | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommand/Utilities/rank.js | 303+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mcommand/Utilities/timer.js | 17++++++++++-------
Dcommands/Config/choices.js | 122-------------------------------------------------------------------------------
Dcommands/Config/modmail-category.js | 30------------------------------
Dcommands/Config/modmail-role.js | 27---------------------------
Mcommands/Config/prefix-reset.js | 13+++++++------
Dcommands/Config/rr-rmv.js | 34----------------------------------
Dcommands/Economy/bal.js | 29-----------------------------
Dcommands/Economy/bet.js | 52----------------------------------------------------
Dcommands/Economy/daily.js | 46----------------------------------------------
Dcommands/Economy/inv.js | 58----------------------------------------------------------
Dcommands/Economy/lb.js | 35-----------------------------------
Dcommands/Economy/profile.js | 47-----------------------------------------------
Dcommands/Economy/shop.js | 28----------------------------
Dcommands/Economy/slots.js | 85-------------------------------------------------------------------------------
Dcommands/Economy/work.js | 25-------------------------
Dcommands/Fun/8ball.js | 56--------------------------------------------------------
Dcommands/Fun/ascii.js | 21---------------------
Dcommands/Fun/cat.js | 25-------------------------
Dcommands/Fun/coinflip.js | 18------------------
Dcommands/Fun/dino.js | 102-------------------------------------------------------------------------------
Dcommands/Fun/dog.js | 25-------------------------
Dcommands/Fun/drake.js | 24------------------------
Dcommands/Fun/ds.js | 18------------------
Dcommands/Fun/emojify.js | 40----------------------------------------
Dcommands/Fun/hack.js | 129-------------------------------------------------------------------------------
Dcommands/Fun/hangman.js | 87-------------------------------------------------------------------------------
Dcommands/Fun/hexcolor.js | 84-------------------------------------------------------------------------------
Dcommands/Fun/hug.js | 29-----------------------------
Dcommands/Fun/kiss.js | 29-----------------------------
Dcommands/Fun/meme.js | 25-------------------------
Dcommands/Fun/obama.js | 45---------------------------------------------
Dcommands/Fun/rickroll.js | 30------------------------------
Dcommands/Fun/rps.js | 91-------------------------------------------------------------------------------
Dcommands/Fun/say.js | 12------------
Dcommands/Fun/ship.js | 31-------------------------------
Dcommands/Fun/simprate.js | 26--------------------------
Dcommands/Fun/sr.js | 15---------------
Dcommands/Fun/triggered.js | 18------------------
Mcommands/Giveaway/giveaway.js | 6++----
Mcommands/Moderation/mute.js | 14+++++---------
Dcommands/Moderation/pin.js | 21---------------------
Dcommands/Moderation/slowmode.js | 57---------------------------------------------------------
Mcommands/Moderation/warns.js | 2+-
Dcommands/Owner/eval.js | 111-------------------------------------------------------------------------------
Dcommands/Owner/guilds.js | 24------------------------
Dcommands/Owner/restart.js | 13-------------
Dcommands/Owner/spider.js | 19-------------------
Dcommands/Owner/test.js | 32--------------------------------
Dcommands/Utilities/afk.js | 26--------------------------
Dcommands/Utilities/avatar.js | 49-------------------------------------------------
Dcommands/Utilities/botinfo.js | 49-------------------------------------------------
Dcommands/Utilities/choose.js | 15---------------
Dcommands/Utilities/docs.js | 19-------------------
Dcommands/Utilities/emoji.js | 21---------------------
Mcommands/Utilities/help.js | 235++++++++++++++++++++++++++++---------------------------------------------------
Dcommands/Utilities/invite.js | 29-----------------------------
Dcommands/Utilities/messageinfo.js | 30------------------------------
Dcommands/Utilities/modmail.js | 138-------------------------------------------------------------------------------
Dcommands/Utilities/permission.js | 105-------------------------------------------------------------------------------
Dcommands/Utilities/ping.js | 28----------------------------
Dcommands/Utilities/poll.js | 24------------------------
Dcommands/Utilities/rank.js | 42------------------------------------------
Dcommands/Utilities/report.js | 78------------------------------------------------------------------------------
Dcommands/Utilities/roleinfo.js | 90-------------------------------------------------------------------------------
Dcommands/Utilities/servericon.js | 16----------------
Dcommands/Utilities/serverinfo.js | 118-------------------------------------------------------------------------------
Dcommands/Utilities/snipe.js | 73-------------------------------------------------------------------------
Dcommands/Utilities/suggest.js | 77-----------------------------------------------------------------------------
Dcommands/Utilities/timer.js | 61-------------------------------------------------------------
Dcommands/Utilities/userinfo.js | 118-------------------------------------------------------------------------------
Mconfig.json | 15+++++++--------
Mevents/afk.js | 6------
Devents/card.js | 64----------------------------------------------------------------
Mevents/emoji.js | 6++----
Devents/goodBye.js | 68--------------------------------------------------------------------
Mevents/guild.js | 99++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
Devents/guildCreate.js | 33---------------------------------
Devents/guildDelete.js | 47-----------------------------------------------
Devents/log.js | 447-------------------------------------------------------------------------------
Devents/message.js | 427-------------------------------------------------------------------------------
Mevents/messageCreate.js | 343++++++++++++++++++++++++++++---------------------------------------------------
Devents/messsageDelete.js | 31-------------------------------
Devents/reactionroles.js | 30------------------------------
Mevents/ready.js | 50--------------------------------------------------
Devents/slash.js | 35-----------------------------------
Aevents/starboard.js | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Devents/startTyping.js | 10----------
Devents/typingStart.js | 10----------
Dpackage-lock.json | 3988-------------------------------------------------------------------------------
Mpackage.json | 31+++++++++----------------------
Astart.bat | 2++
Aunused/commands/Config/choices.js | 123+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rcommands/Config/cmd-list.js -> unused/commands/Config/cmd-list.js | 0
Rcommands/Config/create.js -> unused/commands/Config/create.js | 0
Rcommands/Config/delete.js -> unused/commands/Config/delete.js | 0
Rcommands/Config/migrate.js -> unused/commands/Config/migrate.js | 0
Aunused/commands/Config/modmail-category.js | 32++++++++++++++++++++++++++++++++
Aunused/commands/Config/modmail-role.js | 29+++++++++++++++++++++++++++++
Rcommands/Config/panel.js -> unused/commands/Config/panel.js | 0
Rcommands/Config/rr-add.js -> unused/commands/Config/rr-add.js | 0
Aunused/commands/Config/rr-rmv.js | 34++++++++++++++++++++++++++++++++++
Rcommands/Fun/connect4.js -> unused/commands/Fun/connect4.js | 0
Rcommands/Fun/quote.js -> unused/commands/Fun/quote.js | 0
Aunused/commands/Utilities/modmail.js | 165+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aunused/events/messageCreate.js | 240+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aunused/models/custom-commands.js | 11+++++++++++
Aunused/models/modmail.js | 11+++++++++++
Aunused/models/reaction.js | 10++++++++++
Autil/Data/output.json | 2++
Autil/assets/fonts/Poppins-Regular.ttf | 0
Autil/assets/fonts/Poppins-SemiBold.ttf | 0
Autil/dist/cmds.js | 39+++++++++++++++++++++++++++++++++++++++
Autil/dist/err.js | 224+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Autil/dist/handler.js | 82+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Autil/dist/item.js | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Autil/dist/manager.js | 86+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Autil/dist/npm.sh | 5+++++
Autil/dist/slash.js | 224+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Autil/functions/economy.js | 248+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Autil/functions/function.js | 366+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Autil/functions/mongoose.js | 540+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dutil/pagination/pagify.js | 120-------------------------------------------------------------------------------
Mutil/pagination/pagination.js | 33++++++++++++---------------------
167 files changed, 4157 insertions(+), 9537 deletions(-)

diff --git a/.env.example b/.env.example @@ -1,11 +1,12 @@ TOKEN = MONGO = mongodb://127.0.0.1:27017/test -CLIENT_SECRET = -CLIENT_ID = -SPOTIFY_ID = -SPOTIFY_SECRET = -PORT = 3000 +mongo = +testmongo = +cathmongo = +CLIENT_SECRET = +CLIENT_ID = +SPOTIFY_ID = +SPOTIFY_SECRET = host = lavalink.darrennathanael.com port = 2095 -password = whatwasthelastingyousaid -api = http://localhost:3000 +password = whatwasthelastingyousaid +\ No newline at end of file diff --git a/.gitattributes b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.gitignore b/.gitignore @@ -1,7 +1,4 @@ node_modules package-lock.json .env -/events/log.js -/.prettierignore -/util/functions/economy(backup).js .vscode \ No newline at end of file diff --git a/README.md b/README.md @@ -0,0 +1,115 @@ +# CATH.EXE [![botStatus](https://discord-md-badge.vercel.app/api/shield/bot/800966959268364288?style=flat-square&flat-Square&theme=clean-inverted&compact=true)](https://discord.com/oauth2/authorize?client_id=800966959268364288&permissions=4231314550&scope=bot%20applications.commands) + +<!-- header --> +<img src = "https://media.discordapp.net/attachments/789642309632786434/867156734795055173/Cath-banner.png?width=1298&height=433"> + +**Cath.exe** is a Multipurpose Discord Bot with many features that include but are not limited to Moderation, Music and Economy. The Call of Duty Stats are courtesy of [**Project Lighthouse**](https://discord.gg/ARNFCu9NxK) by [**Path.exe**](https://www.youtube.com/channel/UC0hvUWYhyx_DOEBzLWEJxsw).<br><br> +If you like this bot, feel free to <img src = "https://discord.com/assets/141d49436743034a59dec6bd5618675d.svg" width = "16"> **Star** and **fork** this repository.<br><br> + +<!-- Main Badges --> + +[![inviteme](https://badgen.net/badge/Invite%20Me/Online/5865F2?icon=discord&color=5865F2&style=for-the-badge&scale=1.4)](https://discord.com/oauth2/authorize?client_id=800966959268364288&permissions=4231314550&scope=bot%20applications.commands) +[![Support Server](https://img.shields.io/discord/718762019586572341?label=Support%20Server&logo=Discord&colorB=5865F2&style=for-the-badge&logoColor=white) ](https://discord.gg/SR7TeNJG67) +![Repo Stars](https://img.shields.io/github/stars/night0721/cath.exe?logo=github&color=5865F2&style=for-the-badge) +[![Open in Visual Studio Code](https://img.shields.io/badge/Visual_Studio_Code-5865F2?style=for-the-badge&logo=visual%20studio%20code&logoColor=white)](https://open.vscode.dev/night0721/cath/) +[![Trello](https://img.shields.io/badge/Trello-5865F2?style=for-the-badge&logo=trello&logoColor=white)](https://trello.com/b/dIgR0QNm) + +<!-- Build with badges --> + +## Build with: + +[![JavaScript](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black)](https://developer.mozilla.org/en-US/docs/Web/JavaScript) +[![node](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)](https://nodejs.org/en/) +[![npm](https://img.shields.io/badge/npm-CB3837?style=for-the-badge&logo=npm&logoColor=white)](https://www.npmjs.com/) +[![MongoDB](https://img.shields.io/badge/MongoDB-4EA94B?style=for-the-badge&logo=mongodb&logoColor=white)](https://mongodb.com/) +<img src ="https://forthebadge.com/images/badges/built-with-love.svg" width = "122"><br> + +# <img src = "https://discord.com/assets/a6d05968d7706183143518d96c9f066e.svg" width = "26"> Deployment + +## Deploy Online + +[![Run On Replit](https://img.shields.io/static/v1?label=Run%20On&message=Repl.it&color=5865F2&logo=replit&logoColor=white&style=for-the-badge&scale=1.4)](https://repl.it/github/night0721/cath.exe) +[![Deploy On Heroku](https://img.shields.io/static/v1?label=Deploy%20On&message=Heroku&color=5865F2&logo=heroku&logoColor=white&style=for-the-badge&scale=1.4)](https://heroku.com/deploy?template=https://github.com/night0721/cath.exe) + +## Deployment Locally + +### Prerequisite + +Download all these programs on your local machine by clicking on the badge & following the standard installing procedure. You can use any IDE but we recommand VS Code. + +[![git](https://badgen.net/badge/icon/git?icon=git&label&color=5865F2&style=for-the-badge&scale=1.4)](https://git-scm.com/downloads) +[![Open in Visual Studio Code](https://img.shields.io/badge/Visual_Studio_Code-5865F2?style=for-the-badge&logo=visual%20studio%20code&logoColor=white)](https://code.visualstudio.com/Download) +[![node](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)]() + +### Step by Step Walkthrough + +### [![YouTube Tutorial](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://youtu.be/_D5xG7XoF88) + +1. Clone this repository + +```cmd +git clone https://github.com/night0721/cath.exe +``` + +2. Rename the [`.env.example`<span>&#10138;</span> + ](https://github.com/night0721/cath.exe/blob/main/.env.example) file to `.env`<br> + +3. Create an application from Discord Developer's Portal then copy these things into the `.env` file.<br> + [![Open Discord Developer Portal](https://badgen.net/badge/icon/discord?icon=discord&label=Developer%20Portal&color=5865F2&style=for-the-badge)](https://discord.com/developers/applications) - **Bot Token**<br> - **Application ID** (Client ID)<br> - **Client Secret**<br> +4. To view the logs, Create 5 Channels & 5 Webhooks in _your_ **Discord Server:** corresponding to these logs. + + - **Server Log** (Log new Server Added/Premium Server)<br> + - **Error Log** (Log Unhandled Rejection Error)<br> + - **Ready Log** (Log when bot online)<br> + - **Command Log** (Log command usage)<br> + - **DM Log** (Log when someone send DM to Bot)<br> + + _You can also just use one Channel & one Webhook for everything but it will be really inconvenient._ + + <img src = "https://media.discordapp.net/attachments/540218400413188116/867797464169709661/unknown.png" width="640"> <br> + +5. One by one paste the webhook url in a web browser & copy the **ID** & the **TOKEN** and paste it in the corresponding feilds in the `.env` file. <br> + +6. After this, you need to install all dependencies by using this command. This will takes a few minutes. + + ```cmd + npm i + ``` + +7. Now, to start the bot use this command in the terminal. + ```cmd + node . + ``` + +# Additional Steps + +To enable the Economy Commands, you need to Setup a MongoDB Database. You can also watch a video guide [here](https://youtu.be/dQw4w9WgXcQ). + +1. Create a Free [MongoDB Account](https://www.mongodb.com/cloud/atlas/register) +2. Click on the `Create a New Database`. +3. Selct the `CREATE` option in the **Shared** Teir. +4. Select a `Cloud Provider & Region` that is geographically closer to the average user that will use the bot. _This will effect the responce time of the bot._ +5. Then you can Name your Cluster, after that click on `Create Cluster`. _This will take a couple of minutes._ +6. Then click on `Database Access` from the sidebar & then click on `Add New Database User`. +7. Under the `Password - Authentication Method`. Enter a username & password. then click on `Add User`. +8. After that, click on `Network Access` from the sidebar & then click on `Add IP Address`. & click on the `Add Current IP Address` Then click on `Confirm`. +9. now, Click on `Database` from the sidebar & then click on `Connect`. +10. Then on click on `Connect your Application`. & Copy the link. +11. The paste that link in the `MONGODB` feild in the `.env` file. +12. Now you need to modify that link, + - Replace `<password>` with the password for the user that you created in **Step 7**. + - Replace `myFirstDatabase` with the name of the Database that you named in **Step 5**. +13. That's it! + +# Support, Feature Request & Bug Reports + +## <img src = "https://cdn.discordapp.com/emojis/867093614403256350.png?v=1" width = 18> Support & Feature Request + +Join the official [Support Server](https://discord.gg/SbQHChmGcp) on Discord & we will be happy to assist you. <br> +To Request new features contact us on Discord using the support server. + +## <img src = "https://cdn.discordapp.com/emojis/867093601962950666.png?v=1" width = "18"> Report Bugs + +You can report bugs or issues by opening a issue in this repository. Alternatevely you can also contact us on Discord using the support server. + +[![Support Server](https://img.shields.io/discord/718762019586572341?label=Support%20Server&logo=Discord&colorB=5865F2&style=for-the-badge&logoColor=white) ](https://discord.gg/SR7TeNJG67) diff --git a/bot.js b/bot.js @@ -1,13 +1,24 @@ const { Client, Collection, MessageEmbed, Intents } = require("discord.js"); const { GiveawaysManager } = require("discord-giveaways"); +const config = require("./config.json"); +const version = require("./package.json").version; require("dotenv").config(); const client = new Client({ allowedMentions: { parse: ["users", "roles"], repliedUser: true }, + presence: { + activities: [ + { + name: `v${version} | ${config.prefix}help`, + type: "STREAMING", + url: "https://www.youtube.com/watch?v=_D5xG7XoF88", + }, + ], + }, restTimeOffset: 0, partials: ["MESSAGE", "CHANNEL", "REACTION", "GUILD_MEMBER"], intents: [ Intents.FLAGS.GUILDS, - Intents.FLAGS.GUILD_MEMBERS, + //Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_BANS, Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS, Intents.FLAGS.GUILD_INVITES, @@ -15,7 +26,7 @@ const client = new Client({ Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_MESSAGE_REACTIONS, Intents.FLAGS.DIRECT_MESSAGES, - Intents.FLAGS.GUILD_PRESENCES, + //Intents.FLAGS.GUILD_PRESENCES, ], }); module.exports = client; @@ -26,19 +37,20 @@ client.commands = new Collection(); client.slashCommands = new Collection(); client.aliases = new Collection(); client.esnipes = new Collection(); +client.hide = new Collection(); client.snipes = new Array(); client.queue = new Map(); client.Timers = new Map(); -client.config = require("./config.json"); +client.config = config; client.function = require("./util/functions/function"); client.data = require("./util/functions/mongoose"); client.err = require("./util/dist/err"); +client.serr = require("./util/dist/slash"); client.cat = client.config.ca; client.SuggestionLog = client.config.Suggestion; client.ReportLog = client.config.Report; client.DMLog = client.config.DMLog; client.CMDLog = client.config.CMDLog; -client.ReadyLog = client.config.ReadyLog; client.ServerLog = client.config.ServerLog; client.ErrorLog = client.config.ErrorLog; client.color = client.config.color; diff --git a/cat/Path/fantastic.js b/cat/Path/fantastic.js @@ -1,13 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "fantastic", - timeout: 60000, - - run: async (client, message, args) => { - message.delete(); - const player = args.join(" "); - message.channel.send( - `${player} is a fantastic CoDM player. Just need to work on communication, map awareness, info scouting, bomb plants, positioning, teamfighting, gun skill , utility usage, rotations and getting kills.` - ); - }, -}; diff --git a/cat/Path/fight.js b/cat/Path/fight.js @@ -1,72 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "fight", - description: "Goooooooooooooooolag!", - timeout: 15000, - - run: async (client, message, args) => { - const gaes = [ - "Gae", - "Super Gae", - "Ultra Gae", - "Snow Gae", - "Ultimate Gae", - "Terminal Gae", - "Akimbo Gae", - "Dead(extended timer)", - "Mega Gae", - "Cheez Gae", - "Gath Gae", - "Koosun Gae", - "KDR Gae", - "Gaezer Gae", - "Big Gae", - "Horni Gae", - "Zero Gae", - "Gae beyond repair", - "Dead×2(extended timer)", - "Not Gae", - "Animus Gae", - "Dust Gae", - "Orcus Gae", - "Gulag Cleaner", - "Kedar Gae", - "Smol Gae", - "Meta Gae", - "Mono Gae", - "Stippled Gae", - "BSA Gae", - "Oreo Gae", - "Random Gae", - "Tortol Gae", - "Amogus Gae", - "Gae×2", - "Dan Gae", - "Real Gae©®™", - "Mastered Ultra Instinct Gae", - "Bamboozled", - "More Gae", - "Morrre Gae", - "Most Gae", - "Undisputable Gae", - "Gae Prince of Horni", - "Gae with Y", - "Phatopenisis Gae", - "Gathophile", - "a Bot", - "locknload with 200 round RPD gae", - "ros gae", - "Cath Gae", - "Cat drinking a cat gae", - "Night Gae", - ]; - const gae = gaes[Math.floor(Math.random() * gaes.length)]; - const embed = new MessageEmbed() - .setTitle("**Gulag Fight**") - .setDescription( - `**${message.author} has taken a chance at redemption in The Gulag. \nYou fight only to find out that you're \`${gae}\`. If you somehow turned out to not be gae, DM an admin to get your timer halved ||only if your mute is less than 69m||**` - ) - .setColor(5198940); - message.channel.send(embed); - }, -}; diff --git a/cat/Path/gae.js b/cat/Path/gae.js @@ -1,37 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "gae", - timeout: 15000, - - run: async (client, message, args) => { - const MEE6 = [ - "u = gae", - "pLeaSe gAE", - "REEEEEEEEEEEEEEEEEEEEEE*GAE*EEEEEEEEEEEEEEEEEEEEEEEEEEE", - "Enough with the gae jokes, U gae", - "Plain ol' gae", - "<a:dankcutie:804313489488347146>", - "By the way, Deity bot is my senpai.\nShe is the most beautiful bot I've ever seen <3", - "aight imma gae out", - "*gae with extra steps*", - "**wae r u gae**", - "u gae bro?", - "**100%** gae", - "I bet you do **tiktok**", - "**G.A.E.**", - "The next person to chat is gae", - "Whoever used C.gae, is **gae**", - "*Its ok to be gae*", - "*succ my* **cheez**", - "**gae gae gae gae gae gae**", - "**Be gae**", - "There's no cooldown so y'all get muted for being *gae*", - "Ok stop using this command, really. U gae?", - "What the hell, u gae?", - "**GAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE**", - ]; - const MEE6Index = MEE6[Math.floor(Math.random() * MEE6.length)]; - message.delete(); - message.channel.send(`${MEE6Index}`); - }, -}; diff --git a/cat/Path/gg.js b/cat/Path/gg.js @@ -1,26 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "gg", - timeout: 15000, - - run: async (client, message, args) => { - const GG = [ - "**GIT GUD**", - "Git gud kid", - "good game *question mark*", - "gg l0ser", - "delet cod gg", - "*ggwp*", - "I was lagging doe", - "```Stop using this command```", - "<a:partyy:804324497531863060> ez pz <a:partyy:804324497531863060>", - "<a:REEEE:804324566259204107>", - "**GOOD GAME WELL PLAYED**", - "<a:greenflame:804325192330641408> get rektd <a:greenflame:804325192330641408>", - "<a:lollll:804325253265621012><a:lollll:804325253265621012><a:lollll:804325253265621012><a:lollll:804325253265621012><a:lollll:804325253265621012>", - ]; - const GGIndex = GG[Math.floor(Math.random() * GG.length)]; - message.delete(); - message.channel.send(`${GGIndex}`); - }, -}; diff --git a/cat/Path/how.js b/cat/Path/how.js @@ -1,25 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "howgae", - description: "Check how gae is the user", - usage: "(User)", - Path: true, - - run: async (client, message, args) => { - const target = message.mentions.users.first() || message.author; - if (target.id === "366562874039992331") { - message.channel.send( - new MessageEmbed() - .setTitle(`${target.username}'s gae rate`) - .setDescription(`You are 69420% gae`) - ); - } else { - let simp = Math.floor(Math.random() * 100); - message.channel.send( - new MessageEmbed() - .setTitle(`${target.username}'s gae rate`) - .setDescription(`You are ${simp}% gae`) - ); - } - }, -}; diff --git a/cat/Path/nab.js b/cat/Path/nab.js @@ -1,30 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "nab", - timeout: 15000, - - run: async (client, message, args) => { - const NAB = [ - "stop being a nab, nab", - "Lmao you a nab", - "Biggest nab of all time", - "You're just a nab", - "Okay calm down nab", - "**Stop** spamming this command you **nab**", - "```I told you to stop spamming this command nab```", - "Get rekt nab XD Jajajajajaja", - "**N.A.B.**", - "Better luck next time nab", - "Ooooh look at me im better than you nab", - "Whoever used C.nab, is a nab", - "Stfu nab", - "**you cant aim**", - "*bonjour* nab", - "u = <a:pepetriggered:804327257145081877>", - "Go back to tiktok <a:frogcrazy:804327200659865610>", - ]; - const NABIndex = NAB[Math.floor(Math.random() * NAB.length)]; - message.delete(); - message.channel.send(`${NABIndex}`); - }, -}; diff --git a/cat/Path/pp.js b/cat/Path/pp.js @@ -1,20 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "pp", - description: "Check how long is the user", - usage: "(User)", - - run: async (client, message, args) => { - let user = message.mentions.users.first() || message.author; - let embed = new MessageEmbed() - .addField( - `${user.username}\'s peepee`, - `8${"=".repeat(Math.floor(Math.random() * 20))}D` - ) - .setColor(client.color) - .setTitle("Peepee size machine") - .setTimestamp() - .setFooter(`Made by ${client.author}`); - message.inlineReply(embed); - }, -}; diff --git a/cat/fantastic.js b/cat/fantastic.js @@ -1,13 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "fantastic", - timeout: 60000, - - run: async (client, message, args) => { - message.delete(); - const player = args.join(" ") || message.author.username; - message.channel.send( - `${player} is a fantastic CoDM player. Just need to work on communication, map awareness, info scouting, bomb plants, positioning, teamfighting, gun skill , utility usage, rotations and getting kills.` - ); - }, -}; diff --git a/cat/fight.js b/cat/fight.js @@ -1,72 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "fight", - description: "Goooooooooooooooolag!", - timeout: 15000, - - run: async (client, message, args) => { - const gaes = [ - "Gae", - "Super Gae", - "Ultra Gae", - "Snow Gae", - "Ultimate Gae", - "Terminal Gae", - "Akimbo Gae", - "Dead(extended timer)", - "Mega Gae", - "Cheez Gae", - "Gath Gae", - "Koosun Gae", - "KDR Gae", - "Gaezer Gae", - "Big Gae", - "Horni Gae", - "Zero Gae", - "Gae beyond repair", - "Dead×2(extended timer)", - "Not Gae", - "Animus Gae", - "Dust Gae", - "Orcus Gae", - "Gulag Cleaner", - "Kedar Gae", - "Smol Gae", - "Meta Gae", - "Mono Gae", - "Stippled Gae", - "BSA Gae", - "Oreo Gae", - "Random Gae", - "Tortol Gae", - "Amogus Gae", - "Gae×2", - "Dan Gae", - "Real Gae©®™", - "Mastered Ultra Instinct Gae", - "Bamboozled", - "More Gae", - "Morrre Gae", - "Most Gae", - "Undisputable Gae", - "Gae Prince of Horni", - "Gae with Y", - "Phatopenisis Gae", - "Gathophile", - "a Bot", - "locknload with 200 round RPD gae", - "ros gae", - "Cath Gae", - "Cat drinking a cat gae", - "Night Gae", - ]; - const gae = gaes[Math.floor(Math.random() * gaes.length)]; - const embed = new MessageEmbed() - .setTitle("**Gulag Fight**") - .setDescription( - `**${message.author} has taken a chance at redemption in The Gulag. \nYou fight only to find out that you're \`${gae}\`. If you somehow turned out to not be gae, DM an admin to get your timer halved ||only if your mute is less than 69m||**` - ) - .setColor(5198940); - message.channel.send({ embeds: [embed] }); - }, -}; diff --git a/cat/gae.js b/cat/gae.js @@ -1,37 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "gae", - timeout: 15000, - - run: async (client, message, args) => { - const MEE6 = [ - "u = gae", - "pLeaSe gAE", - "REEEEEEEEEEEEEEEEEEEEEE*GAE*EEEEEEEEEEEEEEEEEEEEEEEEEEE", - "Enough with the gae jokes, U gae", - "Plain ol' gae", - "<a:dankcutie:804313489488347146>", - "By the way, Deity bot is my senpai.\nShe is the most beautiful bot I've ever seen <3", - "aight imma gae out", - "*gae with extra steps*", - "**wae r u gae**", - "u gae bro?", - "**100%** gae", - "I bet you do **tiktok**", - "**G.A.E.**", - "The next person to chat is gae", - "Whoever used C.gae, is **gae**", - "*Its ok to be gae*", - "*succ my* **cheez**", - "**gae gae gae gae gae gae**", - "**Be gae**", - "There's no cooldown so y'all get muted for being *gae*", - "Ok stop using this command, really. U gae?", - "What the hell, u gae?", - "**GAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE**", - ]; - const MEE6Index = MEE6[Math.floor(Math.random() * MEE6.length)]; - message.delete(); - message.channel.send(`${MEE6Index}`); - }, -}; diff --git a/cat/gg.js b/cat/gg.js @@ -1,26 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "gg", - timeout: 15000, - - run: async (client, message, args) => { - const GG = [ - "**GIT GUD**", - "Git gud kid", - "good game *question mark*", - "gg l0ser", - "delet cod gg", - "*ggwp*", - "I was lagging doe", - "```Stop using this command```", - "<a:partyy:804324497531863060> ez pz <a:partyy:804324497531863060>", - "<a:REEEE:804324566259204107>", - "**GOOD GAME WELL PLAYED**", - "<a:greenflame:804325192330641408> get rektd <a:greenflame:804325192330641408>", - "<a:lollll:804325253265621012><a:lollll:804325253265621012><a:lollll:804325253265621012><a:lollll:804325253265621012><a:lollll:804325253265621012>", - ]; - const GGIndex = GG[Math.floor(Math.random() * GG.length)]; - message.delete(); - message.channel.send(`${GGIndex}`); - }, -}; diff --git a/cat/how.js b/cat/how.js @@ -1,19 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "howgae", - description: "Check how gae is the user", - usage: "(User)", - Path: true, - - run: async (client, message, args) => { - const target = message.mentions.users.first() || message.author; - let simp = Math.floor(Math.random() * 100); - message.reply({ - embeds: [ - new MessageEmbed() - .setTitle(`${target.username}'s gae rate`) - .setDescription(`You are ${simp}% gae`), - ], - }); - }, -}; diff --git a/cat/nab.js b/cat/nab.js @@ -1,30 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "nab", - timeout: 15000, - - run: async (client, message, args) => { - const NAB = [ - "stop being a nab, nab", - "Lmao you a nab", - "Biggest nab of all time", - "You're just a nab", - "Okay calm down nab", - "**Stop** spamming this command you **nab**", - "```I told you to stop spamming this command nab```", - "Get rekt nab XD Jajajajajaja", - "**N.A.B.**", - "Better luck next time nab", - "Ooooh look at me im better than you nab", - "Whoever used C.nab, is a nab", - "Stfu nab", - "**you cant aim**", - "*bonjour* nab", - "u = <a:pepetriggered:804327257145081877>", - "Go back to tiktok <a:frogcrazy:804327200659865610>", - ]; - const NABIndex = NAB[Math.floor(Math.random() * NAB.length)]; - message.delete(); - message.channel.send(`${NABIndex}`); - }, -}; diff --git a/cat/pp.js b/cat/pp.js @@ -1,22 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "pp", - description: "Check how long is the user", - usage: "(User)", - - run: async (client, message, args) => { - let user = message.mentions.users.first() || message.author; - let embed = new MessageEmbed() - .addField( - `${user.username}\'s peepee`, - `8${"=".repeat(Math.floor(Math.random() * 20))}D` - ) - .setColor(client.color) - .setTitle("Peepee size machine") - .setTimestamp() - .setFooter(`Made by ${client.author}`); - message.reply({ - embeds: [embed], - }); - }, -}; diff --git a/command/Economy/bet.js b/command/Economy/bet.js @@ -0,0 +1,53 @@ +const { MessageEmbed } = require("discord.js"); +module.exports = { + name: "gamble", + usage: "(Number)", + timeout: 5000, + description: "Win double amount of coins or lose all coins", + category: "Economy", + options: [ + { + type: 10, + name: "cp", + description: "The number of CP you want to bet", + required: true, + }, + ], + run: async (client, interaction, args, utils, data) => { + const max = 1000000; + const amt = args[0]; + if ((await client.bal(interaction.user.id)) < amt) { + return client.serr(interaction, "Economy", "bet", 20); + } + if (amt > max) { + return client.serr(interaction, "Economy", "bet", 101); + } + if (utils.toBool() === true) { + const winamt = amt * 1; + await client.add(interaction.user.id, winamt, interaction); + await client.ADDBWin(interaction.user.id); + const abc = new MessageEmbed() + .setColor("GREEN") + .setTimestamp() + .setTitle(`${interaction.user.username} wins a gamble game`) + .setDescription( + `You win\n**${winamt}**${client.currency}\nYou now have **${ + parseInt(await client.bal(interaction.user.id)) + amt + }**${client.currency}` + ); + await interaction.followUp({ embeds: [abc] }); + } else { + await client.rmv(interaction.user.id, amt); + const cba = new MessageEmbed() + .setColor("RED") + .setTimestamp() + .setTitle(`${interaction.user.username} loses a gamble game`) + .setDescription( + `You lost\n**${amt}**${client.currency}\nYou now have **${ + parseInt(await client.bal(interaction.user.id)) - amt + }**${client.currency}` + ); + await interaction.followUp({ embeds: [cba] }); + } + }, +}; diff --git a/command/Economy/inv.js b/command/Economy/inv.js @@ -0,0 +1,56 @@ +const { MessageEmbed } = require("discord.js"); +const inv = require("../../models/econ"); +const util = require("../../util/pagination/pagination"); +module.exports = { + name: "inventory", + description: "Check the inventory of an user", + usage: "{User}", + category: "Economy", + timeout: 5000, + options: [ + { + type: 6, + name: "user", + description: "The user you want to see", + required: false, + }, + ], + run: async (client, interaction, args, data, utils) => { + const user = + interaction.guild.members.cache.get(args[0]) || interaction.member; + inv.findOne({ User: user.id }, async (err, data) => { + if (data) { + if (!data.Inventory) + return interaction.followUp({ + content: `User doesn't have any data`, + }); + const mappedData = Object.keys(data.Inventory).map(key => { + if (data.Inventory[key] == 0) { + return; + } + return `\n**${key}** — ${data.Inventory[key]}`; + }); + if (mappedData.length == 0) { + return interaction.followUp({ + content: `User doesn't have any data`, + }); + } + const c = util.chunk(mappedData, 5).map(x => x.join("\n")); + const embed = new MessageEmbed() + .setTimestamp() + .setTitle(`${user.displayName}'s inventory`) + .setColor(client.color) + .setDescription(c[0]) + .setFooter(`Page 1 of ${c.length}`); + try { + const msg = await interaction.followUp({ embeds: [embed] }); + if (mappedData.length > 5) + await util.pagination(msg, interaction.user, c); + } catch (e) { + console.log(e); + } + } else + return interaction.followUp({ content: `User doesn't have any data` }); + }); + }, +}; diff --git a/command/Economy/lb.js b/command/Economy/lb.js @@ -0,0 +1,37 @@ +const Levels = require("discord-xp"); +const { MessageEmbed } = require("discord.js"); +module.exports = { + name: "leaderboard", + timeout: 5000, + description: "Check the leaderboard of a server", + category: "Economy", + Level: true, + run: async (client, interaction, args) => { + const rawLeaderboard = await Levels.fetchLeaderboard( + interaction.guild.id, + 10 + ); + if (rawLeaderboard.length < 1) + return interaction.followUp({ content: "There isn't any data" }); + const leaderboard = await Levels.computeLeaderboard( + client, + rawLeaderboard, + true + ); + const lb = leaderboard.map( + e => + `**${e.position}**. ${e.username}#${e.discriminator} Level: ${ + e.level + } XP: ${e.xp.toLocaleString()}` + ); + const embed = new MessageEmbed() + .setTitle(`**Leaderboard for ${interaction.guild.name}**`) + .setDescription(`\n${lb.join("\n")}`) + .setFooter( + `Requested by ${interaction.user.tag}`, + interaction.user.displayAvatarURL({ dynamic: true }) + ) + .setColor(client.color); + interaction.followUp({ embeds: [embed] }); + }, +}; diff --git a/command/Economy/profile.js b/command/Economy/profile.js @@ -0,0 +1,46 @@ +const { MessageEmbed } = require("discord.js"); +module.exports = { + name: "profile", + usage: "(User)", + description: "Check an user economy profile", + type: "CHAT_INPUT", + options: [ + { + type: 6, + name: "user", + description: "The user you want to see", + required: false, + }, + ], + run: async (client, interaction, args, data, utils) => { + const user = + interaction.guild.members.cache.get(args[0]) || interaction.member; + const bjwin = await client.bjWin(user.user.id); + const swin = await client.sWin(user.user.id); + const bwin = await client.bWin(user.user.id); + const cmdused = await client.cmdsUSED(user.user.id); + const bal = await client.bal(user.user.id); + const multi = await client.multi(interaction); + const game = new MessageEmbed() + .setFooter( + `Requested by ${user.user.tag}`, + user.user.displayAvatarURL({ dynamic: true, size: 4096 }) + ) + .setColor("7196ef") + .setTitle(`${user.displayName}'s profile`) + .addField( + "**Stats**\n", + `🃏 Blackjack wins: \`${bjwin}\`\n` + + `🎰 Slots wins: \`${swin}\`\n` + + `🕹 Bet wins: \`${bwin}\`\n` + + `⌨️Commands used: \`${cmdused}\`\n` + + `Totalwins: \`${bjwin + swin + bwin}\``, + true + ) + .addField( + "**Balance**\n", + `💲CP: \`${bal}\`\n` + `➕Multiplier: \`${`1.${multi}x`}\`` + ); + await interaction.followUp({ embeds: [game] }); + }, +}; diff --git a/command/Economy/shop.js b/command/Economy/shop.js @@ -0,0 +1,28 @@ +const { MessageEmbed } = require("discord.js"); +const util = require("../../util/pagination/pagination"); +const items = require("../../util/dist/item"); +module.exports = { + name: "shop", + description: "Check the items from the shop", + category: "Economy", + run: async (client, interaction, args) => { + const list = items.map((value, index) => { + return `**${value.item}** — ${value.price.toLocaleString()}${ + client.currency + }\nID: \`${value.id}\``; + }); + const c = util.chunk(list, 5).map(x => x.join("\n\n")); + const embed = new MessageEmbed() + .setTitle("**cath.exe shop**") + .setTimestamp() + .setDescription(c[0]) + .setColor(client.color) + .setFooter(`Page 1 of ${c.length}`); + try { + const msg = await interaction.followUp({ embeds: [embed] }); + if (list.length > 5) await util.pagination(msg, interaction.user, c); + } catch (e) { + console.log(e); + } + }, +}; diff --git a/command/Economy/slots.js b/command/Economy/slots.js @@ -0,0 +1,95 @@ +const { MessageEmbed } = require("discord.js"); +module.exports = { + name: "slots", + usage: "(Number)", + timeout: 5000, + description: "Win more coins by slots", + category: "Economy", + options: [ + { + type: 10, + name: "cp", + description: "The number of CP you want to bet", + required: true, + }, + ], + run: async (client, interaction, args) => { + const max = 1000000; + const slots = [ + "<:blushca:852174555513618502>", + "<:abusecat:853501068074942464>", + "<:dumbcat:855462498550415362>", + ]; + const slotOne = slots[Math.floor(Math.random() * slots.length)]; + const slotTwo = slots[Math.floor(Math.random() * slots.length)]; + const slotThree = slots[Math.floor(Math.random() * slots.length)]; + const slotfour = slots[Math.floor(Math.random() * slots.length)]; + const slotfive = slots[Math.floor(Math.random() * slots.length)]; + const slotsix = slots[Math.floor(Math.random() * slots.length)]; + const slotseven = slots[Math.floor(Math.random() * slots.length)]; + const sloteight = slots[Math.floor(Math.random() * slots.length)]; + const slotnine = slots[Math.floor(Math.random() * slots.length)]; + const amt = args[0]; + if (amt > max) return client.serr(interaction, "Economy", "bet", 101); + if ((await client.bal(interaction.user.id)) < amt) { + return client.serr(interaction, "Economy", "bet", 20); + } + if ( + (slotOne === slotTwo && slotOne === slotThree) || + (slotfour === slotfive && slotfour === slotsix) || + (slotseven === sloteight && slotseven === slotnine) + ) { + const winamt = Math.floor(Math.random() * 2 * amt); + await client.add(interaction.user.id, winamt, interaction); + await client.ADDSWin(interaction.user.id); + const won = new MessageEmbed() + .setColor("GREEN") + .setFooter(`Made by ${client.author}`) + .setTimestamp() + .addField( + "|-----|-----|----|", + `| ${slotfour} | ${slotfive} | ${slotsix} |` + ) + .addField( + "|-----|-----|----|", + `| ${slotOne} | ${slotTwo} | ${slotThree} |` + ) + .addField( + "|-----|-----|----|", + `| ${slotseven} | ${sloteight} | ${slotnine} |` + ) + .setTitle(`${interaction.user.username} wins a slots game`) + .setDescription( + `You win\n**${winamt + amt}**${client.currency}\nYou now have **${ + parseInt(await client.bal(interaction.user.id)) - amt + }**${client.currency}` + ); + interaction.followUp({ embeds: [won] }); + } else { + await client.rmv(interaction.user.id, amt); + const lost = new MessageEmbed() + .setColor("RED") + .setFooter(`Made by ${client.author}`) + .setTimestamp() + .addField( + "|-----|-----|----|", + `| ${slotfour} | ${slotfive} | ${slotsix} |` + ) + .addField( + "|-----|-----|----|", + `| ${slotOne} | ${slotTwo} | ${slotThree} |` + ) + .addField( + "|-----|-----|----|", + `| ${slotseven} | ${sloteight} | ${slotnine} |` + ) + .setTitle(`${interaction.user.username} loses a slots game`) + .setDescription( + `You lost\n**${amt}**${client.currency}\nYou now have **${ + parseInt(await client.bal(interaction.user.id)) - amt + }**${client.currency}` + ); + interaction.followUp({ embeds: [lost] }); + } + }, +}; diff --git a/command/Economy/work.js b/command/Economy/work.js @@ -0,0 +1,24 @@ +module.exports = { + name: "work", + description: "Work to earn money", + category: "Economy", + timeout: 1000 * 60 * 10, + run: async (client, interaction, args, utils) => { + const job = [ + "Software engineer", + "Programmer", + "Teacher", + "YouTuber", + "Student", + "Desginer", + "Editor", + "Banker", + ]; + const earning = utils.rndint(5000, 3000); + const jobs = job[Math.floor(Math.random() * job.length)]; + await client.add(interaction.user.id, earning, interaction); + interaction.followUp({ + content: `You worked as a **${jobs}** and earned **${earning}${client.currency}**`, + }); + }, +}; diff --git a/command/Fun/8ball.js b/command/Fun/8ball.js @@ -1,5 +1,5 @@ const { MessageEmbed } = require("discord.js"); -const axios = require("axios"); +const { random8ball } = require("cath"); module.exports = { name: "8ball", usage: "(Question)", @@ -15,9 +15,7 @@ module.exports = { }, ], run: async (client, interaction, args) => { - const data = await axios - .get(`${process.env.api}/api/v1/fun/8ball`) - .then(res => res.data.answer); + const data = await random8ball(); const embed = new MessageEmbed() .setAuthor( `🎱 ${interaction.member.user.tag} asks`, diff --git a/command/Fun/cat.js b/command/Fun/cat.js @@ -1,5 +1,5 @@ const { MessageEmbed } = require("discord.js"); -const fetch = require("node-fetch"); +const { getreddit } = require("cath"); module.exports = { name: "cat", category: "Fun", @@ -7,29 +7,22 @@ module.exports = { run: async (client, interaction, args) => { let subreddits = ["cat", "cats"]; let subreddit = subreddits[Math.floor(Math.random() * subreddits.length)]; - fetch(`https://www.reddit.com/r/${subreddit}/random/.json`).then( - async res => { - let content = await res.json(); - let permalink = content[0].data.children[0].data.permalink; - let memeURL = `https://reddit.com${permalink}`; - let memeImage = content[0].data.children[0].data.url; - let memeTitle = content[0].data.children[0].data.title; - let memeUpvotes = content[0].data.children[0].data.ups; - let memeDownvotes = content[0].data.children[0].data.downs; - let memeNumComments = content[0].data.children[0].data.num_comments; - const memeEmbed = new MessageEmbed() - .setTitle(`A cat image | ${memeTitle}`) - .setAuthor( - interaction.member.user.tag, - interaction.user.displayAvatarURL({ dynamic: true }) - ) - .setURL(`${memeURL}`) - .setImage(memeImage) - .setTimestamp() - .setColor(client.color) - .setFooter(` 👍 ${memeUpvotes} 💬 ${memeNumComments}`); - await interaction.followUp({ embeds: [memeEmbed] }); - } - ); + const data = await getreddit(subreddit); + await interaction.followUp({ + embeds: [ + new MessageEmbed({ + title: data.title, + url: data.url, + image: { url: data.image }, + timestamp: Date.now(), + footer: { text: data.footer }, + color: client.color, + author: { + name: interaction.member.user.tag, + iconURL: interaction.user.displayAvatarURL({ dynamic: true }), + }, + }), + ], + }); }, }; diff --git a/command/Fun/dog.js b/command/Fun/dog.js @@ -1,5 +1,5 @@ const { MessageEmbed } = require("discord.js"); -const fetch = require("node-fetch"); +const { getreddit } = require("cath"); module.exports = { name: "dog", category: "Fun", @@ -7,29 +7,22 @@ module.exports = { run: async (client, interaction, args) => { let subreddits = ["dog", "dogs"]; let subreddit = subreddits[Math.floor(Math.random() * subreddits.length)]; - fetch(`https://www.reddit.com/r/${subreddit}/random/.json`).then( - async res => { - let content = await res.json(); - let permalink = content[0].data.children[0].data.permalink; - let memeURL = `https://reddit.com${permalink}`; - let memeImage = content[0].data.children[0].data.url; - let memeTitle = content[0].data.children[0].data.title; - let memeUpvotes = content[0].data.children[0].data.ups; - let memeDownvotes = content[0].data.children[0].data.downs; - let memeNumComments = content[0].data.children[0].data.num_comments; - const memeEmbed = new MessageEmbed() - .setTitle(`A dog image | ${memeTitle}`) - .setAuthor( - interaction.member.user.tag, - interaction.user.displayAvatarURL({ dynamic: true }) - ) - .setURL(`${memeURL}`) - .setImage(memeImage) - .setTimestamp() - .setColor(client.color) - .setFooter(` 👍 ${memeUpvotes} 💬 ${memeNumComments}`); - await interaction.followUp({ embeds: [memeEmbed] }); - } - ); + const data = await getreddit(subreddit); + await interaction.followUp({ + embeds: [ + new MessageEmbed({ + title: data.title, + url: data.url, + image: { url: data.image }, + timestamp: Date.now(), + footer: { text: data.footer }, + color: client.color, + author: { + name: interaction.member.user.tag, + iconURL: interaction.user.displayAvatarURL({ dynamic: true }), + }, + }), + ], + }); }, }; diff --git a/command/Fun/drake.js b/command/Fun/drake.js @@ -1,5 +1,5 @@ const { MessageAttachment } = require("discord.js"); -const fetch = require("node-fetch"); +const axios = require("axios"); module.exports = { name: "drake", description: "Drake meme", @@ -20,7 +20,7 @@ module.exports = { }, ], run: async (client, interaction, args) => { - const res = await fetch( + const res = await axios.get( `https://frenchnoodles.xyz/api/endpoints/drake/?text1=${args[0]}&text2=${args[1]}`, {} ); diff --git a/command/Fun/ds.js b/command/Fun/ds.js @@ -1,4 +1,4 @@ -const fetch = require("node-fetch"); +const axios = require("axios"); module.exports = { name: "doublestruck", description: "Doublestruck your text", @@ -15,7 +15,7 @@ module.exports = { ], run: async (client, interaction, args) => { let text = args[0].split(" ").join("+"); - let res = await fetch( + let res = await axios.get( "https://api.popcatdev.repl.co/doublestruck?text=" + text ); let json = await res.json(); diff --git a/command/Fun/hangman.js b/command/Fun/hangman.js @@ -0,0 +1,99 @@ +const axios = require("axios"); +const { MessageEmbed } = require("discord.js"); +const playing = new Set(); +module.exports = { + name: "hangman", + description: "Play a hangman game", + category: "Fun", + run: async (client, interaction, args) => { + await interaction.deleteReply(); + if (playing.has(interaction.channel.id)) + return interaction.followUp({ + content: "Only one game may be occurring per channel.", + }); + playing.add(interaction.channel.id); + try { + const data = await axios + .get(`${process.env.api}/api/v1/fun/hangman`) + .then(res => res.data); + const word = data.word; + let points = 0; + let displayText = null; + let guessed = false; + const confirmation = []; + const incorrect = []; + const display = new Array(word.length).fill("◯"); + while (word.length !== confirmation.length && points < 6) { + const embed = new MessageEmbed() + .setColor(client.color) + .setFooter( + interaction.user.tag, + interaction.user.displayAvatarURL({ dynamic: true }) + ) + .setTimestamp() + .setTitle("Hangman game").setDescription(` + ${displayText === null ? "Here we go!" : displayText ? "Good job!" : "Nope!"} + \`${display.join(" ")}\`. Which letter do you choose? + Incorrect Tries: ${incorrect.join(", ") || "None"} + \`\`\` + . ┌─────┐ + . ┃ ┋ + . ┃ ${points > 0 ? "O" : ""} + . ┃ ${points > 2 ? "/" : " "}${points > 1 ? "|" : ""}${ + points > 3 ? "\\" : "" + } + . ┃ ${points > 4 ? "/" : ""}${points > 5 ? "\\" : ""} + ============= + \`\`\` + `); + let m = await interaction.channel.send({ embeds: [embed] }); + const filter = res => { + const choice = res.content.toLowerCase(); + return ( + res.author.id === interaction.user.id && + !confirmation.includes(choice) && + !incorrect.includes(choice) + ); + }; + const guess = await interaction.channel.awaitMessages({ + filter, + max: 1, + time: 30000, + }); + //m.delete(); + if (!guess.size) { + await interaction.channel.send({ content: "Sorry, time is up!" }); + break; + } + const choice = guess.first().content.toLowerCase(); + if (choice === "end") break; + if (choice.length > 1 && choice === word) { + guessed = true; + break; + } else if (word.includes(choice)) { + displayText = true; + for (let i = 0; i < word.length; i++) { + if (word.charAt(i) !== choice) continue; // eslint-disable-line max-depth + confirmation.push(word.charAt(i)); + display[i] = word.charAt(i); + } + } else { + displayText = false; + if (choice.length === 1) incorrect.push(choice); + points++; + } + } + playing.delete(interaction.channel.id); + if (word.length === confirmation.length || guessed) + return interaction.channel.send({ + content: `You won. The word is **${word}**!`, + }); + return interaction.channel.send({ + content: `You lost. The word is **${word}**.`, + }); + } catch (err) { + console.log(err); + playing.delete(interaction.channel.id); + } + }, +}; diff --git a/command/Fun/kiss.js b/command/Fun/kiss.js @@ -1,4 +1,4 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); +const { MessageEmbed } = require("discord.js"); module.exports = { name: "kiss", description: "Kiss someone", diff --git a/command/Fun/meme.js b/command/Fun/meme.js @@ -1,5 +1,5 @@ const { MessageEmbed } = require("discord.js"); -const fetch = require("node-fetch"); +const { getreddit } = require("cath"); module.exports = { name: "meme", category: "Fun", @@ -7,29 +7,22 @@ module.exports = { run: async (client, interaction, args) => { let subreddits = ["comedyheaven", "dank", "meme", "memes"]; let subreddit = subreddits[Math.floor(Math.random() * subreddits.length)]; - fetch(`https://www.reddit.com/r/${subreddit}/random/.json`).then( - async res => { - let content = await res.json(); - let permalink = content[0].data.children[0].data.permalink; - let memeURL = `https://reddit.com${permalink}`; - let memeImage = content[0].data.children[0].data.url; - let memeTitle = content[0].data.children[0].data.title; - let memeUpvotes = content[0].data.children[0].data.ups; - let memeDownvotes = content[0].data.children[0].data.downs; - let memeNumComments = content[0].data.children[0].data.num_comments; - const memeEmbed = new MessageEmbed() - .setTitle(`${memeTitle}`) - .setAuthor( - interaction.member.user.tag, - interaction.user.displayAvatarURL({ dynamic: true }) - ) - .setURL(`${memeURL}`) - .setImage(memeImage) - .setTimestamp() - .setColor(client.color) - .setFooter(` 👍 ${memeUpvotes} 💬 ${memeNumComments}`); - await interaction.followUp({ embeds: [memeEmbed] }); - } - ); + const data = await getreddit(subreddit); + await interaction.followUp({ + embeds: [ + new MessageEmbed({ + title: data.title, + url: data.url, + image: { url: data.image }, + timestamp: Date.now(), + footer: { text: data.footer }, + color: client.color, + author: { + name: interaction.member.user.tag, + iconURL: interaction.user.displayAvatarURL({ dynamic: true }), + }, + }), + ], + }); }, }; diff --git a/command/Fun/simprate.js b/command/Fun/simprate.js @@ -0,0 +1,34 @@ +const { MessageEmbed } = require("discord.js"); + +module.exports = { + name: "simprate", + description: "Check how simp is the user", + usage: "(@User)", + category: "Fun", + options: [ + { + type: 6, + name: "user", + description: "The user you want to see", + required: true, + }, + ], + run: async (client, interaction, args) => { + let simp = Math.floor(Math.random() * 100); + let user = interaction.guild.members.cache.get(args[0]); + interaction.followUp({ + embeds: [ + new MessageEmbed() + .setTitle(`${user.user.username}'s simp rate`) + .setDescription(`${user.user.username} is a ${simp}% simp`) + .setColor(client.color) + .setFooter(`Made by ${client.author}`) + .setTimestamp() + .setAuthor( + `Requested by ${interaction.user.tag}`, + interaction.user.displayAvatarURL({ dynamic: true }) + ), + ], + }); + }, +}; diff --git a/command/Information/botinfo.js b/command/Information/botinfo.js @@ -2,13 +2,12 @@ const { MessageEmbed, version: djsversion } = require("discord.js"); const version = require("../../package.json").version; const { utc } = require("moment"); const os = require("os"); -const ms = require("ms"); module.exports = { name: "botinfo", description: "Check the info of the bot", category: "Information", type: "CHAT_INPUT", - run: async (client, interaction, args) => { + run: async (client, interaction, args, utils) => { const core = os.cpus()[0]; const embed = new MessageEmbed() .setURL(client.web) @@ -35,7 +34,7 @@ module.exports = { .addField( "System", `**❯ Platform:** ${process.platform} - **❯ Uptime:** ${ms(os.uptime() * 1000, { long: true })} + **❯ Uptime:** ${utils.timer(os.uptime() * 1000, { long: true })} **❯ CPU:** \u3000 Cores: ${os.cpus().length} \u3000 Model: ${core.model} diff --git a/command/Information/help.js b/command/Information/help.js @@ -64,7 +64,11 @@ module.exports = { "**Premium**", "**You can either boost support server or subscribe to developer's team [Ko-fi](https://ko-fi.com/cathteam) or gift a nitro to one of the developer team **" ) - .setFooter(`Made by ${client.author}`); + .setURL(client.web) + .setFooter( + `Requested by ${interaction.user.tag}`, + interaction.user.displayAvatarURL({ dynamic: true }) + ); const components = state => [ new Discord.MessageActionRow().addComponents( new Discord.MessageSelectMenu() diff --git a/command/Moderation/purge.js b/command/Moderation/purge.js @@ -19,49 +19,69 @@ module.exports = { ], type: "CHAT_INPUT", run: async (client, interaction, args) => { - let query = interaction.options.get("amount"); - let ch = interaction.options.get("channel"); - let channel = interaction.guild.channels.cache.get(ch.value); - if (query.value > 100) { - return interaction.followUp({ - content: "The amount of messages must be in range of 1-100", + try { + let query = interaction.options.get("amount"); + let ch = interaction.options.get("channel"); + let channel = interaction.guild.channels.cache.get(ch.value); + if (query.value > 100) { + return interaction.followUp({ + content: "The amount of messages must be in range of 1-100", + }); + } + if (channel.type !== "GUILD_TEXT") { + return interaction.followUp({ + content: "Please provide a text channel instead of voice or category", + }); + } + const limit = await interaction.channel.messages.fetch({ + limit: query.value, }); - } - if (channel.type !== "GUILD_TEXT") { - return interaction.followUp({ - content: "Please provide a text channel instead of voice or category", - }); - } - await channel.bulkDelete(query.value, true).then(async m => { - const msg = await channel.send({ - embeds: [ - new MessageEmbed() - .setTitle(`Message Cleared`) - .addField( - "**Moderator**", - `${ + await channel.bulkDelete(limit, true).then(async m => { + const results = {}; + for (const [, deleted] of m) { + const user = `${deleted.author.username}#${deleted.author.discriminator}`; + if (!results[user]) results[user] = 0; + results[user]++; + } + const userMessageMap = Object.entries(results); + channel.send({ + embeds: [ + new MessageEmbed() + .setTitle(`Message Cleared`) + .addField( + "**Moderator**", + `${ + interaction.member.nickname + ? interaction.member.nickname + : interaction.user.username + }`, + true + ) + .addField( + "Amount of Message Deleted", + `${m.size}/${query.value}`, + true + ) + .addField( + "Authors", + `${userMessageMap + .map(([user, messages]) => `**${user}** : ${messages}`) + .join("\n")}`, + false + ) + .setTimestamp() + .setFooter( interaction.member.nickname ? interaction.member.nickname - : interaction.user.username - }`, - true - ) - .addField( - "Amount of Message Deleted", - `${m.size}/${query.value}`, - true - ) - .setTimestamp() - .setFooter( - interaction.member.nickname - ? interaction.member.nickname - : interaction.user.username, - interaction.user.displayAvatarURL({ dynamic: true }) - ) - .setColor(client.color), - ], + : interaction.user.username, + interaction.user.displayAvatarURL({ dynamic: true }) + ) + .setColor(client.color), + ], + }); }); - setTimeout(() => msg.delete(), 10000); - }); + } catch (e) { + console.log(e); + } }, }; diff --git a/command/Moderation/slowmode.js b/command/Moderation/slowmode.js @@ -0,0 +1,102 @@ +const Discord = require("discord.js"); +module.exports = { + name: "slowmode", + UserPerm: "MANAGE_CHANNELS", + description: "Set slowmode at a specific channel", + BotPerm: "MANAGE_CHANNELS", + usage: "(Time)", + category: "Moderation", + run: async (client, interaction, args, utils) => { + await interaction.deleteReply(); + const menu = new Discord.MessageSelectMenu() + .setCustomId("select") + .setPlaceholder("Select a time") + .addOptions([ + { label: "OFF", value: "OFF" }, + { label: "5s", value: "5s" }, + { label: "10s", value: "10s" }, + { label: "15s", value: "15s" }, + { label: "30s", value: "30s" }, + { label: "1m", value: "1m" }, + { label: "2m", value: "2m" }, + { label: "5m", value: "5m" }, + { label: "10m", value: "10m" }, + { label: "15m", value: "15m" }, + { label: "30m", value: "30m" }, + { label: "1h", value: "1h" }, + { label: "2h", value: "2h" }, + { label: "6h", value: "6h" }, + ]); + let row = new Discord.MessageActionRow().addComponents(menu); + const slowmoEmbed = new Discord.MessageEmbed() + .setColor(client.color) + .setTitle("Slowmode") + .setFooter(`Made by ${client.author}`) + .setTimestamp() + .setAuthor( + `Requested by ${interaction.user.tag}`, + interaction.user.displayAvatarURL({ dynmiac: true }) + ); + interaction.channel + .send({ embeds: [slowmoEmbed], components: [row] }) + .then(sent => { + const filter = i => { + i.deferUpdate(); + if (i.user.id === interaction.user.id) return true; + return; + }; + const collector = sent.createMessageComponentCollector({ + filter, + componentType: "SELECT_MENU", + time: 30e3, + }); + + collector.on("collect", collected => { + collector.resetTimer({ time: 30e3 }); + menu.setPlaceholder(`Set to: ${collected.values[0]}`); + row = new Discord.MessageActionRow().addComponents(menu); + if (collected.values[0] !== "OFF") { + const embed = new Discord.MessageEmbed() + .setColor("GREEN") + .setTitle("Slowmode Added") + .addField("**Moderator**", interaction.user.tag, true) + .addField("**Channel**", `<#${interaction.channel.id}>`, true) + .addField( + "**Rate**", + `${utils.ms(utils.ms(collected.values[0]), { long: true })}`, + true + ) + .setFooter( + interaction.member.displayName || interaction.user.username, + interaction.user.displayAvatarURL({ dynamic: true }) + ) + .setThumbnail(client.user.displayAvatarURL()); + interaction.channel.setRateLimitPerUser( + utils.ms(collected.values[0]) / 1e3 + ); + return sent.edit({ embeds: [embed], components: [row] }); + } else { + const embed = new Discord.MessageEmbed() + .setColor("RED") + .setTitle("Slowmode Removed") + .addField("**Moderator**", interaction.user.tag, true) + .addField("**Channel**", `<#${interaction.channel.id}>`, true) + .setFooter( + interaction.member.displayName || interaction.user.username, + interaction.user.displayAvatarURL({ dynamic: true }) + ) + .setThumbnail(client.user.displayAvatarURL()) + .setColor("RED"); + interaction.channel.setRateLimitPerUser(0); + return sent.edit({ embeds: [embed], components: [row] }); + } + }); + + collector.on("end", () => { + menu.setDisabled(true); + row = new Discord.MessageActionRow().addComponents(menu); + return sent.edit({ components: [row] }); + }); + }); + }, +}; diff --git a/command/Owner/eval.js b/command/Owner/eval.js @@ -71,7 +71,8 @@ module.exports = { (evaled.length === 1 ? ["❌", "⏹️"] : reactions).some( e => e === reaction.emoji.name ) && user.id === interaction.user.id; - let collector = mainMessage.createReactionCollector(filter, { + let collector = mainMessage.createReactionCollector({ + filter, time: 300000, }); collector.on("collect", async (reaction, user) => { diff --git a/command/Owner/restart.js b/command/Owner/restart.js @@ -4,10 +4,11 @@ module.exports = { description: "Restart the bot", Owner: true, run: async (client, interaction, args) => { + await interaction.deleteReply(); const msg = await interaction.channel.send("Restarting..."); await client.destroy(); await client.login(process.env.TOKEN); await msg.delete(); - await interaction.followUp("Restarted"); + await interaction.channel.send("Restarted"); }, }; diff --git a/command/Utilities/docs.js b/command/Utilities/docs.js @@ -1,4 +1,4 @@ -const fetch = require("node-fetch"); +const axios = require("axios"); module.exports = { name: "docs", usage: "(Query)", @@ -14,11 +14,12 @@ module.exports = { ], run: async (client, interaction, args) => { const query = args.join(" "); - fetch( - `https://djsdocs.sorta.moe/v2/embed?src=stable&q=${encodeURIComponent( - query - )}` - ) + await axios + .get( + `https://djsdocs.sorta.moe/v2/embed?src=stable&q=${encodeURIComponent( + query + )}` + ) .then(res => res.json()) .then(async data => { await interaction.followUp({ embeds: [data] }); diff --git a/command/Utilities/github.js b/command/Utilities/github.js @@ -0,0 +1,59 @@ +const { MessageEmbed } = require("discord.js"); +const moment = require("moment"); +const axios = require("axios"); +module.exports = { + name: "github", + description: `Get Github User Information`, + options: [ + { + type: 3, + name: "username", + description: "The username you want to search", + required: true, + }, + ], + run: async (client, interaction, args) => { + try { + axios + .get(`https://api.github.com/users/${args[0]}`) + .then(res => res.data) + .then(body => { + if (body.message) + return interaction.followUp({ content: "User Not Found" }); + let { + login, + avatar_url, + name, + id, + html_url, + public_repos, + followers, + following, + location, + created_at, + bio, + } = body; + const embed = new MessageEmbed() + .setAuthor(`${login} Information`, avatar_url) + .setColor(client.color) + .setThumbnail(`${avatar_url}`) + .setTimestamp() + .addField(`Username`, `${login}`) + .addField(`ID`, `${id}`) + .addField(`Bio`, `${bio || "None"}`) + .addField(`Public Repositories`, `${public_repos || "None"}`, true) + .addField(`Followers`, `${followers}`, true) + .addField(`Following`, `${following}`, true) + .addField(`Location`, `${location || "None"}`) + .addField( + `Account Created`, + moment.utc(created_at).format("dddd, MMMM, Do YYYY") + ) + .setFooter(`Made by ${client.author}`); + interaction.followUp({ embeds: [embed] }); + }); + } catch (error) { + console.log(error); + } + }, +}; diff --git a/command/Utilities/rank.js b/command/Utilities/rank.js @@ -0,0 +1,303 @@ +const Levels = require("discord-xp"); +const Canvas = require("canvas"), + Discord = require(`discord.js`); +const { registerFont } = require("canvas"); +registerFont("./util/assets/fonts/Poppins-Regular.ttf", { + family: "Poppins-Regular", +}); +registerFont("./util/assets/fonts/Poppins-SemiBold.ttf", { + family: "Poppins-Bold", +}); +module.exports = { + name: "rank", + description: "Shows an image of someone's ranking", + type: "CHAT_INPUT", + options: [ + { + type: 6, + name: "user", + description: "The user you want to see", + required: false, + }, + ], + run: async (client, interaction, args) => { + const badges = [1, 8]; + for (let i = badges[0]; i <= badges[1]; i++) client[`badge${i}`] = null; + setBadge = function (variable, value) { + const number = Number(variable); + for (let i = badges[0]; i <= badges[1]; i++) + if (number === i) { + client[`badge${number}`] = value; + break; + } + return client; + }; + + const member = + interaction.guild.members.cache.get(args[0]) || interaction.member; + + const user = await Levels.fetch(member.id, interaction.guild.id); + console.log(user); + const canvas = Canvas.createCanvas(1080, 400), + ctx = canvas.getContext("2d"); + + let BackgroundRadius = "50", //50 | 0 if u want no rounded background | 50 if u want a very rounded background + BackGroundImg = "https://images7.alphacoders.com/109/1092420.jpg", + AttachmentName = "rank.png", + Username = member.user.username, + AvatarRoundRadius = "50", // 30 if u want squared round Avatar | 100 IF u want rounded + DrawLayerColor = "#000000", + DrawLayerOpacity = "0.4", + BoxColor = "#6eaedb", //Lvl and REP Box COlor + LevelBarFill = "#ffffff", // + LevelBarBackground = "#ffffff", + Rank = user.position, + TextEXP = "20XP", + TextReputation = "+ 2.18k rep", + BarRadius = "15", + TextXpNeded = "{current}/{needed}", + CurrentXP = user.xp, + NeededXP = Levels.xpFor(parseInt(user.level) + 1); + + //SET BADGES + //setBadge("1", "Bronze") // .png | file name need to be Number_Name in this case is "1_bronze" + //setBadge("2", "Gold") // .png | file name need to be Number_Name in this case is "2_Gold" + //SET BADGES + + //BackGround + ctx.beginPath(); + ctx.moveTo(0 + Number(BackgroundRadius), 0); + ctx.lineTo(0 + 1080 - Number(BackgroundRadius), 0); + ctx.quadraticCurveTo(0 + 1080, 0, 0 + 1080, 0 + Number(BackgroundRadius)); + ctx.lineTo(0 + 1080, 0 + 400 - Number(BackgroundRadius)); + ctx.quadraticCurveTo( + 0 + 1080, + 0 + 400, + 0 + 1080 - Number(BackgroundRadius), + 0 + 400 + ); + + ctx.lineTo(0 + Number(BackgroundRadius), 0 + 400); + ctx.quadraticCurveTo(0, 0 + 400, 0, 0 + 400 - Number(BackgroundRadius)); + ctx.lineTo(0, 0 + Number(BackgroundRadius)); + ctx.quadraticCurveTo(0, 0, 0 + Number(BackgroundRadius), 0); + ctx.closePath(); + ctx.clip(); + ctx.fillStyle = "#000000"; + ctx.fillRect(0, 0, 1080, 400); + let background = await Canvas.loadImage(BackGroundImg); + ctx.drawImage(background, 0, 0, 1080, 400); + ctx.restore(); + + //Layer + ctx.fillStyle = DrawLayerColor; + ctx.globalAlpha = DrawLayerOpacity; + ctx.fillRect(40, 0, 240, canvas.height); + ctx.globalAlpha = 1; + + //RoundedBox Function + function RoundedBox(ctx, x, y, width, height, radius) { + ctx.beginPath(); + ctx.moveTo(x + radius, y); + ctx.lineTo(x + width - radius, y); + ctx.quadraticCurveTo(x + width, y, x + width, y + radius); + ctx.lineTo(x + width, y + height - radius); + ctx.quadraticCurveTo( + x + width, + y + height, + x + width - radius, + y + height + ); + ctx.lineTo(x + radius, y + height); + ctx.quadraticCurveTo(x, y + height, x, y + height - radius); + ctx.lineTo(x, y + radius); + ctx.quadraticCurveTo(x, y, x + radius, y); + ctx.closePath(); + } + + //Avatar + let avatar = await Canvas.loadImage( + member.user.displayAvatarURL({ dynamic: true, format: "png" }) + ); + ctx.save(); + RoundedBox(ctx, 40 + 30, 30, 180, 180, Number(AvatarRoundRadius)); + ctx.strokeStyle = "#BFC85A22"; + ctx.stroke(); + ctx.clip(); + ctx.drawImage(avatar, 40 + 30, 30, 180, 180); + ctx.restore(); + //Avatar + + //Reputation + ctx.save(); + RoundedBox(ctx, 40 + 30, 30 + 180 + 30, 180, 50, 10); + ctx.strokeStyle = "#BFC85A22"; + ctx.stroke(); + ctx.clip(); + ctx.fillStyle = BoxColor; + ctx.globalAlpha = "1"; + ctx.fillRect(40 + 30, 30 + 180 + 30, 180, 50, 50); + ctx.globalAlpha = 1; + ctx.fillStyle = "#ffffff"; + ctx.shadowColor = "#000000"; + ctx.shadowBlur = 20; + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 1; + ctx.font = '32px "Poppins-Bold"'; + ctx.textAlign = "center"; + ctx.fillText(TextReputation, 40 + 30 + 180 / 2, 30 + 180 + 30 + 38); + ctx.restore(); + //Reputation + + //EXP + ctx.save(); + RoundedBox(ctx, 40 + 30, 30 + 180 + 30 + 50 + 30, 180, 50, 10); + ctx.strokeStyle = "#BFC85A22"; + ctx.stroke(); + ctx.clip(); + ctx.fillStyle = BoxColor; + ctx.globalAlpha = "1"; + ctx.fillRect(40 + 30, 30 + 180 + 30 + 50 + 30, 180, 50); + ctx.globalAlpha = 1; + ctx.fillStyle = "#ffffff"; + ctx.shadowColor = "#000000"; + ctx.shadowBlur = 20; + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 1; + ctx.font = '32px "Poppins-Bold"'; + ctx.textAlign = "center"; + ctx.fillText(TextEXP, 40 + 30 + 180 / 2, 30 + 180 + 30 + 30 + 50 + 38); + ctx.restore(); + //EXP + + //ctx.save() + //ctx.textAlign = "left"; + //ctx.fillStyle = "#ffffff"; + //ctx.shadowColor = '#000000'; + //ctx.font = '15px "Poppins-Bold"' + //ctx.fillText(member.user.username, 390, 200); + //ctx.restore() + + //Username + ctx.save(); + ctx.textAlign = "left"; + ctx.fillStyle = "#ffffff"; + ctx.shadowColor = "#000000"; + ctx.shadowBlur = 15; + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 1; + ctx.font = '39px "Poppins-Bold"'; + ctx.fillText(Username, 390, 80); + ctx.restore(); + //Username + + //Rank + ctx.save(); + ctx.textAlign = "right"; + ctx.fillStyle = "#ffffff"; + ctx.shadowColor = "#000000"; + ctx.shadowBlur = 15; + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 1; + ctx.font = '55px "Poppins-Bold"'; + ctx.fillText("#" + Rank, canvas.width - 50 - 5, 80); + ctx.restore(); + + //Rank Name + ctx.save(); + ctx.textAlign = "left"; + ctx.fillStyle = "#ffffff"; + ctx.shadowColor = "#000000"; + ctx.shadowBlur = 15; + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 1; + ctx.font = '30px "Poppins-Bold"'; + ctx.fillText("Diamond Nature", 390, 120); + ctx.restore(); + + //Badges + ctx.save(); + RoundedBox(ctx, 390, 305, 660, 70, Number(15)); + ctx.strokeStyle = "#BFC85A22"; + ctx.stroke(); + ctx.clip(); + ctx.fillStyle = "#ffffff"; + ctx.globalAlpha = "0.2"; + ctx.fillRect(390, 305, 660, 70); + ctx.restore(); + const badgeNames = ["1", "2", "3", "4", "5", "6", "7", "8"]; + for (let index = 0; index < badgeNames.length; index++) { + let badge = `badge${index + 1}`; + if (!client[badge]) { + ctx.fillStyle = "#ffffff"; + ctx.globalAlpha = "0.2"; + ctx.textAlign = "center"; + ctx.font = '90px "Poppins-Bold"'; + ctx.fillText(".", 75 * index + 450, 345); + } else { + ctx.globalAlpha = 1; + let badgeImg = await Canvas.loadImage( + ["bronze", "silver", "gold", "diamond"].includes( + client[badge].toLowerCase() + ) + ? `${__dirname}/${badgeNames[index]}_${client[ + badge + ].toLowerCase()}.png` + : client[badge] + ); + ctx.drawImage(badgeImg, 75 * index + 420, 315, 50, 50); + } + } + //Badges + + //Level Bar + ctx.save(); + RoundedBox(ctx, 390, 145, 660, 50, Number(BarRadius)); + ctx.strokeStyle = "#BFC85A22"; + ctx.stroke(); + ctx.clip(); + ctx.fillStyle = LevelBarBackground; + ctx.globalAlpha = "0.2"; + ctx.fillRect(390, 145, 660, 50, 50); + ctx.restore(); + + const percent = (100 * CurrentXP) / NeededXP; + const progress = (percent * 660) / 100; + + ctx.save(); + RoundedBox(ctx, 390, 145, progress, 50, Number(BarRadius)); + ctx.strokeStyle = "#BFC85A22"; + ctx.stroke(); + ctx.clip(); + ctx.fillStyle = LevelBarFill; + ctx.globalAlpha = "0.5"; + ctx.fillRect(390, 145, progress, 50, 50); + ctx.restore(); + + //Next Rank + ctx.save(); + ctx.textAlign = "left"; + ctx.fillStyle = "#ffffff"; + ctx.globalAlpha = "0.8"; + ctx.font = '30px "Poppins-Bold"'; + ctx.fillText("Next Rank: " + "None", 390, 230); + ctx.restore(); + + const latestXP = Number(CurrentXP) - Number(NeededXP); + const textXPEdited = TextXpNeded.replace(/{needed}/g, NeededXP) + .replace(/{current}/g, CurrentXP) + .replace(/{latest}/g, latestXP); + ctx.textAlign = "center"; + ctx.fillStyle = "#ffffff"; + ctx.globalAlpha = 1; + ctx.font = '30px "Poppins-Bold"'; + ctx.fillText(textXPEdited, 730, 180); + //Level Bar + + const attachment = new Discord.MessageAttachment( + canvas.toBuffer(), + AttachmentName + ); + await interaction.followUp({ files: [attachment] }); + }, +}; diff --git a/command/Utilities/timer.js b/command/Utilities/timer.js @@ -1,4 +1,3 @@ -const ms = require("ms"); const { MessageEmbed } = require("discord.js"); module.exports = { name: "timer", @@ -16,14 +15,18 @@ module.exports = { ], run: async (client, interaction, args, utils) => { const time = args[0]; - const mss = ms(args[0]); + const mss = utils.ms(args[0]); if (!time.endsWith("d")) { if (!time.endsWith("h")) { if (!time.endsWith("m")) { - if (!time.endsWith("s")) { - return await interaction.followUp({ - content: "You can only use valid time (Example: 3s)", - }); + if (!time.endsWith("w")) { + if (!time.endsWith("mo")) { + if (!time.endsWith("s")) { + return await interaction.followUp({ + content: "You can only use valid time (Example: 3s)", + }); + } + } } } } @@ -64,6 +67,6 @@ module.exports = { client.Timers.delete( interaction.user.id + " G " + interaction.guild.name ); - }, ms(time)); + }, utils.ms(time)); }, }; diff --git a/commands/Config/choices.js b/commands/Config/choices.js @@ -1,122 +0,0 @@ -const schema = require("../../models/modmail"); -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "choices", - UserPerm: "ADMINISTRATOR", - description: "Add choices for modmail in a server", - usage: "(add/list/rmv) (Emoji) {Text}", - category: "Config", - run: async (client, message, args) => { - schema.findOne({ Guild: message.guild.id }, async (err, data) => { - if (data) return; - else { - new schema({ - Guild: message.guild.id, - }).save(); - } - }); - if (args[0].toLowerCase() === "add") { - if (!args[1]) return client.err(message, "Config", "choices", 11); - if (!args[2]) return client.err(message, "Config", "choices", 12); - if (!args.slice(2).join(" ").length > 100) - return client.err(message, "Config", "choices", 13); - const config = await schema.findOne({ Guild: message.guild.id }); - if ( - !config || - !config.Choices || - !Object.entries(config.Choices).length - ) { - const choices = { - 0: { - emoji: args[1], - text: args.slice(2).join(" "), - }, - }; - schema.findOne({ Guild: message.guild.id }, async (err, data) => { - if (data) { - if (data.Choices) { - data.Choices = choices; - await schema.findOneAndUpdate({ Guild: message.guild.id }, data); - } else if (data.Guild) { - data.Choices = choices; - await schema.findOneAndUpdate({ Guild: message.guild.id }, data); - } else { - new schema({ - Guild: message.guild.id, - Choices: choices, - }).save(); - } - } - }); - return message.channel.send( - `${message.author.tag} has added ${args[1]} as a modmail choice` - ); - } else { - const choices = Object.entries(config.Choices); - if (choices.length >= 5) - return client.err(message, "Config", "choices", 14); - const last = choices[choices.length - 1]; - const parsed = config.Choices; - parsed[(parseInt(last[0]) + 1).toString()] = { - emoji: args[1], - text: args.slice(2).join(" "), - }; - schema.findOne({ Guild: message.guild.id }, async (err, data) => { - if (data) { - data.Choices = parsed; - await schema.findOneAndUpdate({ Guild: message.guild.id }, data); - } else { - new schema({ - Guild: message.guild.id, - Choices: parsed, - }).save(); - } - }); - return message.channel.send( - `${message.author.tag} has added ${args[1]} as a modmail choice` - ); - } - } - if (args[0].toLowerCase() === "list") { - const Data = await schema.findOne({ Guild: message.guild.id }); - if (!Data || !Data.Choices || !Object.entries(Data.Choices).length) - return client.err(message, "Config", "choices", 10); - else - return message.channel.send( - Object.entries(Data.Choices) - .map(value => { - return `${value[1].emoji}: ${value[1].text}`; - }) - .join("\n") - ); - } - if (args[0].toLowerCase() === "rmv") { - if (!args[1]) return client.err(message, "Config", "choices", 11); - schema.findOne({ Guild: message.guild.id }, async (err, data) => { - if (!data || !data.Choices || !Object.entries(data.Choices).length) - return client.err(message, "Config", "choices", 10); - const choices = Object.entries(data.Choices); - const found = choices.find(value => value[1].emoji == args[1]); - if (!found) return client.err(message, "Config", "choices", 15); - const filtered = choices.filter(value => value[1].emoji != args[1]); - const parsed = {}; - filtered.map(value => { - parsed[value[0]] = { - emoji: value[1].emoji, - text: value[1].text, - }; - }); - if (data) { - data.Choices = parsed; - await schema.findOneAndUpdate({ Guild: message.guild.id }, data); - } else { - new schema({ - Guild: message.guild.id, - Choices: parsed, - }).save(); - } - }); - return message.channel.send(`${args[1]} is removed from choices.`); - } - }, -}; diff --git a/commands/Config/modmail-category.js b/commands/Config/modmail-category.js @@ -1,30 +0,0 @@ -const schema = require("../../models/modmail"); -const { Client, Message, MessageEmbed } = require("discord.js"); - -module.exports = { - name: "modmail-category", - UserPerm: "ADMINISTRATOR", - description: "Setup modmail category in a server", - usage: "(Category ID)", - category: "Config", - run: async (client, message, args) => { - if (!args.length) - return client.err(message, "Config", "modmail-category", 0); - const category = message.guild.channels.cache.find( - ch => (ch.type = "category" && ch.id == args[0]) - ); - if (!category) return client.err(message, "Config", "modmail-category", 1); - schema.findOne({ Guild: message.guild.id }, async (err, data) => { - if (data) { - data.Category = category.id; - await schema.findOneAndUpdate({ Guild: message.guild.id }, data); - } else { - new schema({ - Guild: message.guild.id, - Category: category.id, - }).save(); - } - }); - return message.channel.send(`**Saved category to ${category.name}**`); - }, -}; diff --git a/commands/Config/modmail-role.js b/commands/Config/modmail-role.js @@ -1,27 +0,0 @@ -const schema = require("../../models/modmail"); - -module.exports = { - name: "modmail-role", - UserPerm: "ADMINISTRATOR", - description: "Add role for modmail in a server", - usage: "(Role)", - category: "Config", - run: async (client, message, args) => { - if (!args.length) return client.err(message, "Config", "modmail-role", 0); - const role = - message.mentions.roles.first() || message.guild.roles.cache.get(args[0]); - if (!role) return client.err(message, "Config", "modmail-role", 404); - schema.findOne({ Guild: message.guild.id }, async (err, data) => { - if (data) { - data.Role = role.id; - await schema.findOneAndUpdate({ Guild: message.guild.id }, data); - } else { - new schema({ - Guild: message.guild.id, - Role: role.id, - }).save(); - } - }); - return message.channel.send(`Updated **${role.name}** as the modmail role`); - }, -}; diff --git a/commands/Config/prefix-reset.js b/commands/Config/prefix-reset.js @@ -1,17 +1,16 @@ const schema = require("../../models/guilds"); const prefix = require("../../config.json").prefix; -const { confirmation } = require("@reconlx/discord.js"); module.exports = { name: "prefix-reset", aliases: ["pr"], description: 'Reset the prefix to "C." at the server', UserPerm: "ADMINISTRATOR", category: "Config", - run: async (client, message) => { + run: async (client, message, args, utils) => { message.channel - .send("**Do you want to reset your prefix?**") + .send({ content: "**Do you want to reset your prefix?**" }) .then(async msg => { - const emoji = await confirmation( + const emoji = await utils.confirmation( msg, message.author, ["✅", "❌"], @@ -25,11 +24,13 @@ module.exports = { await schema.findOneAndUpdate({ Guild: message.guild.id }, data); } }); - message.channel.send(`The prefix has been reset to **${prefix}**`); + message.channel.send({ + content: `The prefix has been reset to **${prefix}**`, + }); } if (emoji === "❌") { msg.delete(); - message.channel.send("Cancelled."); + message.channel.send({ content: "Cancelled." }); } }); }, diff --git a/commands/Config/rr-rmv.js b/commands/Config/rr-rmv.js @@ -1,34 +0,0 @@ -const { Client, Message } = require("discord.js"); -const Schema = require("../../models/reaction"); -const { confirmation } = require("@reconlx/discord.js"); -module.exports = { - name: "rr-rmv", - UserPerm: "ADMINISTRATOR", - description: "Remove reaction role for server", - category: "Config", - run: async (client, message, args) => { - message.channel - .send("**Do you want to remove the reaction roles?**") - .then(async msg => { - Schema.findOne({ Guild: message.guild.id }, async (err, data) => { - if (err) throw err; - if (!data) return client.err(message, "Config", "rr-rmv", 10); - }); - const emoji = await confirmation( - msg, - message.author, - ["✅", "❌"], - 10000 - ); - if (emoji === "✅") { - msg.delete(); - await Schema.findOneAndDelete({ Guild: message.guild.id }); - message.channel.send(`Removed reaction roles for this server.`); - } - if (emoji === "❌") { - msg.delete(); - message.channel.send("Cancelled."); - } - }); - }, -}; diff --git a/commands/Economy/bal.js b/commands/Economy/bal.js @@ -1,29 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "balance", - aliases: ["bal"], - usage: "(User)", - category: "Economy", - run: async (client, message, args) => { - const user = - message.mentions.members.first() || - message.guild.members.cache.get(args[0]) || - message.guild.members.cache.find( - r => - r.user.username.toLowerCase() === args.join(" ").toLocaleLowerCase() - ) || - message.guild.members.cache.find( - r => r.displayName.toLowerCase() === args.join(" ").toLocaleLowerCase() - ) || - message.member; - const bal = await client.bal(user.id); - let embed = new MessageEmbed() - .addField(`${client.currency} Balance`, `**${bal}**`) - .setColor(client.color) - .setURL(client.web) - .setTitle(`${user.displayName}'s Balance`) - .setTimestamp() - .setFooter(`Requested by ${message.author.tag}`); - message.inlineReply(embed); - }, -}; diff --git a/commands/Economy/bet.js b/commands/Economy/bet.js @@ -1,52 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "gamble", - aliases: ["bet"], - usage: "(Number)", - timeout: 5000, - description: "Win double amount of coins or lose all coins", - category: "Economy", - run: async (client, message, args) => { - const max = 1000000; - if (!args[0]) { - return client.err(message, "Economy", "bet", 5); - } - if (isNaN(args[0])) { - return client.err(message, "Economy", "bet", 7); - } - const amt = parseInt(args[0]); - if ((await client.bal(message.author.id)) < amt) { - return client.err(message, "Economy", "bet", 20); - } - if (amt > max) { - return client.err(message, "Economy", "bet", 101); - } - if (client.function.random() === true) { - const winamt = amt * 1; - await client.add(message.author.id, winamt, message); - await client.ADDBWin(message.author.id); - const abc = new MessageEmbed() - .setColor("GREEN") - .setTimestamp() - .setTitle(`${message.author.username} wins a gamble game`) - .setDescription( - `You win\n**${winamt}**${client.currency}\nYou now have **${ - parseInt(await client.bal(message.author.id)) - amt - }**${client.currency}` - ); - message.reply(abc); - } else { - await client.rmv(message.author.id, amt); - const cba = new MessageEmbed() - .setColor("RED") - .setTimestamp() - .setTitle(`${message.author.username} loses a gamble game`) - .setDescription( - `You lost\n**${amt}**${client.currency}\nYou now have **${ - parseInt(await client.bal(message.author.id)) - amt - }**${client.currency}` - ); - message.reply(cba); - } - }, -}; diff --git a/commands/Economy/daily.js b/commands/Economy/daily.js @@ -1,46 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "daily", - description: "Earns daily money", - category: "Economy", - timeout: 1000 * 60 * 60 * 24, - run: async (client, message, args) => { - var money; - const user = await client.data.getUser(message.author.id); - if (user) { - if (user.Premium == true) { - money = 20000; - let pre_embed = new MessageEmbed() - .setAuthor( - message.author.tag, - message.author.displayAvatarURL({ dyanmic: true }) - ) - .setDescription( - `**Here is your daily ${money}${client.currency}!\nThanks for supporting Cath!**` - ) - .setURL(client.web) - .setColor(client.color) - .setFooter(`Made by ${client.author}`) - .setTimestamp(); - await client.add(message.author.id, money, message); - return message.inlineReply(pre_embed); - } else { - money = 10000; - let norm_embed = new MessageEmbed() - .setAuthor( - message.author.tag, - message.author.displayAvatarURL({ dyanmic: true }) - ) - .setDescription( - `Here is your daily ${money}${client.currency}!\nBe [premium](https://discord.gg/SbQHChmGcp) user, you can get more coins everyday!` - ) - .setURL(client.web) - .setColor(client.color) - .setFooter(`Made by ${client.author}`) - .setTimestamp(); - await client.add(message.author.id, money, message); - return message.inlineReply(norm_embed); - } - } - }, -}; diff --git a/commands/Economy/inv.js b/commands/Economy/inv.js @@ -1,57 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -const inv = require("../../models/econ"); -const util = require("../../util/pagination/pagination"); -module.exports = { - name: "inventory", - aliases: ["inv"], - description: "Check the inventory of an user", - usage: "{User}", - category: "Economy", - timeout: 5000, - run: async (client, message, args) => { - const p = await client.prefix(message); - const user = - message.mentions.users.first() || - message.guild.members.cache.get(args[0]) || - message.guild.members.cache.find( - r => - r.user.username.toLowerCase() === args.join(" ").toLocaleLowerCase() - ) || - message.guild.members.cache.find( - r => r.displayName.toLowerCase() === args.join(" ").toLocaleLowerCase() - ) || - message.member; - inv.findOne({ User: user.id }, async (err, data) => { - if (data) { - if (!data.Inventory) - return client.err(message, "Economy", "inv", 25); - if (data.Inventory === undefined) return client.err(message, "Economy", "inv", 25) - const mappedData = Object.keys(data.Inventory).map(key => { - if (data.Inventory[key] == 0) { - return; - } - return `\n**${key}** — ${data.Inventory[key]}`; - }); - - if (mappedData.length == 0) { - return client.err(message, "Economy", "inv", 25); - } - const c = util.chunk(mappedData, 5).map(x => x.join("\n")); - const embed = new MessageEmbed() - .setTimestamp() - .setTitle(`${user.displayName}'s inventory`) - .setColor("client.color") - .setDescription(c[0]) - .setFooter(`Page 1 of ${c.length}`); - try { - const msg = await message.channel.send(embed); - if (mappedData.length > 5) - await util.pagination(msg, message.author, c); - } catch (e) { - console.log(e); - } - } - else return client.err(message, "Economy", "inv", 25); - }); - } -} -\ No newline at end of file diff --git a/commands/Economy/lb.js b/commands/Economy/lb.js @@ -1,35 +0,0 @@ -const Levels = require("discord-xp"); -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "leaderboard", - aliases: ["lb"], - timeout: 5000, - usage: "Check the leaderboard of a server", - category: "Economy", - Level: true, - run: async (client, message, args) => { - const rawLeaderboard = await Levels.fetchLeaderboard(message.guild.id, 10); - if (rawLeaderboard.length < 1) - return client.err(message, "Economy", "lb", 10); - const leaderboard = await Levels.computeLeaderboard( - client, - rawLeaderboard, - true - ); - const lb = leaderboard.map( - e => - `**${e.position}**. ${e.username}#${e.discriminator} Level: ${ - e.level - } XP: ${e.xp.toLocaleString()}` - ); - const embed = new MessageEmbed() - .setTitle(`**Leaderboard for ${message.guild.name}**`) - .setDescription(`\n${lb.join("\n")}`) - .setFooter( - `Requested by ${message.author.tag}`, - message.author.displayAvatarURL({ dynamic: true }) - ) - .setColor(client.color); - message.reply(embed); - }, -}; diff --git a/commands/Economy/profile.js b/commands/Economy/profile.js @@ -1,47 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "profile", - usage: "(User)", - description: "Check an user economy profile", - category: "Economy", - run: async (client, message, args, data, utils) => { - const user = - message.mentions.members.first() || - message.guild.members.cache.get(args[0]) || - message.guild.members.cache.find( - r => - r.user.username.toLowerCase() === args.join(" ").toLocaleLowerCase() - ) || - message.guild.members.cache.find( - r => r.displayName.toLowerCase() === args.join(" ").toLocaleLowerCase() - ) || - message.member; - const bjwin = await client.bjWin(message.author.id); - const swin = await client.sWin(message.author.id); - const bwin = await client.bWin(message.author.id); - const cmdused = await client.cmdsUSED(message.author.id); - const bal = await client.bal(message.author.id); - const multi = await client.multi(message); - const game = new MessageEmbed() - .setFooter( - `Requested by ${message.author.tag}`, - message.author.displayAvatarURL({ dynamic: true, size: 4096 }) - ) - .setColor("7196ef") - .setTitle(`${user.displayName}'s profile`) - .addField( - "**Stats**\n", - `🃏 Blackjack wins: \`${bjwin}\`\n` + - `🎰 Slots wins: \`${swin}\`\n` + - `🕹 Bet wins: \`${bwin}\`\n` + - `⌨️Commands used: \`${cmdused}\`\n` + - `Totalwins: \`${bjwin + swin + bwin}\``, - true - ) - .addField( - "**Balance**\n", - `💲CP: \`${bal}\`\n` + `➕Multiplier: \`${`1.${multi}x`}\`` - ); - message.reply(game); - }, -}; diff --git a/commands/Economy/shop.js b/commands/Economy/shop.js @@ -1,28 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -const util = require("../../util/pagination/pagination"); -const items = require("../../util/dist/item"); -module.exports = { - name: "shop", - description: "Check the items from the shop", - category: "Economy", - run: async (client, message, args) => { - const list = items.map((value, index) => { - return `**${value.item}** — ${value.price.toLocaleString()}${ - client.currency - }\nID: \`${value.id}\``; - }); - const c = util.chunk(list, 5).map(x => x.join("\n\n")); - const embed = new MessageEmbed() - .setTitle("**cath.exe shop**") - .setTimestamp() - .setDescription(c[0]) - .setColor(client.color) - .setFooter(`Page 1 of ${c.length}`); - try { - const msg = await message.channel.send(embed); - if (list.length > 5) await util.pagination(msg, message.author, c); - } catch (e) { - console.log(e); - } - }, -}; diff --git a/commands/Economy/slots.js b/commands/Economy/slots.js @@ -1,85 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "slots", - usage: "(Number)", - timeout: 5000, - description: "Win more coins by slots", - category: "Economy", - run: async (client, message, args) => { - const max = 1000000; - const slots = [ - "<:blushca:852174555513618502>", - "<:abusecat:853501068074942464>", - "<:dumbcat:855462498550415362>", - ]; - const slotOne = slots[Math.floor(Math.random() * slots.length)]; - const slotTwo = slots[Math.floor(Math.random() * slots.length)]; - const slotThree = slots[Math.floor(Math.random() * slots.length)]; - const slotfour = slots[Math.floor(Math.random() * slots.length)]; - const slotfive = slots[Math.floor(Math.random() * slots.length)]; - const slotsix = slots[Math.floor(Math.random() * slots.length)]; - const slotseven = slots[Math.floor(Math.random() * slots.length)]; - const sloteight = slots[Math.floor(Math.random() * slots.length)]; - const slotnine = slots[Math.floor(Math.random() * slots.length)]; - if (!args[0]) return client.err(message, "Economy", "slots", 5); - if (isNaN(args[0])) return client.err(message, "Economy", "slots", 7); - const amt = parseInt(args[0]); - if (amt > max) return client.err(message, "Economy", "slots", 101); - if ((await client.bal(message.author.id)) < amt) { - return client.err(message, "Economy", "slots", 20); - } - if ( - (slotOne === slotTwo && slotOne === slotThree) || - (slotfour === slotfive && slotfour === slotsix) || - (slotseven === sloteight && slotseven === slotnine) - ) { - const winamt = Math.floor(Math.random() * 2 * amt); - await client.add(message.author.id, winamt, message); - await client.ADDSWin(message.author.id); - const won = new MessageEmbed() - .setColor("GREEN") - .addField( - "|-----|-----|----|", - `| ${slotfour} | ${slotfive} | ${slotsix} |` - ) - .addField( - "|-----|-----|----|", - `| ${slotOne} | ${slotTwo} | ${slotThree} |` - ) - .addField( - "|-----|-----|----|", - `| ${slotseven} | ${sloteight} | ${slotnine} |` - ) - .setTitle(`${message.author.username} wins a slots game`) - .setDescription( - `You win\n**${winamt}**${client.currency}\nYou now have **${ - parseInt(await client.bal(message.author.id)) - amt - }**${client.currency}` - ); - message.reply(won); - } else { - await client.rmv(message.author.id, amt); - const lost = new MessageEmbed() - .setColor("RED") - .addField( - "|-----|-----|----|", - `| ${slotfour} | ${slotfive} | ${slotsix} |` - ) - .addField( - "|-----|-----|----|", - `| ${slotOne} | ${slotTwo} | ${slotThree} |` - ) - .addField( - "|-----|-----|----|", - `| ${slotseven} | ${sloteight} | ${slotnine} |` - ) - .setTitle(`${message.author.username} loses a slots game`) - .setDescription( - `You lost\n**${amt}**${client.currency}\nYou now have **${ - parseInt(await client.bal(message.author.id)) - amt - }**${client.currency}` - ); - message.reply(lost); - } - }, -}; diff --git a/commands/Economy/work.js b/commands/Economy/work.js @@ -1,25 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "work", - description: "Work to earn money", - category: "Economy", - timeout: 1000 * 60 * 10, - run: async (client, message, args) => { - const job = [ - "Software engineer", - "Programmer", - "Teacher", - "YouTuber", - "Student", - "Desginer", - "Editor", - "Banker", - ]; - const earning = client.function.rndint(5000, 3000); - const jobs = job[Math.floor(Math.random() * job.length)]; - await client.add(message.author.id, earning, message); - return message.reply( - `You worked as a **${jobs}** and earned **${earning}${client.currency}**` - ); - }, -}; diff --git a/commands/Fun/8ball.js b/commands/Fun/8ball.js @@ -1,56 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); - -const answers = [ - "Maybe.", - "Certainly not.", - "I hope so.", - "Not in your wildest dreams.", - "There is a good chance.", - "Quite likely.", - "I think so.", - "I hope not.", - "I hope so.", - "Never!", - "Fuhgeddaboudit.", - "Ahaha! Really?!?", - "Pfft.", - "Sorry, bucko.", - "Hell, yes.", - "Hell to the no.", - "The future is bleak.", - "The future is uncertain.", - "I would rather not say.", - "Who cares?", - "Possibly.", - "Never, ever, ever.", - "There is a small chance.", - "Yes!", -]; - -module.exports = { - name: "8ball", - usage: "(Question)", - description: "8ball an answer", - category: "Fun", - run: async (client, message, args) => { - if (!args.join(" ").endsWith("?")) - return client.err(message, "Fun", "8ball", 101); - else { - const embed = new MessageEmbed() - .setAuthor( - `🎱 ${message.member.displayName} asks`, - message.author.displayAvatarURL({ dynamic: true }) - ) - .setDescription( - `**🎱Question:** \n${args.join(" ")} \n**🎱Answer:** \n ${ - answers[Math.floor(Math.random() * answers.length)] - }` - ) - .setColor(client.color) - .setTimestamp() - .setURL(client.web) - .setFooter(`Made by ${client.author}`); - message.inlineReply(embed); - } - }, -}; diff --git a/commands/Fun/ascii.js b/commands/Fun/ascii.js @@ -1,21 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "ascii", - description: "Converts text into ASCII art", - category: "Fun", - /** - * @param {Client} client - * @param {Message} message - * @param {String[]} args - */ - run: async (client, message, args) => { - const figlet = require("figlet"); - if (!args[0]) return client.err(message, "Fun", "ascii", 12); - let msg = args.slice(0).join(" "); - figlet.text(msg, async (err, data) => { - if (err) console.log(err); - if (data.length > 2000) return client.err(message, "Fun", "ascii", 54); - message.channel.send(`\`\`\`${data}\`\`\``); - }); - }, -}; diff --git a/commands/Fun/cat.js b/commands/Fun/cat.js @@ -1,25 +0,0 @@ -const api = require("imageapi.js"); -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "cat", - aliases: ["cats"], - category: "Fun", - description: "A cat command", - run: async (client, message, args) => { - const wait = await message.inlineReply("Getting cat picture..."); - let subreddits = ["cat", "cats"]; - let subreddit = subreddits[Math.floor(Math.random() * subreddits.length)]; - const img = await api(subreddit).catch(err => console.log(err)); - const Embed = new MessageEmbed() - .setTitle(`A cat picture from r/${subreddit}`) - .setURL(`https://reddit.com/r/${subreddit}`) - .setColor(client.color) - .setImage(img) - .setTimestamp() - .setAuthor( - message.author.tag, - message.author.displayAvatarURL({ dynamic: true }) - ); - wait.edit("", { embed: Embed }); - }, -}; diff --git a/commands/Fun/coinflip.js b/commands/Fun/coinflip.js @@ -1,18 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "coinflip", - aliases: ["cf"], - description: "Flip a coin", - category: "Fun", - run: async (client, message, args) => { - let HT = ["Heads!", "Tails!"]; - let pick = HT[Math.floor(Math.random() * HT.length)]; - let embed = new MessageEmbed() - .setColor(client.color) - .setTitle("CoinFilp Game") - .setTimestamp() - .setFooter(`Made by ${client.author}`) - .setDescription(pick); - message.inlineReply(embed); - }, -}; diff --git a/commands/Fun/dino.js b/commands/Fun/dino.js @@ -1,102 +0,0 @@ -const Discord = require("discord.js"); -const ms = require("ms"); - -module.exports = { - name: "dinochrome", - aliases: ["dino"], - category: "Fun", - description: "Dinosaur in Chrome", - run: async (client, message, args) => { - let msg = await message.channel.send(`---------------🦖`); - let time = 1 * 1000; - - setTimeout(function () { - msg.edit(`-----------🦖----`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`----------🦖------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`--------🦖--------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`------🦖-----------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`-------🦖-----------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`---🌵-----🦖---------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`---🌵-🦖-------------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`🦖\n ---🌵--------------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`------🦖---🌵--------------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`----🦖-----🌵----------------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`-🌵🌵-----🦖-------🌵--------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`----🌵🌵-🦖----------🌵------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`🦖\n ---🌵🌵-------------🌵---`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`-----🦖---🌵🌵-------------🌵--`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`-------🦖-----🌵🌵-------------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`🎂----🦖--------🌵🌵-----------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`---🎂--🦖----------🌵🌵---------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function () { - msg.edit(`**Ⓜⓘⓢⓢⓘⓞⓝ Ⓒⓞⓜⓟⓛⓔⓣⓔⓓ !**\n ---🎂🦖----------🌵🌵-------------`); - }, time); - }, -}; diff --git a/commands/Fun/dog.js b/commands/Fun/dog.js @@ -1,25 +0,0 @@ -const api = require("imageapi.js"); -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "dog", - aliases: ["dogs"], - category: "Fun", - description: "A dog command", - run: async (client, message, args) => { - const wait = await message.inlineReply("Getting dog picture..."); - let subreddits = ["dog", "dogs"]; - let subreddit = subreddits[Math.floor(Math.random() * subreddits.length)]; - const img = await api(subreddit).catch(err => console.log(err)); - const Embed = new MessageEmbed() - .setTitle(`A dog picture from r/${subreddit}`) - .setURL(`https://reddit.com/r/${subreddit}`) - .setColor(client.color) - .setImage(img) - .setTimestamp() - .setAuthor( - message.author.tag, - message.author.displayAvatarURL({ dynamic: true }) - ); - wait.edit("", { embed: Embed }); - }, -}; diff --git a/commands/Fun/drake.js b/commands/Fun/drake.js @@ -1,24 +0,0 @@ -const { - Client, - Message, - MessageEmbed, - MessageAttachment, -} = require("discord.js"); -const fetch = require("node-fetch"); -module.exports = { - name: "drake", - description: "Drake meme", - usage: "(Text) (Text)", - category: "Fun", - run: async (client, message, args) => { - const t1 = args[0]; - const t2 = args.slice(1).join(" "); - const res = await fetch( - `https://frenchnoodles.xyz/api/endpoints/drake/?text1=${t1}&text2=${t2}`, - {} - ); - let i = await res.buffer(); - const drake = new MessageAttachment(i); - message.inlineReply(drake); - }, -}; diff --git a/commands/Fun/ds.js b/commands/Fun/ds.js @@ -1,18 +0,0 @@ -const fetch = require("node-fetch"); -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "ds", - aliases: ["doublestruck"], - description: "Doublestruck your text", - usage: "(text)", - category: "Fun", - run: async (client, message, args) => { - let text = args.join("+"); - if (!text) return client.err(message, "Fun", "ds", 12); - let res = await fetch( - "https://api.popcatdev.repl.co/doublestruck?text=" + text - ); - let json = await res.json(); - message.inlineReply(json.text); - }, -}; diff --git a/commands/Fun/emojify.js b/commands/Fun/emojify.js @@ -1,40 +0,0 @@ -module.exports = { - name: "emojify", - usage: "(Word)", - description: "Emojify a sentence", - run: async (client, message, args) => { - const mapping = { - " ": " ", - 0: ":zero:", - 1: ":one:", - 2: ":two:", - 3: ":three:", - 4: ":four:", - 5: ":five:", - 6: ":six:", - 7: ":seven:", - 8: ":eight:", - 9: ":nine:", - "!": ":grey_exclamation:", - "?": ":grey_question:", - "#": ":hash:", - "*": ":asterisk:", - }; - - "abcdefghijklmnopqrstuvwxyz".split("").forEach(c => { - mapping[c] = mapping[c.toUpperCase()] = ` :regional_indicator_${c}:`; - }); - - if (!args[0]) { - return client.err(message, "Fun", "emojify", 12); - } - message.channel.send( - args - .slice(0) - .join(" ") - .split("") - .map(c => mapping[c] || c) - .join("") - ); - }, -}; diff --git a/commands/Fun/hack.js b/commands/Fun/hack.js @@ -1,129 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "hack", - description: "Hack a user", - usage: "(User)", - category: "Fun", - run: async (client, message, args) => { - let answers = [ - "@yousuck.noob", - "@hesnoob.haha", - "@thisguy.suck", - "@paypal.removed", - "@noob.haha", - "@hacked.xyz", - "@susmate.com", - "@gmail.sus", - "@why-im.withyou", - "@someone-end.me", - "@isnoob.io", - "@username-is.noob", - "@hahaget.lost", - "@yahoo.sus", - "@botmail.zip", - "@gmail.com", - "@yahoo.com", - ]; - let passwords = [ - "Disb****", - "disc******", - "pass**********", - "get****", - "mails***", - "endm****", - "gamer***********", - "asegeio*********", - "whys*******", - "Brot******", - "imwith*******", - "luckyyougotthispasswordlolnocencor", - "starb*******", - "egghunt2***", - "secr*****", - ]; - let ips = [ - "10.313.523.502.00.1", - "25.537.753.462.29.2", - "21.175.866.974.07.08", - "32.653.587.825.35.5", - "12.172.764.781.22.8", - "91.723.242.452.09.3", - "92.743.116.896.85.6", - "84.091.000.853.54.7", - "51.071.124.129.12.0", - ]; - const answer = answers[Math.floor(Math.random() * answers.length)]; - const passwrd = passwords[Math.floor(Math.random() * passwords.length)]; - const ip = ips[Math.floor(Math.random() * ips.length)]; - const taggedUser = message.mentions.users.first(); - if (!taggedUser) { - return client.err(message, "Fun", "hack", 1); - } - message.channel.send(`Hacking ${taggedUser.username}...`); - message.channel.send("Status: ■□□□□□□□□□□ 0%").then(msg => { - client.function.sleep(100); - msg.edit("Status: ■■□□□□□□□□□ 7%: Hacking Email..."); - client.function.sleep(600); - msg.edit( - `Status: ■■■□□□□□□□□ 8%:\n \`Email: ${taggedUser.username}@yousuck.noob\`\n \`Password: ${passwrd}\` ` - ); - client.function.sleep(600); - msg.edit("Status: ■■□□□□□□□□□ 9%: Logging in to the Email..."); - client.function.sleep(2000); - msg.edit("Status: ■■■□□□□□□□□ 12%: Turning off the antivirus"); - client.function.sleep(1000); - msg.edit("Status: ■■■■□□□□□□ 14%: Downloading SYNAPSE X"); - client.function.sleep(100); - msg.edit("Status: ■■■□□□□□□□□ 17%: Deleting Captcha..."); - client.function.sleep(100); - msg.edit("Status: ■■□□□□□□□□□ 20%: Deleting Paypal account..."); - client.function.sleep(10); - msg.edit("Status: ■■■□□□□□□□□ 21%"); - client.function.sleep(12); - msg.edit("Status: ■■■■□□□□□□□ 22%"); - client.function.sleep(100); - msg.edit("Status: ■■■■■□□□□□□ 24%: Paypal account deleted"); - client.function.sleep(1000); - msg.edit("Status: ■■■■□□□□□□ 29%: Hacking is almost ready..."); - client.function.sleep(80); - msg.edit("Status: ■■■□□□□□□□□ 31%"); - client.function.sleep(80); - msg.edit("Status: ■■■■□□□□□□□ 36%"); - client.function.sleep(40); - msg.edit("Status: ■■■■■□□□□□□ 41%"); - client.function.sleep(60); - msg.edit("Status: ■■■■□□□□□□□ 47%"); - client.function.sleep(50); - msg.edit("Status: ■■■■■■□□□□□ 53%"); - client.function.sleep(3000); - msg.edit( - `Status: ■■■■■■■□□□□ 58%: Email password changed so ${taggedUser.username} can not login` - ); - client.function.sleep(500); - msg.edit("Status: ■■■■■■□□□□□ 66%"); - client.function.sleep(60); - msg.edit("Status: ■■■■■□□□□□□ 74%"); - client.function.sleep(20); - msg.edit(`Status: ■■■■■□□□□□□ 79%: IP address found: ${ip}`); - client.function.sleep(83); - msg.edit("Status: ■■■■■■□□□□ 80%"); - client.function.sleep(50); - msg.edit("Status: ■■■■■■■□□□ 85%"); - client.function.sleep(14); - msg.edit("Status: ■■■■■■■■■□□ 93%"); - client.function.sleep(70); - msg.edit("Status: ■■■■■■■■■■□ 97%"); - client.function.sleep(90); - msg.edit("Status: ■■■■■■■■■■■ 100%").then(() => { - const embed = new MessageEmbed() - .setDescription(`${taggedUser} has been hacked!`) - .addField("Email", `${taggedUser.username}${answer}`) - .addField("Password", `${passwrd}`) - .addField("IP address", `${ip}`) - .setFooter(`Made by ${client.author}`) - .setColor("020203a"); - message.channel.send(embed); - }); - }); - }, -}; diff --git a/commands/Fun/hangman.js b/commands/Fun/hangman.js @@ -1,87 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -const { stripIndents } = require("common-tags"); -const { get } = require("node-superfetch"); -const playing = new Set(); -module.exports = { - name: "hangman", - description: "Play a hangman game", - category: "Fun", - run: async (client, message, args) => { - if (playing.has(message.channel.id)) - return message.reply("Only one game may be occurring per channel."); - playing.add(message.channel.id); - try { - const { body } = await get("https://emilia-api.xyz/api/hangman").set( - "Authorization", - `Bearer MzU2MDA1NzA4MTQ5NTU1MjAy.5r4BVOkZX8L1ial8chloqopkphU0w19us0UbqgxOQOo` - ); - const word = body.word; - let points = 0; - let displayText = null; - let guessed = false; - const confirmation = []; - const incorrect = []; - const display = new Array(word.length).fill("◯"); - while (word.length !== confirmation.length && points < 6) { - const embed = new MessageEmbed() - .setColor(client.color) - .setTitle("Hangman game").setDescription(stripIndents` - ${displayText === null ? "Here we go!" : displayText ? "Good job!" : "Nope!"} - \`${display.join(" ")}\`. Which letter do you choose? - Incorrect Tries: ${incorrect.join(", ") || "None"} - \`\`\` - . ┌─────┐ - . ┃ ┋ - . ┃ ${points > 0 ? "O" : ""} - . ┃ ${points > 2 ? "/" : " "}${points > 1 ? "|" : ""}${ - points > 3 ? "\\" : "" - } - . ┃ ${points > 4 ? "/" : ""}${points > 5 ? "\\" : ""} - ============= - \`\`\` - `); - let m = await message.channel.send(embed); - const filter = res => { - const choice = res.content.toLowerCase(); - return ( - res.author.id === message.author.id && - !confirmation.includes(choice) && - !incorrect.includes(choice) - ); - }; - const guess = await message.channel.awaitMessages(filter, { - max: 1, - time: 30000, - }); - //m.delete(); - if (!guess.size) { - await message.reply("Sorry, time is up!"); - break; - } - const choice = guess.first().content.toLowerCase(); - if (choice === "end") break; - if (choice.length > 1 && choice === word) { - guessed = true; - break; - } else if (word.includes(choice)) { - displayText = true; - for (let i = 0; i < word.length; i++) { - if (word.charAt(i) !== choice) continue; // eslint-disable-line max-depth - confirmation.push(word.charAt(i)); - display[i] = word.charAt(i); - } - } else { - displayText = false; - if (choice.length === 1) incorrect.push(choice); - points++; - } - } - playing.delete(message.channel.id); - if (word.length === confirmation.length || guessed) - return message.channel.send(`You won. The word is **${word}**!`); - return message.channel.send(`You lost. The word is **${word}**.`); - } catch (err) { - playing.delete(message.channel.id); - } - }, -}; diff --git a/commands/Fun/hexcolor.js b/commands/Fun/hexcolor.js @@ -1,84 +0,0 @@ -const Canvas = require("canvas"); -const { - Client, - Message, - MessageEmbed, - MessageAttachment, -} = require("discord.js"); -const axios = require("axios"); - -module.exports = { - name: "hexcolor", - usage: "(Hex Color Code)", - description: "Get Hex and RGB info of a color", - aliases: ["hex"], - category: "Fun", - run: async (client, message, args) => { - let color; - if (args[0]) { - if (/(#|0x)([0-9A-F]{6})/i.test(args[0])) { - color = args[0].match(/(#|0x)([0-9A-F]{6})/i)[2]; - } else { - return client.err(message, "Fun", "hexcolor", 101); - } - } else { - color = message.member.displayHexColor; - } - try { - message.channel.startTyping(); - const aa = color.replace("#", "", "0x", ""); - const colour = await axios.get( - `https://www.thecolorapi.com/scheme?hex=${aa}` - ); - const canvas = Canvas.createCanvas(200, 200); - const ctx = canvas.getContext("2d"); - ctx.beginPath(); - ctx.rect(0, 0, 200, 200); - ctx.fillStyle = `${colour.data.seed.hex.value}`; - ctx.fill(); - const rightpic = new MessageAttachment(canvas.toBuffer(), "wea.jpg"); - const canvasx = Canvas.createCanvas(500, 100); - const ctxt = canvasx.getContext("2d"); - let y = canvasx.height / 2; - ctxt.font = "12px Roboto"; - ctxt.textAlign = "center"; - let addup = 0; - for (let i = 0; i < 5; i++) { - ctxt.beginPath(); - ctxt.rect(addup, 0, 100, 100); - ctxt.fillStyle = `${colour.data.colors[i].hex.value}`; - ctxt.fill(); - addup = addup + 100; - ctxt.beginPath(); - ctxt.rect(addup - 80, y - 15, 60, 30); - ctxt.fillStyle = `black`; - ctxt.fill(); - ctxt.fillStyle = `white`; - ctxt.fillText( - `${colour.data.colors[i].hex.value}`, - addup - 51, - y + 4.3 - ); - } - const attachment = new MessageAttachment(canvasx.toBuffer(), "color.jpg"); - const embed = new MessageEmbed() - .setColor(`0x${colour.data.seed.hex.value}`) - .setDescription( - `\`HEX: ${colour.data.seed.hex.value} RGB: ${colour.data.seed.rgb.value}\`\n🔽Color Scheme🔽` - ) - .setTitle("Color Information (Click here for more info)") - .setURL(`https://www.colorhexa.com/${colour.data.seed.hex.clean}`) - .attachFiles(attachment) - .setURL(client.web) - .setImage("attachment://color.jpg") - .attachFiles(rightpic) - .setThumbnail("attachment://wea.jpg"); - message.channel.send(embed); - } catch (e) { - console.log(e); - return client.err(message, "Utilities", "hexcolor", 999); - } finally { - message.channel.stopTyping(); - } - }, -}; diff --git a/commands/Fun/hug.js b/commands/Fun/hug.js @@ -1,29 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "hug", - usage: "(User)", - description: "Hug someone", - category: "Fun", - run: async (client, message, args) => { - const words = args.slice(1).join(" "); - const user = - message.mentions.users.first() || - message.guild.members.cache.get(args[0]); - if (!user) { - return client.err(message, "Fun", "hug", 1); - } - if (user.id === message.author.id) { - return client.err(message, "Fun", "hug", 33); - } - const embed = new MessageEmbed(); - embed.setDescription(`${message.author} **hugs** ${user}`); - if (words) { - embed.addField("Words:", reason); - } - embed.setImage( - `https://media.tenor.com/images/ca88f916b116711c60bb23b8eb608694/tenor.gif` - ); - embed.setColor(client.color); - message.inlineReply(embed).then(msg => msg.react("💕")); - }, -}; diff --git a/commands/Fun/kiss.js b/commands/Fun/kiss.js @@ -1,29 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "kiss", - usage: "(User)", - description: "Kiss someone", - category: "Fun", - run: async (client, message, args) => { - const words = args.slice(1).join(" "); - const user = - message.mentions.users.first() || - message.guild.members.cache.get(args[0]); - if (!user) { - return client.err(message, "Fun", "kiss", 1); - } - if (user.id === message.author.id) { - return client.err(message, "Fun", "kiss", 33); - } - const embed = new MessageEmbed(); - embed.setDescription(`${message.author} **kisses** ${user}`); - if (words) { - embed.addField("Words: ", words); - } - embed.setImage( - `https://media.discordapp.net/attachments/814310468906123274/817656819416825896/image0.gif` - ); - embed.setColor(client.color); - message.inlineReply(embed).then(msg => msg.react("💕")); - }, -}; diff --git a/commands/Fun/meme.js b/commands/Fun/meme.js @@ -1,25 +0,0 @@ -const api = require("imageapi.js"); -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "meme", - aliases: ["memes"], - category: "Fun", - description: "A meme command", - run: async (client, message, args) => { - const wait = await message.inlineReply("Getting meme..."); - let subreddits = ["comedyheaven", "dank", "meme", "memes"]; - let subreddit = subreddits[Math.floor(Math.random() * subreddits.length)]; - const img = await api(subreddit).catch(err => console.log(err)); - const Embed = new MessageEmbed() - .setTitle(`A meme from r/${subreddit}`) - .setURL(`https://reddit.com/r/${subreddit}`) - .setColor(client.color) - .setImage(img) - .setTimestamp() - .setAuthor( - message.author.tag, - message.author.displayAvatarURL({ dynamic: true }) - ); - wait.edit("", { embed: Embed }); - }, -}; diff --git a/commands/Fun/obama.js b/commands/Fun/obama.js @@ -1,45 +0,0 @@ -const o = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠛⠛⠉⠉⠉⠋⠛⠛⠛⠻⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿"; -const b = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠛⠉⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠉⠙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿"; -const a = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠋⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠈⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿"; -const m = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠏⠄⠄⠄⠄⠄⠄⠄⠂⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠈⠹⣿⣿⣿⣿⣿⣿⣿"; -const a2 = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⠛⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠠⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠘⢻⣿⣿⣿⣿⣿"; -const aa = "⣿⣿⣿⣿⣿⣿⣿⣿⠃⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢀⠄⢠⠄⠄⡀⠄⠄⢀⠂⠄⠄⠄⠄⠄⠄⠄⠄⠄⡁⠄⠄⢛⣿⣿⣿⣿"; -const ab = "⣿⣿⣿⣿⣿⣿⣿⡇⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠐⡈⢔⠸⣐⢕⢕⢵⢰⢱⢰⢐⢤⡡⡢⣕⢄⢢⢠⠄⠄⠄⠄⠄⠄⠙⣿⣿⣿"; -const ac = "⣿⣿⣿⣿⣿⣿⣿⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⡁⠂⠅⢕⠌⡎⡎⣎⢎⢮⢮⣳⡳⣝⢮⢺⢜⢕⢕⢍⢎⠪⡐⠄⠁⠄⠸⣿⣿"; -const ad = "⣿⣿⣿⣿⣿⣿⠏⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠐⠄⠄⢅⠣⡡⡣⣣⡳⡵⣝⡮⣗⣗⡯⣗⣟⡮⡮⣳⣣⣳⢱⢱⠱⣐⠄⠂⠄⢿⣿"; -const ae = "⣿⣿⣿⣿⣿⣿⠄⠄⠄⠄⠄⠄⠄⠂⠄⠄⠄⠄⠄⠄⢂⢈⠢⡱⡱⡝⣮⣿⣟⣿⣽⣷⣿⣯⣿⣷⣿⣿⣿⣾⣯⣗⡕⡇⡇⠄⠂⡀⢹⣿"; -const af = "⣿⣿⣿⣿⣿⡟⠄⠄⠄⠄⠄⠄⠂⠄⠄⠄⠄⠄⠄⠐⢀⢂⢕⢸⢨⢪⢳⡫⣟⣿⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡺⡮⡣⡣⠠⢂⠒⢸⣿"; -const ag = "⣿⣿⣿⣿⣿⡇⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠠⠐⠄⡂⠆⡇⣗⣝⢮⢾⣻⣞⣿⣿⣿⣿⣿⣿⣿⣿⢿⣽⣯⡯⣺⢸⢘⠨⠔⡅⢨⣿"; -const ah = "⣿⣿⠋⠉⠙⠃⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠁⠄⠄⠄⡂⡪⡪⡪⡮⡮⡯⣻⣽⣾⣿⣿⣿⣟⣿⣿⣿⣽⣿⣿⡯⣯⡺⡸⡰⡱⢐⡅⣼⣿"; -const ai = "⣿⠡⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠠⠈⠆⠱⠑⠝⠜⠕⡝⡝⣞⢯⢿⣿⣿⡿⣟⣿⣿⣿⡿⡿⣽⣷⣽⡸⡨⡪⣂⠊⣿⣿"; -const aj = "⣿⠡⠄⡨⣢⠐⠁⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠐⠍⡓⣗⡽⣝⠽⠍⠅⠑⠁⠉⠘⠘⠘⠵⡑⢜⢀⢀⢉⢽"; -const ak = "⣿⠁⠠⢱⢘⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠈⠈⠱⣁⠜⡘⠌⠄⠄⡪⣳⣟⡮⢅⠤⠠⠄⠄⣀⣀⡀⡀⠄⠈⡂⢲⡪⡠⣿"; -const al = "⣿⡇⠨⣺⢐⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⡀⠄⠄⠄⠤⡠⡢⢒⠦⠠⠄⠄⠄⡸⢽⣟⢮⠢⡂⡐⠄⡈⡀⠤⡀⠄⠑⢄⠨⢸⡺⣐⣿"; -const am = "⣿⣿⠈⠕⠁⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⡂⡪⡐⡥⢤⣰⣰⣰⡴⡮⠢⠂⠄⠄⡊⢮⢺⢕⢵⢥⡬⣌⣒⡚⣔⢚⢌⢨⢚⠌⣾⡪⣾⣿"; -const an = "⣿⣿⣆⠄⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⡑⢕⢕⡯⡷⣕⢧⢓⢭⠨⡀⠄⡂⠨⡨⣪⡳⣝⢝⡽⣻⣻⣞⢽⣲⢳⢱⢡⠱⠨⣟⢺⣿⣿"; -const ao = "⣿⣿⣿⡆⠄⡅⠇⡄⠄⠄⠄⠄⠄⠄⠄⠐⠨⢪⢹⢽⢽⣺⢝⠉⠁⠁⠄⠄⠄⢌⢎⡖⡯⡎⡗⢝⠜⣶⣯⣻⢮⡻⣟⣳⡕⠅⣷⣿⣿⣿"; -const ap = "⣿⣿⣿⣿⣶⣶⣿⣷⠄⠄⠄⠄⠄⠄⠄⠄⠈⠔⡑⠕⠝⠄⡀⠄⠄⠊⢆⠂⠨⡪⣺⣮⣿⡾⡜⣜⡜⣄⠙⢞⣿⢿⡿⣗⢝⢸⣾⣿⣿⣿"; -const aq = "⣿⣿⣿⣿⣿⣿⣿⣿⠄⠄⠄⠄⠄⡀⠄⠄⠄⠄⢀⠄⠠⠄⠠⠄⠄⠄⠄⠄⠄⠊⠺⡹⠳⡙⡜⡓⡭⡺⡀⠄⠣⡻⡹⡸⠨⣣⣿⣿⣿⣿"; -const ar = "⣿⣿⣿⣿⣿⣿⣿⣿⠄⠄⠄⠄⠄⠠⠄⠄⣂⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢄⠤⡤⡄⡆⡯⡢⡣⡣⡓⢕⠽⣄⠄⠨⡂⢌⣼⣿⣿⣿⣿⣿"; -const a_ = "⣿⣿⣿⣿⣿⣿⣿⣿⡆⠄⠄⠄⠄⠈⠆⠄⠸⡂⠄⠄⠄⢀⠄⢀⠈⠄⠂⠁⠙⠝⠼⠭⠣⠣⠣⠑⠌⠢⠣⡣⡠⡘⣰⣱⣿⣿⣿⣿⣿⣿"; -const at = "⣿⣿⣿⣿⣿⣿⣿⣿⡇⠄⠄⠄⠄⠄⢑⠄⠈⡱⠄⢘⠄⡀⠨⢐⣧⣳⣷⣶⣦⣤⣴⣶⣶⣶⡶⠄⡠⡢⡕⣜⠎⡮⣣⣿⣿⣿⣿⣿⣿⣿"; -const au = "⣿⣿⣿⣿⣿⣿⣿⣿⡇⠄⠄⠄⠄⠄⠄⠢⠄⠨⠄⠄⠣⡀⠄⢀⢀⢙⠃⡿⢿⠿⡿⡿⢟⢋⢔⡱⣝⢜⡜⡪⡪⣵⣿⣿⣿⣿⣿⣿⣿⣿"; -const av = "⣿⣿⣿⣿⣿⣿⣿⣿⡁⠄⠄⠄⠄⠄⠄⠄⠅⠄⠡⠄⠄⠡⢀⢂⠢⡡⠡⠣⡑⣏⢯⡻⡳⣹⡺⡪⢎⠎⡆⢣⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿"; -const aw = "⣿⣿⣿⣿⣿⣿⣿⣿⣇⠄⠄⠄⠄⠄⠄⠄⠐⠄⠄⠁⠄⢈⠄⢂⠕⡕⡝⢕⢎⢎⢮⢎⢯⢺⢸⢬⠣⢃⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿"; -const ax = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠠⠨⡐⠌⢆⢇⢧⢭⣣⡳⣵⢫⣳⢱⠱⢑⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿"; -const ay = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣆⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠁⡊⢌⢢⢡⢣⢪⡺⡪⡎⡎⡎⡚⣨⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿"; -const az = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠕⡅⢗⢕⡳⡭⣳⢕⠕⡱⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿"; -const ba = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠌⠄⠑⠩⢈⢂⣱⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿"; -const bb = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⡀⢄⠄⣀⠄⡀⣀⢠⢄⣖⣖⣞⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿"; -const bc = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣱⡐⡕⡕⡽⣝⣟⣮⣾⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿"; - -module.exports = { - name: "obama", - category: "Utilities", - description: "Obama", - run: async (client, message, args) => { - message.inlineReply( - `${o}\n${b}\n${a}\n${m}\n${a2}\n${aa}\n${ab}\n${ac}\n${ad}\n${ae}\n${af}\n${ag}\n${ah}\n${ai}\n${aj}\n${ak}\n${al}\n${am}\n${an}\n${ao}\n${ap}\n${aq}\n${ar}\n${a_}\n${at}\n${au}\n${av}\n${aw}\n${ax}\n${ay}\n${az}\n${ba}\n${bb}\n${bc}` - ); - }, -}; diff --git a/commands/Fun/rickroll.js b/commands/Fun/rickroll.js @@ -1,30 +0,0 @@ -const { - Client, - Message, - MessageEmbed, - MessageAttachment, -} = require("discord.js"); - -module.exports = { - name: "rickroll", - aliases: ["rick", "nevergonnagiveyouup", "never"], - description: "Rickroll?", - category: "Fun", - run: async (client, message, args) => { - const roll = [ - "Never gonna give you up", - "Never gonna let you down", - "Never gonna run around and desert you", - "Never gonna make you cry", - "Never gonna say goodbye", - "Never gonna tell a lie and hurt you", - ]; - const rick = roll[Math.floor(Math.random() * roll.length)]; - const rickroll = new MessageAttachment( - "https://i.pinimg.com/originals/88/82/bc/8882bcf327896ab79fb97e85ae63a002.gif" - ); - message.inlineReply(`**${rick}**`, { - files: [rickroll], - }); - }, -}; diff --git a/commands/Fun/rps.js b/commands/Fun/rps.js @@ -1,91 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "rps", - aliases: ["rockpapersscissors"], - description: "Play a rock paper scissors game", - category: "Fun", - run: async (client, message, args) => { - let embed = new MessageEmbed() - .setTitle("RPS GAME") - .setAuthor( - message.author.tag, - message.author.displayAvatarURL({ dynamic: true }) - ) - .setDescription( - "```Add a reaction to one of these emojis to play the game!```" - ) - .setColor(client.color) - .setFooter(`Made by ${client.author}`) - .setTimestamp(); - let msg = await message.channel.send(embed); - await msg.react("✊"); - await msg.react("✂"); - await msg.react("📄"); - const filter = (reaction, user) => { - return ( - ["✊", "✂", "📄"].includes(reaction.emoji.name) && - user.id === message.author.id - ); - }; - const choices = ["✊", "✂", "📄"]; - const me = choices[Math.floor(Math.random() * choices.length)]; - msg - .awaitReactions(filter, { max: 1, time: 60000, error: ["time"] }) - .then(async collected => { - const reaction = collected.first(); - if ( - (me === "✊" && reaction.emoji.name === "✂") || - (me === "📄" && reaction.emoji.name === "✊") || - (me === "✂" && reaction.emoji.name === "📄") - ) { - const reaction = collected.first(); - let result = new MessageEmbed() - .setTitle("You lost!") - .setColor("RED") - .setFooter(`Made by ${client.author}`) - .setTimestamp() - .setAuthor( - message.author.tag, - message.author.displayAvatarURL({ dynamic: true }) - ) - .addField("Your choice", `${reaction.emoji.name}`) - .addField("My choice", `${me}`); - await msg.edit("", result); - } else if (me === reaction.emoji.name) { - const reaction = collected.first(); - let result = new MessageEmbed() - .setTitle("Tie!") - .setColor("GREY") - .setFooter(`Made by ${client.author}`) - .setTimestamp() - .setAuthor( - message.author.tag, - message.author.displayAvatarURL({ dynamic: true }) - ) - .addField("Your choice", `${reaction.emoji.name}`) - .addField("My choice", `${me}`); - await msg.edit("", result); - } else { - const reaction = collected.first(); - let result = new MessageEmbed() - .setTitle("You won!") - .setColor("GREEN") - .setFooter(`Made by ${client.author}`) - .setTimestamp() - .setAuthor( - message.author.tag, - message.author.displayAvatarURL({ dynamic: true }) - ) - .addField("Your choice", `${reaction.emoji.name}`) - .addField("My choice", `${me}`); - await msg.edit("", result); - } - }) - .catch(r => { - console.log(r); - message.inlineReply( - "Your game has lost since you didn't response in time" - ); - }); - }, -}; diff --git a/commands/Fun/say.js b/commands/Fun/say.js @@ -1,12 +0,0 @@ -const { Client, Message, Util } = require("discord.js"); -module.exports = { - name: "say", - description: "Pretend a bot to say", - usage: "(Words)", - category: "Fun", - run: async (client, message, args) => { - if (!args.length) return; - message.delete(); - return message.channel.send(Util.cleanContent(args.join(" "), message)); - }, -}; diff --git a/commands/Fun/ship.js b/commands/Fun/ship.js @@ -1,31 +0,0 @@ -const block = "⬛"; -const heart = "🟥"; -const { MessageEmbed } = require("discord.js"); - -module.exports = { - name: "ship", - aliases: ["love", "loverate", "shipping"], - description: "Ship to you an user", - usage: "(Text) (Text)", - category: "Fun", - run: async (client, message, args) => { - const msg = await message.channel.send("Shipping..."); - const user1 = args[0]; - const user2 = args[1]; - if (!user1) return client.err(message, "Fun", "ship", 12); - if (!user2) return client.err(message, "Fun", "ship", 12); - let loveEmbed = new MessageEmbed() - .setColor("dd2e44") - .setFooter(`Shipped by ${message.author.tag}`) - .setTimestamp() - .setTitle(`💘 | Shipping ${user1} and ${user2} | 💘`) - .setDescription(`🔻 | ${user1} \n${ship()}\n🔺 | ${user2}`); - msg.edit("", loveEmbed); - }, -}; -function ship() { - const hearts = Math.floor(Math.random() * 100); - const hearte = hearts / 10; - const str = `${heart.repeat(hearte)}${block.repeat(10 - hearte)} ${hearts}%`; - return str; -} diff --git a/commands/Fun/simprate.js b/commands/Fun/simprate.js @@ -1,26 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "simprate", - aliases: ["simp"], - description: "Check how simp is the user", - usage: "(@User)", - category: "Fun", - run: async (client, message, args) => { - let simp = Math.floor(Math.random() * 100); - if (message.mentions.users.first()) { - let target = message.mentions.users.first(); - message.reply( - new MessageEmbed() - .setTitle(`${target.username}'s simp rate`) - .setDescription(`${target.username} is a ${simp}% simp`) - ); - } else { - const target = message.author; - message.reply( - new MessageEmbed() - .setTitle(`${target.username}'s simp rate`) - .setDescription(`You are a ${simp}% simp`) - ); - } - }, -}; diff --git a/commands/Fun/sr.js b/commands/Fun/sr.js @@ -1,15 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -const supr = require("superscript-text"); -module.exports = { - name: "superscript", - aliases: ["sr"], - description: "Superscript your text", - usage: "(text)", - category: "Fun", - run: async (client, message, args) => { - const text = args.join(" "); - if (!text) return client.err(message, "Fun", "sr", 12); - if (text.includes("@")) return client.err(message, "Fun", "sr", 101); - message.inlineReply(supr(text)); - }, -}; diff --git a/commands/Fun/triggered.js b/commands/Fun/triggered.js @@ -1,18 +0,0 @@ -const { Canvas } = require("canvacord"); -const { Client, Message, MessageAttachment } = require("discord.js"); -module.exports = { - name: "trigger", - aliases: ["triggered"], - usage: "{User}", - description: "Have a trigger effect on a user's avatar", - category: "Fun", - run: async (client, message, args) => { - const user = - message.mentions.users.first() || - message.guild.members.cache.get(args[0]) || - message.author; - const ava = user.displayAvatarURL({ format: "png" }); - const imga = await Canvas.trigger(ava); - message.inlineReply(new MessageAttachment(imga, "imgae.gif")); - }, -}; diff --git a/commands/Giveaway/giveaway.js b/commands/Giveaway/giveaway.js @@ -1,12 +1,10 @@ -const ms = require("ms"); -const { Client, Message, MessageEmbed } = require("discord.js"); module.exports = { name: "giveaway", aliases: ["gstart"], description: "Start a giveaway", usage: "(Channel) (Time) (Winners(Number)) (Prize)", UserPerm: "MANAGE_MESSAGES", - run: async (client, message, args) => { + run: async (client, message, args, utils) => { const channel = message.mentions.channels.first(); if (!channel) return client.err(message, "Giveaway", "giveaway", 28); const duration = args[1]; @@ -17,7 +15,7 @@ module.exports = { const prize = args.slice(3).join(" "); if (!prize) return client.err(message, "Giveaway", "giveaway", 32); client.giveaways.start(channel, { - time: ms(duration), + time: utils.ms(duration), prize: prize, winnerCount: winners, hostedBy: message.author, diff --git a/commands/Moderation/mute.js b/commands/Moderation/mute.js @@ -1,5 +1,4 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -const ms = require("ms"); +const { MessageEmbed } = require("discord.js"); module.exports = { name: "mute", description: "Mute an user.", @@ -7,7 +6,7 @@ module.exports = { UserPerm: "MANAGE_MESSAGES", BotPerm: "MANAGE_ROLES", category: "Moderation", - run: async (client, message, args) => { + run: async (client, message, args, utils) => { let Member = message.mentions.members.first(); const time = args[1]; if (!Member) return client.err(message, "Moderation", "mute", 1); @@ -51,7 +50,7 @@ module.exports = { .setTimestamp(); message.reply(embed); } - if (!ms(time)) { + if (!utils.ms(time)) { let reason = args.slice(1).join(" ") || "No reason provided"; const role = message.guild.roles.cache.find(x => x.name === "Muted"); if (!role) { @@ -71,7 +70,7 @@ module.exports = { }); }); } catch (e) { - console.log(err); + console.log(e); return client.err(message, "Moderation", "mute", 999); } } @@ -90,9 +89,6 @@ module.exports = { .setColor(client.color) .setTimestamp(); message.reply(embed); - setTimeout(async () => { - await Member.roles.remove(role2); - }, ms(time)); } else { let reason = args.slice(2).join(" ") || "No reason provided"; const role = message.guild.roles.cache.find(x => x.name === "Muted"); @@ -135,7 +131,7 @@ module.exports = { message.reply(embed); setTimeout(async () => { await Member.roles.remove(role2); - }, ms(time)); + }, utils.ms(time)); } }, }; diff --git a/commands/Moderation/pin.js b/commands/Moderation/pin.js @@ -1,21 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); - -module.exports = { - name: "pin", - usage: "(Message ID)", - description: "Pin a message in the server", - BotPerm: "MANAGE_MESSAGES", - UserPerm: "MANAGE_MESSAGES", - run: async (client, message, args) => { - if (!args[0]) return client.err(message, "Moderation", "pin", 27); - try { - const ch = message.guild.channels.cache.get(message.channel.id); - const msgs = await ch.messages.fetch(args[0]); - if (!msgs) return client.err(message, "Moderation", "pin", 52); - await msgs.pin(); - } catch (e) { - console.log(e); - return client.err(message, "Moderation", "pin", 999); - } - }, -}; diff --git a/commands/Moderation/slowmode.js b/commands/Moderation/slowmode.js @@ -1,57 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -const ms = require("ms"); -module.exports = { - name: "slowmode", - UserPerm: "MANAGE_CHANNELS", - description: "Set slowmode at a specific channel", - BotPerm: "MANAGE_CHANNELS", - usage: "(Time)", - category: "Moderation", - run: async (client, message, args) => { - try { - if (!args[0]) { - message.channel.setRateLimitPerUser(0); - const embed = new MessageEmbed() - .setTitle("Slowmode Removed") - .addField("**Moderator**", message.author.tag, true) - .addField("**Channel**", `<#${message.channel.id}>`, true) - .setFooter( - message.member.displayName || message.author.username, - message.author.displayAvatarURL({ dynamic: true }) - ) - .setThumbnail(client.user.displayAvatarURL()) - .setColor(client.color) - .setTimestamp(); - message.reply(embed); - } - const milliseconds = ms(args[0]); - if (isNaN(milliseconds)) - return client.err(message, "Moderation", "slowmode", 101); - if (milliseconds < 1000) - return client.err(message, "Moderation", "slowmode", 16); - message.channel.setRateLimitPerUser(milliseconds / 1000); - const embed = new MessageEmbed() - .setTitle("Slowmode Added") - .addField("**Moderator**", message.author.tag, true) - .addField("**Channel**", `<#${message.channel.id}>`, true) - .addField( - "**Rate**", - ms(milliseconds, { - long: true, - }), - true - ) - .setFooter( - message.member.displayName || message.author.username, - message.author.displayAvatarURL({ dynamic: true }) - ) - .setThumbnail(client.user.displayAvatarURL()) - .setColor(client.color) - .setTimestamp(); - message.reply(embed); - } catch (e) { - console.log(e); - return client.err(message, "Moderation", "slowmode", 999); - } - }, -}; diff --git a/commands/Moderation/warns.js b/commands/Moderation/warns.js @@ -33,7 +33,7 @@ module.exports = { ) ) .setTimestamp() - .setColor("client.color") + .setColor(client.color) ); } else { return client.err(message, "Moderation", "warns", 10); diff --git a/commands/Owner/eval.js b/commands/Owner/eval.js @@ -1,111 +0,0 @@ -const Discord = require("discord.js"); -module.exports = { - name: "eval", - category: "Owner", - aliases: ["e"], - usage: "(Code)", - Owner: true, - run: async (client, message, args) => { - let code = args.join(" "); - if (!code) return client.err(message, "Owner", "eval", 53); - function CheckFilter(object) { - if (typeof object === "string") { - object = object.replace( - new RegExp(client.token || process.env.TOKEN, "gi"), - "Cannot eval Token" - ); - } else if (typeof object === "object") { - if (Array.isArray(object)) { - for (let i = 0; i < object.length; i++) { - object[i] = CheckFilter(object[i]); - } - } else { - for (let key in object) { - object[key] = CheckFilter(object[key]); - } - } - } - return object; - } - let oldSend = Discord.TextChannel.prototype.send; - Discord.TextChannel.prototype.send = async function send(content, options) { - return oldSend.bind(this)(CheckFilter(content), CheckFilter(options)); - }; - let evaled; - try { - evaled = eval(code); - if (evaled instanceof Promise) evaled = await evaled; - } catch (err) { - evaled = err; - } - if (typeof evaled !== "string") evaled = require("util").inspect(evaled); - evaled = new (require("string-toolkit"))().toChunks(evaled, 750); - let reactions = ["❌", "⏪", "◀️", "⏹️", "▶️", "⏩"], - page = 0, - evaledEmbed = new Discord.MessageEmbed() - .setColor(client.color) - .setDescription(`\`\`\`js\n${evaled[0]}\n\`\`\``) - .addField(`Type of`, `\`\`\`js\n${typeof evaled[0]}\n\`\`\``); - let mainMessage = await message.channel.send(evaledEmbed); - Discord.TextChannel.prototype.send = oldSend; - await Promise.all( - (evaled.length === 1 ? ["❌", "⏹️"] : reactions).map(r => - mainMessage.react(r) - ) - ); - let filter = (reaction, user) => - (evaled.length === 1 ? ["❌", "⏹️"] : reactions).some( - e => e === reaction.emoji.name - ) && user.id === message.author.id; - let collector = mainMessage.createReactionCollector(filter, { - time: 300000, - }); - collector.on("collect", async (reaction, user) => { - switch (reaction.emoji.name) { - case "❌": - await collector.stop(); - return mainMessage.delete(); - break; - case "⏪": - if (evaled.length === 1 || page === 0) return; - page = 0; - break; - case "◀️": - if (evaled.length === 1) return; - if (page === 0) { - page = evaled.length - 1; - } else { - page -= 1; - } - break; - case "⏹️": - await collector.stop(); - for (let reaction of mainMessage.reactions.cache.array()) { - await reaction.users.remove(client.user.id); - } - return; - break; - case "▶️": - if (evaled.length === 1) return; - if (page === evaled.length - 1) { - page = 0; - } else { - page += 1; - } - break; - case "⏩": - if (evaled.length === 1 || page === evaled.length - 1) return; - page = evaled.length - 1; - break; - } - evaledEmbed = new Discord.MessageEmbed() - .setColor(message.guild.me.displayColor) - .setDescription(`\`\`\`js\n${evaled[page]}\n\`\`\``) - .addField(`Type of`, `\`\`\`js\n${typeof evaled[page]}\n\`\`\``); - - await mainMessage.edit({ - embed: evaledEmbed, - }); - }); - }, -}; diff --git a/commands/Owner/guilds.js b/commands/Owner/guilds.js @@ -1,24 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "guilds", - category: "Owner", - description: "Check top 10 guilds of the bot", - Owner: true, - run: async (client, message, args) => { - const guilds = client.guilds.cache - .sort((a, b) => b.memberCount - a.memberCount) - .first(10); - const description = guilds - .map((guild, index) => { - return `${index + 1}) ${guild.name} -> ${guild.memberCount}members`; - }) - .join("\n"); - let embed = new MessageEmbed() - .setTitle("Guilds") - .setDescription(description) - .setColor(client.color) - .setFooter(`Made by ${client.author}`) - .setTimestamp(); - message.channel.send(embed); - }, -}; diff --git a/commands/Owner/restart.js b/commands/Owner/restart.js @@ -1,13 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "restart", - category: "Owner", - description: "Restart the bot", - Owner: true, - run: async (client, message, args) => { - const msg = await message.channel.send("Restarting..."); - await client.destroy(); - await client.login(process.env.TOKEN); - await msg.delete().then(msg => message.channel.send("Restarted")); - }, -}; diff --git a/commands/Owner/spider.js b/commands/Owner/spider.js @@ -1,19 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); - -module.exports = { - name: "spider", - Owner: true, - /** - * @param {Client} client - * @param {Message} message - * @param {String[]} args - */ - run: async (client, message, args) => { - for (var i = 0; i < 10; i++) { - client.function.sleep(5000); - message.channel.send( - "https://media.discordapp.net/attachments/838006493361471508/864730147545284618/image0.gif" - ); - } - }, -}; diff --git a/commands/Owner/test.js b/commands/Owner/test.js @@ -1,32 +0,0 @@ -// const { Client, Message, MessageEmbed } = require("discord.js"); -// const db = require("../../models/bot"); -// module.exports = { -// name: "test", -// Owner: true, -// /** -// * @param {Client} client -// * @param {Message} message -// * @param {String[]} args -// */ -// run: async (client, message, args) => { -// db.findOne({ Bot: client.user.id }, async (err, data) => { -// let cmdstatus; -// if (!data) { -// return; -// } else { -// data.Commands.map(x => { -// const arr = Object.values(x.commands); -// const finded = arr.find(a => a.name == args[0].toLowerCase()); -// if (!finded) return; -// else cmdstatus = finded.status; -// }); -// data.Commands.commands.status = false; - -// if (cmdstatus === true) { -// cmdstatus = false; -// await db.findOneAndUpdate({ Bot: client.user.id }, data); -// } -// } -// }); -// }, -// }; diff --git a/commands/Utilities/afk.js b/commands/Utilities/afk.js @@ -1,26 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "afk", - description: "Tell someone you are AFK.", - usage: "{Status}", - category: "Utilities", - run: async (client, message, args) => { - let uuser = message.guild.members.cache.get(message.author.id); - const content = args.join(" ") || "No status provided."; - uuser.setNickname(`[AFK]${message.author.username}`); - await client.data.AFK(message.author.id, content); - const embed = new MessageEmbed() - .setDescription( - `${message.author.username} is set into AFK.\nStatus : ${content}` - ) - .setTimestamp() - .setFooter(`Made by ${client.author}`) - .setColor(client.color) - .setAuthor( - message.author.tag, - message.author.displayAvatarURL({ dynamic: true }) - ) - .setURL(client.web); - message.channel.send(embed); - }, -}; diff --git a/commands/Utilities/avatar.js b/commands/Utilities/avatar.js @@ -1,49 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "avatar", - description: "Show user's avatar in different formats", - aliases: ["av"], - usage: "{User}", - category: "Utilities", - run: async (client, message, args) => { - const member = - message.mentions.members.first() || - message.guild.members.cache.get(args[0]) || - message.guild.members.cache.find( - r => - r.user.username.toLowerCase() === args.join(" ").toLocaleLowerCase() - ) || - message.guild.members.cache.find( - r => r.displayName.toLowerCase() === args.join(" ").toLocaleLowerCase() - ) || - message.member; - const embed = new MessageEmbed() - .setAuthor( - member.user.tag, - member.user.displayAvatarURL({ dynamic: true, size: 1024 }) - ) - .setColor(client.color) - .setTitle(`**Avatar**`) - .setDescription( - `\`Links:\` **[png](${member.user.displayAvatarURL({ - format: "png", - size: 1024, - })}) | [jpg](${member.user.displayAvatarURL({ - format: "jpg", - size: 1024, - })}) | [gif](${member.user.displayAvatarURL({ - format: "gif", - size: 1024, - dynamic: true, - })}) | [webp](${member.user.displayAvatarURL({ - format: "webp", - size: 1024, - })})**` - ) - .setImage(member.user.displayAvatarURL({ dynamic: true, size: 1024 })) - .setFooter(`Made by ${client.author}`) - .setURL(client.web) - .setTimestamp(); - return message.inlineReply(embed); - }, -}; diff --git a/commands/Utilities/botinfo.js b/commands/Utilities/botinfo.js @@ -1,49 +0,0 @@ -const { - Client, - Message, - MessageEmbed, - version: djsversion, -} = require("discord.js"); -const version = require("../../package.json").version; -const { utc } = require("moment"); -const os = require("os"); -const ms = require("ms"); -module.exports = { - name: "botinfo", - description: "Check the info of the bot", - category: "Utilities", - run: async (client, message, args) => { - const core = os.cpus()[0]; - const embed = new MessageEmbed() - .setURL(client.web) - .setThumbnail(client.user.displayAvatarURL()) - .setColor(message.guild.me.displayHexColor || client.color) - .addField("General", [ - `**❯ Client:** ${client.user.tag} (${client.user.id})`, - `**❯ Commands:** ${client.commands.size}`, - `**❯ Servers:** ${client.guilds.cache.size.toLocaleString()} `, - `**❯ Users:** ${client.guilds.cache - .reduce((a, b) => a + b.memberCount, 0) - .toLocaleString()}`, - `**❯ Channels:** ${client.channels.cache.size.toLocaleString()}`, - `**❯ Creation Date:** ${utc(client.user.createdTimestamp).format( - "Do MMMM YYYY HH:mm:ss" - )}`, - `**❯ Node.js:** ${process.version}`, - `**❯ Version:** v${version}`, - `**❯ Discord.js:** v${djsversion}`, - "\u200b", - ]) - .setColor(client.color) - .addField("System", [ - `**❯ Platform:** ${process.platform}`, - `**❯ Uptime:** ${ms(os.uptime() * 1000, { long: true })}`, - `**❯ CPU:**`, - `\u3000 Cores: ${os.cpus().length}`, - `\u3000 Model: ${core.model}`, - `\u3000 Speed: ${core.speed}MHz`, - ]) - .setTimestamp(); - message.inlineReply(embed); - }, -}; diff --git a/commands/Utilities/choose.js b/commands/Utilities/choose.js @@ -1,15 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "choose", - aliases: ["random", "8ball"], - description: "Choose random things", - usage: "(Choices)", - category: "Utilities", - run: async (client, message, args) => { - const split = args.join(" ").split(" "); - if (!split) return client.err(message, "Utilities", "choose", 0); - if (!split[1]) return client.err(message, "Utilities", "choose", 101); - let choices = split[Math.floor(Math.random() * split.length)]; - message.channel.send(`I will choose - \`${choices}\``); - }, -}; diff --git a/commands/Utilities/docs.js b/commands/Utilities/docs.js @@ -1,19 +0,0 @@ -const fetch = require("node-fetch"); -module.exports = { - name: "docs", - usage: "(Query)", - description: "Search the discord.js docs for something!", - run: async (client, message, args) => { - const query = args.join(" "); - if (!query) return client.err(message, "Utilities", "docs", 51); - fetch( - `https://djsdocs.sorta.moe/v2/embed?src=stable&q=${encodeURIComponent( - query - )}` - ) - .then(res => res.json()) - .then(data => { - message.inlineReply({ embed: data }); - }); - }, -}; diff --git a/commands/Utilities/emoji.js b/commands/Utilities/emoji.js @@ -1,21 +0,0 @@ -const { Client, Message, MessageEmbed, Util } = require("discord.js"); -module.exports = { - name: "emoji", - aliases: ["se", "stealemoji"], - usage: "(Emoji)", - description: "Show an emoji URL", - category: "Utilities", - run: async (client, message, args) => { - if (!args.length) return client.err(message, "Utilities", "emoji", 11); - for (const rawEmoji of args) { - const parsedEmoji = Util.parseEmoji(rawEmoji); - if (parsedEmoji.id) { - const extension = parsedEmoji.animated ? ".gif" : ".png"; - const url = `https://cdn.discordapp.com/emojis/${ - parsedEmoji.id + extension - }`; - message.channel.send(`Emoji URL:\n${url}`); - } - } - }, -}; diff --git a/commands/Utilities/help.js b/commands/Utilities/help.js @@ -1,6 +1,5 @@ -const { MessageEmbed } = require("discord.js"); +const Discord = require("discord.js"); const { readdirSync } = require("fs"); -const ms = require("ms"); module.exports = { name: "help", @@ -15,29 +14,39 @@ module.exports = { Config: "<:staff:840231971526803467>", Economy: client.currency, Fun: "<a:lollll:804325253265621012>", - Moderation: ":tools:", - Utilities: ":gear:", + Moderation: "🔨", + Utilities: "⚙", Music: "<a:music:840231980692144130>", Giveaway: "<a:DankCat:798963811902160896>", + Information: "ℹ", }; if (!args[0]) { - let categories = []; - readdirSync("./commands/").forEach(dir => { - const category = ["Owner"]; - if (category.includes(dir)) return; - const edited = `${emoji[dir]} ${dir}`; - let data = new Object(); - data = { - name: edited, - value: `\`${p}help ${dir.toLowerCase()}\``, - inline: true, + const directories = [ + ...new Set(client.commands.map(cmd => cmd.directory)), + ]; + const categories = directories.map(dir => { + if (dir == "Owner") return; + const getCmds = client.commands + .filter(c => c.directory == dir) + .map(cmd => { + return { + name: cmd.name || "No command name", + }; + }); + return { + directory: dir, + commands: getCmds, }; - categories.push(data); }); - const embed = new MessageEmbed() + const embed = new Discord.MessageEmbed() .setTitle(`**${client.user.username} commands**`) - .addFields(categories) - + .setDescription(`Please choose a category in the dropdown menu`) + .setColor(client.color) + .setTimestamp() + .setAuthor( + `Requested by ${message.author.tag}`, + message.author.displayAvatarURL({ dynamic: true }) + ) .addField( "**Invite Link**", `**Invite me to your server by clicking [here](https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=4231314550&scope=bot%20applications.commands)**` @@ -54,144 +63,61 @@ module.exports = { .setFooter( `Requested by ${message.author.tag}`, message.author.displayAvatarURL({ dynamic: true }) - ) - .setTimestamp() - .setColor(client.color); - return message.channel.send(embed); - } else if (args[0] === "moderation") { - const commandList = []; - readdirSync(`./commands/Moderation`).forEach(file => { - const pull = require(`../../commands/Moderation/${file}`); - const name = `\`${pull.name}\``; - commandList.push(name); - }); - return message.reply( - new MessageEmbed() - .setDescription(commandList.map(data => `${data}`).join(", ")) - .setTimestamp() - .setURL(client.web) - .setColor(client.color) - .setTitle(":tools:**Moderation Commands**:tools:") - ); - } else if (args[0] === "utilities") { - const commandList = []; - readdirSync(`./commands/Utilities`).forEach(file => { - const pull = require(`../../commands/Utilities/${file}`); - const name = `\`${pull.name}\``; - commandList.push(name); - }); - return message.reply( - new MessageEmbed() - .setDescription(commandList.map(data => `${data}`).join(", ")) - .setTimestamp() - .setURL(client.web) - .setColor(client.color) - .setTitle(":gear:**Utiltiies Commands**:gear:") - ); - } else if (args[0] === "codm") { - const commandList = []; - readdirSync(`./commands/CODM`).forEach(file => { - const command = readdirSync(`./commands/CODM`); - const pull = require(`../../commands/CODM/${file}`); - const name = `\`${pull.name}\``; - commandList.push(name); + ); + const components = state => [ + new Discord.MessageActionRow().addComponents( + new Discord.MessageSelectMenu() + .setCustomId("help-menu") + .setPlaceholder(`Please select a category`) + .setDisabled(state) + .addOptions( + categories.map(cmd => { + return { + label: cmd.directory, + value: cmd.directory, + description: `Commands from ${cmd.directory} category`, + emoji: emoji[cmd.directory] || null, + }; + }) + ) + ), + ]; + + const msg = await message.channel.send({ + embeds: [embed], + components: components(false), }); - return message.reply( - new MessageEmbed() - .setDescription(commandList.map(data => `${data}`).join(", ")) - .setTimestamp() - .setURL(client.web) - .setColor(client.color) - .setTitle( - "<a:AA99_codm_logo:840231960441257995>**CODM Commands**<a:AA99_codm_logo:840231960441257995>" - ) - ); - } else if (args[0] === "config") { - const commandList = []; - readdirSync(`./commands/Config`).forEach(file => { - const pull = require(`../../commands/Config/${file}`); - const name = `\`${pull.name}\``; - commandList.push(name); + const filter = m => m.user.id === message.author.id; + const collector = message.channel.createMessageComponentCollector({ + filter, + componentType: "SELECT_MENU", + time: 60000, }); - return message.reply( - new MessageEmbed() - .setDescription(commandList.map(data => `${data}`).join(", ")) - .setTimestamp() - .setURL(client.web) - .setColor(client.color) + collector.on("collect", async interaction => { + const [directory] = interaction.values; + const category = categories.find(u => u.directory === directory); + const newembed = new Discord.MessageEmbed() .setTitle( - "<:staff:829718501224480788>**Config Commands**<:staff:829718501224480788>" + `${emoji[directory]}${directory} Commands${emoji[directory]}` ) - ); - } else if (args[0] === "economy") { - const commandList = []; - readdirSync(`./commands/Economy`).forEach(file => { - const pull = require(`../../commands/Economy/${file}`); - const name = `\`${pull.name}\``; - commandList.push(name); - }); - return message.reply( - new MessageEmbed() - .setDescription(commandList.map(data => `${data}`).join(", ")) - .setTimestamp() - .setURL(client.web) - .setColor(client.color) - .setTitle(`${client.currency}**Economy Commands**${client.currency}`) - ); - } else if (args[0] === "fun") { - const commandList = []; - readdirSync(`./commands/Fun`).forEach(file => { - const pull = require(`../../commands/Fun/${file}`); - if (pull.hidden) return; - const name = `\`${pull.name}\``; - commandList.push(name); - }); - return message.reply( - new MessageEmbed() - .setDescription(commandList.map(data => `${data}`).join(", ")) - .setTimestamp() - .setURL(client.web) - .setColor(client.color) - .setTitle( - "<a:lollll:804325253265621012>**Fun Commands**<a:lollll:804325253265621012>" + .setAuthor( + `Requested by ${message.author.tag}`, + message.author.displayAvatarURL({ dynamic: true }) ) - ); - } else if (args[0] === "music") { - const commandList = []; - readdirSync(`./commands/Music`).forEach(file => { - const pull = require(`../../commands/Music/${file}`); - if (pull.hidden) return; - const name = `\`${pull.name}\``; - commandList.push(name); - }); - return message.reply( - new MessageEmbed() - .setDescription(commandList.map(data => `${data}`).join(", ")) .setTimestamp() .setURL(client.web) .setColor(client.color) - .setTitle( - "<a:music:840231980692144130>**Music Commands**<a:music:840231980692144130>" - ) - ); - } else if (args[0] === "giveaway") { - const commandList = []; - readdirSync(`./commands/Giveaway`).forEach(file => { - const pull = require(`../../commands/Giveaway/${file}`); - if (pull.hidden) return; - const name = `\`${pull.name}\``; - commandList.push(name); + .setFooter(`Please use /help (Command Name) for more details`) + .setDescription( + category.commands + .map(cmd => { + return [`\`${cmd.name}\``]; + }) + .join(", ") + ); + interaction.reply({ embeds: [newembed] }); }); - return message.reply( - new MessageEmbed() - .setDescription(commandList.map(data => `${data}`).join(", ")) - .setTimestamp() - .setURL(client.web) - .setColor(client.color) - .setTitle( - "<a:DankCat:798963811902160896>**Giveaway Commands**<a:DankCat:798963811902160896>" - ) - ); + collector.on("end", () => msg.edit({ components: components(true) })); } else { const command = client.commands.get(args[0].toLowerCase()) || @@ -199,9 +125,9 @@ module.exports = { c => c.aliases && c.aliases.includes(args[0].toLowerCase()) ); if (!command) { - message.channel.send( - `There isn't any command or category named "${args[0]}"` - ); + message.channel.send({ + content: `There isn't any command named "${args[0]}"`, + }); } else { if (command.UserPerm && Array.isArray(command.UserPerm)) { UserPermissions = command.UserPerm; @@ -221,7 +147,7 @@ module.exports = { .map(y => y[0] + y.substring(1, y.length).toLowerCase()) .join(" ") ).join(", "); - const embed = new MessageEmbed() + const embed = new Discord.MessageEmbed() .setTitle(`"${command.name}" command details`) .addField( "**Command**:", @@ -242,7 +168,10 @@ module.exports = { embed.addField("**Description**:", command.description); } if (command.timeout) { - embed.addField("**Cooldown**:", ms(command.timeout, { long: true })); + embed.addField( + "**Cooldown**:", + utils.ms(command.timeout, { long: true }) + ); } if (command.UserPerm) { embed.addField("**Required User Permission**:", UserPerms); @@ -258,7 +187,7 @@ module.exports = { .setTimestamp() .setURL(client.web) .setColor(client.color); - message.reply(embed); + message.reply({ embeds: [embed] }); } } }, diff --git a/commands/Utilities/invite.js b/commands/Utilities/invite.js @@ -1,29 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); - -module.exports = { - name: "invite", - aliases: ["support", "bot", "server"], - description: "Get bot invite link", - category: "Utilities", - run: async (client, message, args) => { - var embed = new MessageEmbed() - .setFooter(`Made by ${client.author}`) - .setColor(client.color) - .setTimestamp() - .setAuthor(message.author.tag, message.author.displayAvatarURL) - .setTitle(`Support/Invite`) - .addField( - "**Invite Link**", - `**Invite me to your server by clicking [here](https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=4231314550&scope=bot%20applications.commands)**` - ) - .addField( - "**Support Server Invite**", - "**Join the support server by clicking [here](https://discord.gg/SbQHChmGcp)**" - ) - .addField( - "**Premium**", - "**You can either boost support server or gift a nitro to one of the Developer of Cath Team to be premium user**" - ); - message.inlineReply(embed); - }, -}; diff --git a/commands/Utilities/messageinfo.js b/commands/Utilities/messageinfo.js @@ -1,30 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "messageinfo", - run: async (client, message, args) => { - try { - if (!args[0]) return client.err(message, "Utilities", "Fun", 27); - await message.channel.messages.fetch(args[0]).catch(err => { - return message.inlineReply("Message not found in this channel.."); - }); - const msg = await message.channel.messages.cache.get(args[0]); - console.log(msg); - const hasImage = msg.attachments.size && msg.attachments.first().width; - const embed = new MessageEmbed() - .setColor(msg.member ? msg.member.displayHexColor : client.color) - .setImage(hasImage ? msg.attachments.first().url : null) - .setAuthor( - msg.author.tag, - msg.author.displayAvatarURL({ format: "png", dynamic: true }) - ) - .addField("Content", msg.content) - .setTimestamp(msg.createdAt) - .addField("ID", msg.id) - .setFooter(`Made by ${client.author}`) - .addField("Jump", `[Click Here to Jump](${msg.url})`); - return message.inlineReply(embed); - } catch (err) { - console.log(err); - } - }, -}; diff --git a/commands/Utilities/modmail.js b/commands/Utilities/modmail.js @@ -1,138 +0,0 @@ -const schema = require("../../models/modmail"); -const { MessageEmbed, MessageAttachment } = require("discord.js"); -const fs = require("fs"); -module.exports = { - name: "modmail", - BotPerm: "MANAGE_CHANNELS", - description: "Create a modmail thread with moderators in a server", - usage: "(Emoji) (Text)", - category: "Utilities", - run: async (client, message, args) => { - const data = await schema.findOne({ Guild: message.guild.id }); - if ( - !data || - !data.Role || - !data.Category || - !data.Choices || - !Object.entries(data.Choices).length || - !message.guild.roles.cache.has(data.Role) || - !message.guild.channels.cache.find( - value => value.type == "category" && value.id === data.Category - ) - ) - return message.channel.send( - `This server isn't setup properly. Please find an administrator or a moderator to specify a category, role and choices for users to create thread. The issue may be caused by invalid role/category.` - ); - const embed = new MessageEmbed(); - const choices = Object.entries(data.Choices); - embed.setDescription( - choices.map(value => `${value[1].emoji} - ${value[1].text}`).join("\n") - ); - try { - const msg = await message.author.send(embed); - choices.map(async value => { - await msg.react(value[1].emoji); - }); - const reactionCollector = await msg.createReactionCollector( - async (reaction, user) => - choices.map(value => value[1].emoji).includes(reaction.emoji.name) && - user.id == message.author.id, - { time: 30000 } - ); - let type; - reactionCollector.on("collect", async reaction => { - type = choices.find(value => value[1].emoji == reaction.emoji.name); - await msg.delete(); - reactionCollector.stop("done"); - }); - reactionCollector.on("end", async (collected, reason) => { - if (reason.toLowerCase() == "time") { - return ( - message.channel.send( - "You didn't provide a reaction in-time. Cancelled." - ), - message.author.send( - "You didn't provide a reaction in-time. Cancelled" - ) - ); - } else { - const channel = await message.guild.channels.create( - `${message.author.username}-${message.author.discriminator}`, - { - reason: "Modmail thread", - parent: data.Category, - topic: `${type[1].text}`, - type: "text", - } - ); - const transcript = []; - channel.createOverwrite(data.Role, { - VIEW_CHANNEL: true, - SEND_MESSAGES: true, - }); - channel.createOverwrite(message.guild.id, { - VIEW_CHANNEL: false, - }); - channel.send( - `A modmail thread has been started by ${message.author.tag} with type: ${type[1].text}\nUse \`close\` to close the thread.` - ); - message.author.send( - "Thread created. Use `close` to close the thread." - ); - const channelCollector = channel.createMessageCollector( - m => !m.author.bot - ); - const dmCollector = message.author.dmChannel.createMessageCollector( - m => !m.author.bot - ); - channelCollector.on("collect", async m => { - if (m.content.toLowerCase().startsWith("close")) { - message.author.send("Closing.."); - channel.send("Closing.."); - dmCollector.stop("done"); - channelCollector.stop("done"); - fs.writeFileSync( - `./transcript.${message.author.id}.txt`, - transcript.join("\n") - ); - const attachment = new MessageAttachment( - fs.createReadStream(`./transcript.${message.author.id}.txt`) - ); - await channel.send(attachment); - fs.unlinkSync(`./transcript.${message.author.id}.txt`); - setTimeout(() => { - channel.delete(); - }, 1000 * 10); - } - message.author.send(`**Admin**: ${m.content}`); - transcript.push(`**Admin**: ${m.content}`); - }); - dmCollector.on("collect", async m => { - if (m.content.toLowerCase().startsWith("close")) { - message.author.send("Closing.."); - channel.send("Closing.."); - dmCollector.stop("done"); - channelCollector.stop("done"); - fs.writeFileSync( - `./transcript.${message.author.id}.txt`, - transcript.join("\n") - ); - const attachment = new MessageAttachment( - fs.createReadStream(`./transcript.${message.author.id}.txt`) - ); - await channel.send(attachment); - fs.unlinkSync(`./transcript.${message.author.id}.txt`); - setTimeout(() => { - channel.delete(); - }, 1000 * 10); - } - channel.send(`**${message.author.tag}**: ${m.content}`); - transcript.push(`**${message.author.tag}**: ${m.content}`); - }); - } - }); - } catch { - return message.reply("please let me send DM to you."); - } - }, -}; diff --git a/commands/Utilities/permission.js b/commands/Utilities/permission.js @@ -1,105 +0,0 @@ -const Discord = require("discord.js"); -module.exports = { - name: "permission", - aliases: ["perms", "permsfor"], - usage: "(User)", - description: "Show user's permission in server/channel", - category: "Utilities", - run: async (client, message, args) => { - const yes = "✔️"; - const no = "❌"; - const x = "```"; - const s = "📛"; - const c = "♨️"; - - const permissions = [ - "CREATE_INSTANT_INVITE", - "KICK_MEMBERS", - "BAN_MEMBERS", - "ADMINISTRATOR", - "MANAGE_CHANNELS", - "MANAGE_GUILD", - "ADD_REACTIONS", - "VIEW_AUDIT_LOG", - "PRIORITY_SPEAKER", - "STREAM", - "VIEW_CHANNEL", - "SEND_MESSAGES", - "SEND_TTS_MESSAGES", - "MANAGE_MESSAGES", - "EMBED_LINKS", - "ATTACH_FILES", - "READ_MESSAGE_HISTORY", - "MENTION_EVERYONE", - "USE_EXTERNAL_EMOJIS", - "VIEW_GUILD_INSIGHTS", - "CONNECT", - "SPEAK", - "MUTE_MEMBERS", - "DEAFEN_MEMBERS", - "MOVE_MEMBERS", - "USE_VAD", - "CHANGE_NICKNAME", - "MANAGE_NICKNAMES", - "MANAGE_ROLES", - "MANAGE_WEBHOOKS", - "MANAGE_EMOJIS", - ]; - - let user = - message.mentions.members.first() || - message.guild.members.cache.get(args[0]) || - message.guild.members.cache.find( - r => - r.user.username.toLowerCase() === args.join(" ").toLocaleLowerCase() - ) || - message.guild.members.cache.find( - r => r.displayName.toLowerCase() === args.join(" ").toLocaleLowerCase() - ) || - message.member; - let userId = user.user.id; - let description = `Server - ${s}\nCurrent channel - ${c}\n\n${s} | ${c}\n`; - let embed = new Discord.MessageEmbed() - .setTitle(`${user.user.username} Permissions`) - .setColor(user.displayColor) - .setURL(client.web); - permissions.forEach(perm => { - description += `${user.permissions.has(perm) ? yes : no} | ${ - message.channel.permissionsFor(userId).has(perm) ? yes : no - } - ${perm - .replace("CREATE_INSTANT_INVITE", "Create Invite") - .replace("KICK_MEMBERS", "Kick Members") - .replace("BAN_MEMBERS", "Ban Members") - .replace("ADMINISTRATOR", "Administrator") - .replace("MANAGE_CHANNELS", "Manage Channels") - .replace("MANAGE_GUILD", "Manage Guild") - .replace("ADD_REACTIONS", "Add Reactions") - .replace("VIEW_AUDIT_LOG", "View Audit Log") - .replace("PRIORITY_SPEAKER", "Priority Speaker") - .replace("STREAM", "Stream") - .replace("VIEW_CHANNEL", "View Channel") - .replace("SEND_MESSAGES", "Send Messages") - .replace("SEND_TTS_MESSAGES", "Send TTS Messages") - .replace("MANAGE_MESSAGES", "Manage Messages") - .replace("EMBED_LINKS", "Embed Links") - .replace("ATTACH_FILES", "Attach Files") - .replace("READ_MESSAGE_HISTORY", "Read Message History") - .replace("MENTION_EVERYONE", "Mention Everyone") - .replace("USE_EXTERNAL_EMOJIS", "Use External Emojis") - .replace("VIEW_GUILD_INSIGHTS", "View Guild Insights") - .replace("CONNECT", "Connect") - .replace("SPEAK", "Speak") - .replace("MUTE_MEMBERS", "Mute Members") - .replace("DEAFEN_MEMBERS", "Defean Members") - .replace("MOVE_MEMBERS", "Move Members") - .replace("USE_VAD", "Use VAD") - .replace("CHANGE_NICKNAME", "Change Nickname") - .replace("MANAGE_NICKNAMES", "Manage Nicknames") - .replace("MANAGE_ROLES", "Manage Roles") - .replace("MANAGE_WEBHOOKS", "Manage Webhooks") - .replace("MANAGE_EMOJIS", "Manage Emojis")}\n`; - }); - embed.setDescription(x + description + x); - message.channel.send(embed); - }, -}; diff --git a/commands/Utilities/ping.js b/commands/Utilities/ping.js @@ -1,28 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "ping", - description: "Check bot latency to Discord API", - run: async (client, message, args) => { - const msg = await message.channel.send("Pinging..."); - const messageping = msg.createdTimestamp - message.createdTimestamp; - const Embed = new MessageEmbed() - .setTitle("🏓 Pong!") - .setAuthor( - `${message.author.username}`, - message.author.displayAvatarURL() - ) - .setDescription( - `📨 • **Message Latency** \`${Math.floor( - messageping - )}ms\`\n🛰️ • **Bot Latency** \`${Math.round(client.ws.ping)}ms\`` - ) - .setColor( - messageping < 350 - ? "GREEN" - : messageping < 500 && messageping > 350 - ? "YELLOW" - : "RED" - ); - msg.edit("", Embed); - }, -}; diff --git a/commands/Utilities/poll.js b/commands/Utilities/poll.js @@ -1,24 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "poll", - description: "Start a poll in a channel", - category: "Utilities", - Owner: true, - run: async (client, message, args) => { - let pollDescription = ` - ${message.author} asks: ${args.slice(1).join(" ")} - `; - const channel = message.mentions.channels.first(); - if (!channel) return client.err(message, "Utilities", "poll", 28); - if (!pollDescription) return client.err(message, "Utilities", "poll", 12); - let embedPoll = new MessageEmbed() - .setTitle(`${message.author.username} made a poll`) - .setDescription(pollDescription) - .setFooter(`Made by ${client.author}`) - .setTimestamp() - .setColor("GREEN"); - let msgEmbed = await channel.send(embedPoll); - await msgEmbed.react("👍"); - await msgEmbed.react("👎"); - }, -}; diff --git a/commands/Utilities/rank.js b/commands/Utilities/rank.js @@ -1,42 +0,0 @@ -const { MessageAttachment } = require("discord.js"); -const Levels = require("discord-xp"); -const canvacord = require("canvacord"); -module.exports = { - name: "rank", - description: "Shows the current level and rank of the user!", - usage: "{User}", - timeout: 5000, - category: "Utilities", - Level: true, - run: async (client, message, args) => { - if (!message.guild) return; - if (message.author.bot) return; - const target = - message.mentions.users.first() || - message.guild.members.cache.find( - r => r.user.username.toLowerCase() === args[0].toLocaleLowerCase() - ) || - message.guild.members.cache.find( - r => r.displayName.toLowerCase() === args[0].toLocaleLowerCase() - ) || - message.guild.members.cache.get(args[0]) || - message.author; - const user = await Levels.fetch(target.id, message.guild.id, true); - if (!user) return client.err(message, "Utilities", "rank", 10); - const neededXp = Levels.xpFor(parseInt(user.level) + 1); - const Rank = new canvacord.Rank() - .setAvatar(target.displayAvatarURL({ dynamic: false, format: "png" })) - .setCurrentXP(user.xp) - .setRank(parseInt(user.position)) - .setLevel(user.level) - .setRequiredXP(neededXp) - .setStatus(target.presence.status) - .setProgressBar("BLACK", "COLOR") - .setUsername(target.username) - .setDiscriminator(target.discriminator); - Rank.build().then(data => { - const attachment = new MessageAttachment(data, "RankCard.png"); - message.reply(attachment); - }); - }, -}; diff --git a/commands/Utilities/report.js b/commands/Utilities/report.js @@ -1,78 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); - -module.exports = { - name: "report", - description: "Report a bug of the bot", - category: "Utilities", - run: async (client, message, args) => { - const questions = [ - "Describe the bug", - //"question 2" - ]; - - let collectCounter = 0; - let endCounter = 0; - - const filter = m => m.author.id === message.author.id; - message.inlineReply("Check your dm."); - const appStart = await message.author.send( - new MessageEmbed() - .setAuthor(message.author.username, message.author.displayAvatarURL()) - .setDescription(questions[collectCounter++]) - .setFooter(client.user.username) - .setTimestamp() - ); - const channel = appStart.channel; - - const collector = channel.createMessageCollector(filter); - - collector.on("collect", () => { - if (collectCounter < questions.length) { - channel.send( - new MessageEmbed() - .setAuthor( - message.author.username, - message.author.displayAvatarURL() - ) - .setDescription(questions[collectCounter++]) - .setFooter(client.user.username) - .setTimestamp() - ); - } else { - channel.send( - new MessageEmbed() - .setTitle("SUCCESS!") - .setDescription( - "You have reported a bug.\nPlease wait for us to solve it" - ) - .setColor("GREEN") - ); - collector.stop("fulfilled"); - } - }); - - const appsChannel = client.channels.cache.get(client.ReportLog); - collector.on("end", (collected, reason) => { - if (reason === "fulfilled") { - let index = 1; - const mapedResponses = collected - .map(msg => { - return `${questions[endCounter++]}**\n->** ${msg.content}`; - }) - .join("\n\n"); - - appsChannel.send( - new MessageEmbed() - .setAuthor( - message.author.tag, - message.author.displayAvatarURL({ dynamic: true }) - ) - .setTitle("New Bug") - .setDescription(mapedResponses) - .setColor("ORANGE") - .setTimestamp() - ); - } - }); - }, -}; diff --git a/commands/Utilities/roleinfo.js b/commands/Utilities/roleinfo.js @@ -1,90 +0,0 @@ -const moment = require("moment"); -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "roleinfo", - aliases: ["role"], - category: "Utilities", - run: async (client, message, args) => { - const role = - message.mentions.roles.first() || - message.guild.roles.cache.get(args[0]) || - message.guild.roles.cache.find(r => r.name == args[0]) || - message.member.roles.cache.highest; - const permissions = { - ADMINISTRATOR: "Administrator", - VIEW_AUDIT_LOG: "View Audit Log", - VIEW_GUILD_INSIGHTS: "View Server Insights", - MANAGE_GUILD: "Manage Server", - MANAGE_ROLES: "Manage Roles", - MANAGE_CHANNELS: "Manage Channels", - KICK_MEMBERS: "Kick Members", - BAN_MEMBERS: "Ban Members", - CREATE_INSTANT_INVITE: "Create Invite", - CHANGE_NICKNAME: "Change Nickname", - MANAGE_NICKNAMES: "Manage Nicknames", - MANAGE_EMOJIS: "Manage Emojis", - MANAGE_WEBHOOKS: "Manage Webhooks", - VIEW_CHANNEL: "Read Text Channels & See Voice Channels", - SEND_MESSAGES: "Send Messages", - SEND_TTS_MESSAGES: "Send TTS Messages", - MANAGE_MESSAGES: "Manage Messages", - EMBED_LINKS: "Embed Links", - ATTACH_FILES: "Attach Files", - READ_MESSAGE_HISTORY: "Read Message History", - MENTION_EVERYONE: "Mention @everyone, @here, and All Roles", - USE_EXTERNAL_EMOJIS: "Use External Emojis", - ADD_REACTIONS: "Add Reactions", - CONNECT: "Connect", - SPEAK: "Speak", - STREAM: "Video", - MUTE_MEMBERS: "Mute Members", - DEAFEN_MEMBERS: "Deafen Members", - MOVE_MEMBERS: "Move Members", - USE_VAD: "Use Voice Activity", - PRIORITY_SPEAKER: "Priority Speaker", - }; - const yesno = { - true: "`Yes", - false: "`No`", - }; - if (!role) return client.err(message, "Utilities", "roleinfo", 3); - const rolePermissions = role.permissions.toArray(); - const finalPermissions = []; - for (const permission in permissions) { - if (rolePermissions.includes(permission)) - finalPermissions.push(`✔️ ${permissions[permission]}`); - else finalPermissions.push(`❌ ${permissions[permission]}`); - } - - const position = `\`${message.guild.roles.cache.size - role.position}\`/\`${ - message.guild.roles.cache.size - }\``; - - const embed = new MessageEmbed() - .setURL(client.web) - .setColor(client.color) - .setTimestamp() - .setAuthor( - message.author.tag, - message.author.displayAvatarURL({ dynamic: true }) - ) - .setTitle(`Role Info`) - .addField("Name", role, true) - .addField("ID", `\`${role.id}\``, true) - .addField("Position", position, true) - .addField("Mentionable", yesno[role.mentionable], true) - .addField("Bot Role", yesno[role.managed], true) - .addField("Visible", yesno[role.hoist], true) - .addField("Color", `\`${role.hexColor.toUpperCase()}\``, true) - .addField( - "Creation Date", - `\`${moment(role.createdAt).format("DD/MMM/YYYY")}\``, - true - ) - .addField( - "Permissions", - `\`\`\`diff\n${finalPermissions.join("\n")}\`\`\`` - ); - message.inlineReply(embed); - }, -}; diff --git a/commands/Utilities/servericon.js b/commands/Utilities/servericon.js @@ -1,16 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); - -module.exports = { - name: "servericon", - description: "View the icon of the server", - category: "Utilities", - run: async (client, message, args) => { - const Embed = new MessageEmbed() - .setTitle(`Icon of ${message.guild.name}`) - .setURL(client.web) - .setTimestamp() - .setFooter(`Requested by ${message.author.tag}`) - .setImage(message.guild.iconURL({ dynamic: true, size: 2048 })); - message.inlineReply(Embed); - }, -}; diff --git a/commands/Utilities/serverinfo.js b/commands/Utilities/serverinfo.js @@ -1,118 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const moment = require("moment"); - -const filterLevels = { - DISABLED: "Off", - MEMBERS_WITHOUT_ROLES: "No Role", - ALL_MEMBERS: "Everyone", -}; - -const verificationLevels = { - NONE: "None", - LOW: "Low", - MEDIUM: "Medium", - HIGH: "High", - VERY_HIGH: "Very High", -}; - -const regions = { - brazil: "Brazil", - europe: "Europe", - hongkong: "Hong Kong", - india: "India", - japan: "Japan", - russia: "Russia", - singapore: "Singapore", - southafrica: "South Africa", - sydeny: "Sydeny", - "us-central": "US Central", - "us-east": "US East", - "us-west": "US West", - "us-south": "US South", -}; - -module.exports = { - name: "serverinfo", - description: "Check the info of the server", - category: "Utilities", - run: async (client, message, args) => { - const roles = message.guild.roles.cache - .sort((a, b) => b.position - a.position) - .map(role => role.toString()) - .slice(0, -1); - const members = message.guild.members.cache; - const channels = message.guild.channels.cache; - const emojis = message.guild.emojis.cache; - - const embed = new MessageEmbed() - .setDescription(`**Guild information for __${message.guild.name}__**`) - .setColor(client.color) - .setThumbnail(message.guild.iconURL({ dynamic: true })) - .addField("General", [ - `**❯ Name:** ${message.guild.name}`, - `**❯ ID:** ${message.guild.id}`, - `**❯ Owner:** ${message.guild.owner.user.tag} (${message.guild.ownerID})`, - `**❯ Region:** ${regions[message.guild.region]}`, - `**❯ Boost Tier:** ${ - message.guild.premiumTier - ? `Tier ${message.guild.premiumTier}` - : "None" - }`, - `**❯ Explicit Filter:** ${ - filterLevels[message.guild.explicitContentFilter] - }`, - `**❯ Verification Level:** ${ - verificationLevels[message.guild.verificationLevel] - }`, - `**❯ Time Created:** ${moment(message.guild.createdTimestamp).format( - "LT" - )} ${moment(message.guild.createdTimestamp).format("LL")} ${moment( - message.guild.createdTimestamp - ).fromNow()}`, - `**❯ Community Features:** ${ - message.guild.features.join(", ") || "No Community Features!" - }`, - "\u200b", - ]) - .addField("Statistics", [ - `**❯ Role Count:** ${roles.length}`, - `**❯ Emoji Count:** ${emojis.size}`, - `**❯ Regular Emoji Count:** ${ - emojis.filter(emoji => !emoji.animated).size - }`, - `**❯ Animated Emoji Count:** ${ - emojis.filter(emoji => emoji.animated).size - }`, - `**❯ Member Count:** ${message.guild.memberCount}`, - `**❯ Humans:** ${members.filter(member => !member.user.bot).size}`, - `**❯ Bots:** ${members.filter(member => member.user.bot).size}`, - `**❯ Text Channels:** ${ - channels.filter(channel => channel.type === "text").size - }`, - `**❯ Voice Channels:** ${ - channels.filter(channel => channel.type === "voice").size - }`, - `**❯ Boost Count:** ${message.guild.premiumSubscriptionCount || "0"}`, - "\u200b", - ]) - .addField("Presence", [ - `**❯ Online:** ${ - members.filter(member => member.presence.status === "online").size - }`, - `**❯ Idle:** ${ - members.filter(member => member.presence.status === "idle").size - }`, - `**❯ Do Not Disturb:** ${ - members.filter(member => member.presence.status === "dnd").size - }`, - `**❯ Offline:** ${ - members.filter(member => member.presence.status === "offline").size - }`, - "\u200b", - ]) - .setURL(client.web) - //.addField(`Roles [${roles.length - 1}]`, roles.length < 10 ? roles.join(' **|** ') : roles.length > 10 ? roles.join(' **|** ') : 'None') - .setTimestamp(); - message.channel.send(embed); - }, -}; diff --git a/commands/Utilities/snipe.js b/commands/Utilities/snipe.js @@ -1,73 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -const moment = require("moment"); -module.exports = { - name: "snipe", - description: "Snipes a deleted message.", - category: "Utilities", - run: async (client, message, args) => { - var i = 0; - var description = ""; - const embed = new MessageEmbed() - .setAuthor( - `Sniped by ${message.author.tag}`, - message.author.displayAvatarURL({ dynamic: true }) - ) - .setColor(client.color) - .setFooter(`Made by ${client.author}`) - .setURL(client.web); - client.snipes.reverse().forEach(msg => { - if (msg.channel.id != message.channel.id) return; - if (i >= 5) return; - if (msg.attachment) { - if (msg.attachment.length == 1) { - description = - description + - `\n\n**Author:** ${msg.author.username}#${ - msg.author.discriminator - } (Deleted ${moment(msg.date).fromNow()})\n**ID:** ${ - msg.author.id - }\n**Content:** ${ - msg.content - }\n**Attachment URL:** [Click to view](${msg.attachment})`; - i++; - } else if (msg.attachment.length > 1) { - const map = msg.attachment.map( - (s, i) => `**${i + 1}:** [Click to view](${s})` - ); - description = - description + - `\n\n**Author:** ${msg.author.username}#${ - msg.author.discriminator - } (Deleted ${moment(msg.date).fromNow()})\n**ID:** ${ - msg.author.id - }\n**Content:** ${msg.content}\n**Attachment URLs:** \n${map.join( - "\n" - )}`; - i++; - } else { - description = - description + - `\n\n**Author:** ${msg.author.username}#${ - msg.author.discriminator - } (Deleted ${moment(msg.date).fromNow()})\n**ID:** ${ - msg.author.id - }\n**Content:** ${msg.content}`; - i++; - } - } else { - description = - description + - `\n\n**Author:** ${msg.author.username}#${ - msg.author.discriminator - } (Deleted ${moment(msg.date).fromNow()})\n**ID:** ${ - msg.author.id - }\n**Content:** ${msg.content}`; - i++; - } - }); - if (i == 0) return client.err(message, "Utilities", "snipe", 10); - embed.setDescription(description); - embed.setTimestamp(); - return message.inlineReply(embed); - }, -}; diff --git a/commands/Utilities/suggest.js b/commands/Utilities/suggest.js @@ -1,77 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "suggest", - description: "Make a suggestion of the bot", - category: "Utilities", - run: async (client, message, args) => { - const questions = [ - "Describe the suggestion", - //"question 2" - ]; - - let collectCounter = 0; - let endCounter = 0; - - const filter = m => m.author.id === message.author.id; - message.inlineReply("Check your dm."); - const appStart = await message.author.send( - new MessageEmbed() - .setAuthor(message.author.username, message.author.displayAvatarURL()) - .setDescription(questions[collectCounter++]) - .setFooter(client.user.username) - .setTimestamp() - ); - const channel = appStart.channel; - - const collector = channel.createMessageCollector(filter); - - collector.on("collect", () => { - if (collectCounter < questions.length) { - channel.send( - new MessageEmbed() - .setAuthor( - message.author.username, - message.author.displayAvatarURL() - ) - .setDescription(questions[collectCounter++]) - .setFooter(client.user.username) - .setTimestamp() - ); - } else { - channel.send( - new MessageEmbed() - .setTitle("SUCCESS!") - .setDescription( - "You have sent a suggestion.\nPlease wait for us to review it" - ) - .setColor("GREEN") - ); - collector.stop("fulfilled"); - } - }); - - const appsChannel = client.channels.cache.get(client.ReportLog); - collector.on("end", (collected, reason) => { - if (reason === "fulfilled") { - let index = 1; - const mapedResponses = collected - .map(msg => { - return `${questions[endCounter++]}**\n->** ${msg.content}`; - }) - .join("\n\n"); - - appsChannel.send( - new MessageEmbed() - .setAuthor( - message.author.tag, - message.author.displayAvatarURL({ dynamic: true }) - ) - .setTitle("New Suggestion") - .setDescription(mapedResponses) - .setColor("ORANGE") - .setTimestamp() - ); - } - }); - }, -}; diff --git a/commands/Utilities/timer.js b/commands/Utilities/timer.js @@ -1,61 +0,0 @@ -const ms = require("ms"); -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "timer", - description: "Set a timer for yourself", - usage: "(Time)", - category: "Utilities", - run: async (client, message, args) => { - if (!args[0]) { - return client.err(message, "Utilities", "timer", 19); - } - if (!args[0].endsWith("d")) { - if (!args[0].endsWith("h")) { - if (!args[0].endsWith("m")) { - if (!args[0].endsWith("s")) { - return client.err(message, "Utilities", "timer", 101); - } - } - } - } - if (isNaN(args[0][0])) { - return client.err(message, "Utilities", "timer", 101); - } - client.Timers.set(message.author.id + " G " + message.guild.name, { - Guild: message.guild.name, - Author: { - Tag: message.author.tag, - ID: message.author.id, - }, - Time: ms(args[0]), - }); - message.channel.send( - `${message.author} you have set a timer for ${ms(ms(args[0]), { - long: true, - })}.` - ); - setTimeout(() => { - let Embed = new MessageEmbed() - .setTitle(`Timer finished in ${message.guild.name}.`) - .setDescription( - `Your timer for ${ms(ms(args[0]), { - long: true, - })} has finished.` - ) - .setURL(client.web) - .setColor(`GREEN`); - let embe = new MessageEmbed() - .setTitle(`Timer finished.`) - .setDescription( - `Your timer for ${ms(ms(args[0]), { - long: true, - })} has finished.` - ) - .setURL(client.web) - .setColor(`GREEN`); - message.channel.send(`${message.author}`, embe); - message.author.send(Embed); - client.Timers.delete(message.author.id + " G " + message.guild.name); - }, ms(args[0])); - }, -}; diff --git a/commands/Utilities/userinfo.js b/commands/Utilities/userinfo.js @@ -1,118 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const moment = require("moment"); -module.exports = { - name: "userinfo", - aliases: ["whois"], - description: "Check the info of a user", - usage: "{User}", - category: "Utilities", - run: async (client, message, args) => { - const member = - message.mentions.members.first() || - message.guild.members.cache.get(args[0]) || - message.guild.members.cache.find( - r => - r.user.username.toLowerCase() === args.join(" ").toLocaleLowerCase() - ) || - message.guild.members.cache.find( - r => r.displayName.toLowerCase() === args.join(" ").toLocaleLowerCase() - ) || - message.member; - const flags = { - DISCORD_EMPLOYEE: "Discord Staff<:staff:840231971526803467>", - DISCORD_PARTNER: "Partnered Server Owner<:partner:840231939944480829>", - BUGHUNTER_LEVEL_1: "Discord Bug Hunter<:bughunter:840231967600803920>", - BUGHUNTER_LEVEL_2: "Discord Bug Hunter<:bughunterlv2:840231970017771571>", - HYPESQUAD_EVENTS: "HypeSquad Events<:HypeSquad:840231908599922721>", - HOUSE_BRAVERY: "HypeSquad Bravery<:bravery:840231941974655007>", - HOUSE_BRILLIANCE: "HypeSquad Brilliance<:brilliance:840231943764443136>", - HOUSE_BALANCE: "HypeSquad Balance<:balance:840231925876523018>", - EARLY_SUPPORTER: "Early Supporter<:earlysupporter:840231983216984085>", - TEAM_USER: "Team User", - SYSTEM: "System", - VERIFIED_BOT: "Verified Bot<:VerifiedBot:840231982054375425>", - VERIFIED_DEVELOPER: - "Early Verified Bot Developer<:discord_bot_dev:840231906200387666>", - }; - let status; - switch (member.user.presence.status) { - case "online": - status = "<:online:840231921123721237>Online"; - break; - case "dnd": - status = "<:do_not_disturb:840231907715448842>Do Not Disturb"; - break; - case "idle": - status = "<:idle:840231935485149184>Idle"; - break; - case "offline": - status = "<:offline:840231954897305620>Offline"; - break; - } - let x = Date.now() - member.user.createdAt; - let y = Date.now() - message.guild.members.cache.get(member.id).joinedAt; - let created = Math.floor(x / 86400000); - let joined = Math.floor(y / 86400000); - const members = message.guild.member(member); - let nickname = - members.nickname !== undefined && members.nickname !== null - ? members.nickname - : "None"; - const roles = member.roles.cache - .sort((a, b) => b.position - a.position) - .map(role => role.toString()) - .slice(0, -1); - const userFlags = member.user.flags.toArray(); - let createdate = moment - .utc(member.user.createdAt) - .format("dddd, MMMM Do YYYY, HH:mm:ss"); - let joindate = moment - .utc(member.joinedAt) - .format("dddd, MMMM Do YYYY, HH:mm:ss"); - - const infoembed = new MessageEmbed() - .setAuthor( - member.user.tag, - member.user.displayAvatarURL({ dynamic: true, size: 2048 }) - ) - .setTimestamp() - .setColor(client.color) - .setThumbnail(member.user.displayAvatarURL({ dynamic: true, size: 512 })) - .setColor(member.displayHexColor || "BLUE") - .addField("User", [ - `**❯ Username:** ${member.user.username}`, - `**❯ Discriminator:** ${member.user.discriminator}`, - `**❯ Nickname:** ${nickname}`, - `**❯ ID:** ${member.id}`, - `**❯ Flags:** ${ - userFlags.length - ? userFlags.map(flag => flags[flag]).join(" **|** ") - : "None" - }`, - `**❯ Avatar:** [Link to avatar](${member.user.displayAvatarURL({ - dynamic: true, - size: 2048, - })})`, - `**❯ Time Created:** ${createdate} \nsince ${created} day(s) ago`, - `**❯ Status:** ${status}`, - `**❯ Game:** ${ - member.presence.activities[0] - ? member.presence.activities[0].name - : "None" - }`, - `\u200b`, - ]) - .addField("Member", [ - `**❯ Highest Role:** ${ - member.roles.highest.id === message.guild.id - ? "None" - : member.roles.highest.name - }`, - `**❯ Server Join Date:** ${joindate} \nsince ${joined} day(s) ago`, - //`**❯ Roles [${roles.length}]:** ${roles.length < 10 ? roles.join(" **|** ") : roles.length > 10 ? roles.join(" **|** ") : "None"}`, - - `\u200b`, - ]); - message.inlineReply(infoembed); - }, -}; diff --git a/config.json b/config.json @@ -3,12 +3,11 @@ "URL": "https://cath.gq/", "color": "02023a", "ca": "**[Invite](https://discord.com/api/oauth2/authorize?client_id=800966959268364288&permissions=mongodb+srv://cath_exe:[email protected]/Data4231314550&scope=bot%20applications.commands) | [Support](https://discord.gg/SbQHChmGcp) | [YouTube](https://youtube.com/Kirito01) | [Website](https://www.cath.gq)**", - "Suggestion":"", - "Report": "", - "Welcome": "", - "DMLog": "", - "CMDLog": "", - "ReadyLog": "", - "ErrorLog": "", - "ServerLog": "" + "Suggestion": "853319776034226186", + "Report": "853319776034226186", + "Welcome": "837913442228371456", + "DMLog": "850434924536135690", + "CMDLog": "848613827226239046", + "ErrorLog": "848613745486856233", + "ServerLog": "848613714537873518" } diff --git a/events/afk.js b/events/afk.js @@ -25,13 +25,7 @@ client.on("messageCreate", async message => { message.reply( `${message.mentions.members.first().user.tag}is in afk (${data1.AFK})` ); - } else { - return; } - } else { - return; } - } else { - return; } }); diff --git a/events/card.js b/events/card.js @@ -1,64 +0,0 @@ -const { MessageAttachment } = require("discord.js"); -const client = require("../bot"); -const schema = require("../models/guilds"); -const canvas = require("discord-canvas"); - -client.on("guildMemberAdd", async member => { - schema.findOne({ Guild: member.guild.id }, async (e, data) => { - if (!data) return; - const user = member.user; - const image = await new canvas.Welcome() - .setUsername(user.username) - .setDiscriminator(user.discriminator) - .setMemberCount(member.guild.memberCount) - .setGuildName(member.guild.name) - .setAvatar(user.displayAvatarURL({ dynamic: false, format: "png" })) - .setColor("border", client.color) - .setColor("username-box", client.color) - .setColor("discriminator-box", client.color) - .setColor("message-box", client.color) - .setColor("title", "#89FB23") - .setColor("avatar", client.color) - .setBackground( - "https://cdn.discordapp.com/attachments/815622126526005268/819116213925052436/image0.png" - ) - .toAttachment(); - const attachment = new MessageAttachment( - image.toBuffer(), - "goodbye-image.png" - ); - const channel = member.guild.channels.cache.get(data.WelcomeChannel); - if (!channel) return; - channel.send(attachment); - }); -}); - -client.on("guildMemberRemove", async member => { - schema.findOne({ Guild: member.guild.id }, async (e, data) => { - if (!data) return; - const user = member.user; - const image = await new canvas.Goodbye() - .setUsername(user.username) - .setDiscriminator(user.discriminator) - .setMemberCount(member.guild.memberCount) - .setGuildName(member.guild.name) - .setAvatar(user.displayAvatarURL({ dynamic: false, format: "png" })) - .setColor("border", client.color) - .setColor("username-box", client.color) - .setColor("discriminator-box", client.color) - .setColor("message-box", client.color) - .setColor("title", "#89FB23") - .setColor("avatar", client.color) - .setBackground( - "https://cdn.discordapp.com/attachments/815622126526005268/819116213925052436/image0.png" - ) - .toAttachment(); - const attachment = new MessageAttachment( - image.toBuffer(), - "goodbye-image.png" - ); - const channel = member.guild.channels.cache.get(data.GoodbyeChannel); - if (!channel) return; - channel.send(attachment); - }); -}); diff --git a/events/emoji.js b/events/emoji.js @@ -4,11 +4,9 @@ client.on("messageCreate", async message => { if ( client.emojis.cache.find(emoji => emoji.name === str) || message.guild.emojis.cache.find(emoji => emoji.name === str) - ) { + ) return true; - } else { - return false; - } + else return false; } if (message.content.startsWith(":") && message.content.endsWith(":")) { let EmojiName = message.content.slice(1, -1); diff --git a/events/goodBye.js b/events/goodBye.js @@ -1,68 +0,0 @@ -const { MessageAttachment } = require("discord.js"); -const client = require("../bot"); -const schema = require("../models/guilds"); -const canvas = require("discord-canvas"); - -client.on("guildMemberAdd", async member => { - schema.findOne({ Guild: member.guild.id }, async (e, data) => { - if (!data) return; - const user = member.user; - const image = await new canvas.Welcome() - .setUsername(user.username) - .setDiscriminator(user.discriminator) - .setMemberCount(member.guild.memberCount) - .setGuildName(member.guild.name) - .setAvatar(user.displayAvatarURL({ dynamic: false, format: "png" })) - .setColor("border", client.color) - .setColor("username-box", client.color) - .setColor("discriminator-box", client.color) - .setColor("message-box", client.color) - .setColor("title", "#89FB23") - .setColor("avatar", client.color) - .setBackground( - "https://cdn.discordapp.com/attachments/815622126526005268/819116213925052436/image0.png" - ) - .toAttachment(); - - const attachment = new MessageAttachment( - image.toBuffer(), - "goodbye-image.png" - ); - - const channel = member.guild.channels.cache.get(data.WelcomeChannel); - if (!channel) return; - channel.send(attachment); - }); -}); - -client.on("guildMemberRemove", async member => { - schema.findOne({ Guild: member.guild.id }, async (e, data) => { - if (!data) return; - const user = member.user; - const image = await new canvas.Goodbye() - .setUsername(user.username) - .setDiscriminator(user.discriminator) - .setMemberCount(member.guild.memberCount) - .setGuildName(member.guild.name) - .setAvatar(user.displayAvatarURL({ dynamic: false, format: "png" })) - .setColor("border", client.color) - .setColor("username-box", client.color) - .setColor("discriminator-box", client.color) - .setColor("message-box", client.color) - .setColor("title", "#89FB23") - .setColor("avatar", client.color) - .setBackground( - "https://cdn.discordapp.com/attachments/815622126526005268/819116213925052436/image0.png" - ) - .toAttachment(); - - const attachment = new MessageAttachment( - image.toBuffer(), - "goodbye-image.png" - ); - - const channel = member.guild.channels.cache.get(data.GoodbyeChannel); - if (!channel) return; - channel.send(attachment); - }); -}); diff --git a/events/guild.js b/events/guild.js @@ -1,46 +1,63 @@ const client = require("../bot"); const { MessageEmbed } = require("discord.js"); -const { Welcome } = require("../config.json"); -client.on("guildMemberAdd", async member => { - const channel = member.guild.channels.cache.find( - channel => channel.id === Welcome - ); - if (!channel) return; - const embed = new MessageEmbed() - .setTitle( - `<:YouTube:841186450497339412> ${member},welcome to Night\'s official Discord server! <:YouTube:841186450497339412>` - ) - .setThumbnail(member.guild.iconURL({ dynamic: true })) - .addField( - "Read the rules at <#799074874513555496> channel, and enjoy your stay~", - `We now have ${member.guild.memberCount} members!` - ) - .setFooter( - `${member.user.tag} joined the server!`, - member.user.displayAvatarURL({ dynamic: true }) - ) - .setColor(client.color) - .setTimestamp(); - - channel.send(embed); +const db = require("../models/guilds"); +const config = require("../config.json"); +client.on("guildCreate", guild => { + client.channels.cache.get(client.ServerLog).send({ + embeds: [ + new MessageEmbed() + .setTitle("New Server") + .addField( + "Server Info", + `**>Server Name**: \n${guild.name} + **>Server ID**: \n${guild.id} + **>Server Member Count**: \n${guild.memberCount}` + ) + .setFooter( + `${client.user.username} Currently in ${client.guilds.cache.size} servers`, + client.user.displayAvatarURL() + ) + .setTimestamp() + .setThumbnail(guild.iconURL({ dynamic: true })) + .setColor("GREEN"), + ], + }); + const newdb = new db({ + Guild: guild.id, + Prefix: config.prefix, + }); + newdb.save(); }); -client.on("guildMemberRemove", async member => { - const channel = member.guild.channels.cache.find( - channel => channel.id === Welcome - ); - if (!channel) return; - const embed = new MessageEmbed() - .setTitle( - `<:YouTube:841186450497339412> ${member} can\'t handle being cool! <:YouTube:841186450497339412>` - ) - .setThumbnail(member.guild.iconURL({ dynamic: true })) - .setDescription(`We now only have ${member.guild.memberCount} members`) - .setFooter( - `${member.user.tag} leaved the server!`, - member.user.displayAvatarURL({ dynamic: true }) - ) - .setColor(client.color) - .setTimestamp(); - channel.send(embed); +client.on("guildDelete", async guild => { + client.data.DelGuild(guild.id); + client.channels.cache.get(client.ServerLog).send({ + embeds: [ + new MessageEmbed() + .setTitle("Deleted Server") + .addField( + "Server Info", + `**>Server Name**: \n${guild.name} + **>Server ID**: \n${guild.id} + **>Server Member Count**: \n${guild.memberCount}` + ) + .setFooter( + `${client.user.username} Currently in ${client.guilds.cache.size} servers`, + client.user.displayAvatarURL() + ) + .setTimestamp() + .setThumbnail(guild.iconURL({ dynamic: true })) + .setColor("RED"), + ], + }); }); +client.prefix = async function (message) { + let custom; + if (!message.guild) return; + const data = await db + .findOne({ Guild: message.guild.id }) + .catch(err => console.log(err)); + if (data) custom = data.Prefix; + else custom = client.configprefix; + return custom; +}; diff --git a/events/guildCreate.js b/events/guildCreate.js @@ -1,33 +0,0 @@ -const client = require("../bot"); -const { MessageEmbed } = require("discord.js"); -const db = require("../models/guilds"); -const config = require("../config.json"); -client.on("guildCreate", guild => { - client.channels.cache.get(client.ServerLog).send({ - embeds: [ - new MessageEmbed() - .setTitle("New Server") - .addField("Server Info", [ - `**>Server Name**: \n${guild.name}`, - `**>Server ID**: \n${guild.id}`, - `**>Server Member Count**: \n${guild.memberCount}`, - ]) - .addField("Owner Info", [ - `**>Owner Tag**: \n${guild.owner.user.tag}`, - `**>Owner ID**: \n${guild.owner.id}`, - ]) - .setFooter( - `${client.user.username} Currently in ${client.guilds.cache.size} servers`, - client.user.displayAvatarURL() - ) - .setTimestamp() - .setThumbnail(guild.iconURL({ dynamic: true })) - .setColor("GREEN"), - ], - }); - const newdb = new db({ - Guild: guild.id, - Prefix: config.prefix, - }); - newdb.save(); -}); diff --git a/events/guildDelete.js b/events/guildDelete.js @@ -1,47 +0,0 @@ -const client = require("../bot"); -const db = require("../models/guilds"); -const { prefix } = require("../config.json"); -const { MessageEmbed } = require("discord.js"); - -client.on("guildDelete", async guild => { - client.data.DelGuild(guild.id); - client.channels.cache.get(client.ServerLog).send({ - embeds: [ - new MessageEmbed() - .setTitle("Deleted Server") - .addField("Server Info", [ - `**>Server Name**: \n${guild.name}`, - `**>Server ID**: \n${guild.id}`, - `**>Server Member Count**: \n${guild.memberCount}`, - ]) - .addField("Owner Info", [ - `**>Owner Tag**: \n${guild.owner.user.tag}`, - `**>Owner ID**: \n${guild.owner.id}`, - ]) - .setFooter( - `${client.user.username} Currently in ${client.guilds.cache.size} servers`, - client.user.displayAvatarURL() - ) - .setTimestamp() - .setThumbnail(guild.iconURL({ dynamic: true })) - .setColor("RED"), - ], - }); -}); - -/** - * @param {Client} client - */ -client.prefix = async function (message) { - let custom; - if (!message.guild) return; - const data = await db - .findOne({ Guild: message.guild.id }) - .catch(err => console.log(err)); - if (data) { - custom = data.Prefix; - } else { - custom = prefix; - } - return custom; -}; diff --git a/events/log.js b/events/log.js @@ -1,447 +0,0 @@ -// const Discord = require("discord.js"); -// const Guild = require("../models/guilds"); -// const client = require("../bot"); -// let types = { -// text: "Text Channel", -// voice: "Voice Channel", -// null: "No Type", -// news: "News Channel", -// store: "Store Channel", -// category: "Category", -// }; -// client.on("channelCreate", async channel => { -// send_log( -// client, -// channel.guild, -// "GREEN", -// "Channel Created", -// `Channel Name: \`${channel.name}\`\nChannel ID: \`${ -// channel.id -// }\`\nChannel Type: \`${types[channel.type]}\`\nChannel Position: \`${ -// channel.rawPosition -// }\`` -// ); -// }); -// client.on("channelDelete", async channel => { -// send_log( -// client, -// channel.guild, -// "RED", -// "Channel Deleted", -// `Channel Name: \`${channel.name}\`\nChannel ID: \`${ -// channel.id -// }\`\nChannel Type: \`${types[channel.type]}\`\nChannel Position: \`${ -// channel.rawPosition -// }\`` -// ); -// }); -// client.on("channelPinsUpdate", async (channel, time) => { -// send_log( -// client, -// channel.guild, -// "YELLOW", -// "Channel Pins Update", -// `Channel Name: \`${channel.name}\`\nChannel ID: \`${ -// channel.id -// }\`\nPinned at \`${time.toLocaleString()}\``, -// "https://i.stack.imgur.com/d1JEp.png" -// ); -// }); -// client.on("channelUpdate", function (oldChannel, newChannel) { -// let newCat = newChannel.parent ? newChannel.parent.name : "NO PARENT"; -// let guildChannel = newChannel.guild; -// if (!guildChannel || !guildChannel.available) return; -// if (oldChannel.name != newChannel.name) { -// send_log( -// client, -// oldChannel.guild, -// "YELLOW", -// "Channel Updated - Name", -// `Channel Name: \`${oldChannel.name}\`\nChannel Id: \`${oldChannel.id}\`\n\n` + -// `Channel Name: \`${newChannel.name}\`\nChannel Id: \`${newChannel.id}\`` -// ); -// } else if (oldChannel.type != newChannel.type) { -// send_log( -// client, -// oldChannel.guild, -// "YELLOW", -// "Channel Updated - Type", -// `Channel Name: \`${oldChannel.name}\`\nChannel Id: \`${ -// oldChannel.id -// }\`\nChannelTYPE: \`${types[oldChannel.type]}\`\n\n` + -// `Channel Name: \`${newChannel.name}\`\nChannel Id: \`${ -// newChannel.id -// }\`\nChannelTYPE: \`${types[newChannel.type]}\`` -// ); -// } else if (oldChannel.topic != newChannel.topic) { -// send_log( -// client, -// oldChannel.guild, -// "YELLOW", -// "Channel UPDATED - TOPIC", -// `Channel Name: \`${oldChannel.name}\`\nChannel Id: \`${oldChannel.id}\`\nChannelTOPIC: \`${oldChannel.topic}\`\n\n` + -// `Channel Name: \`${newChannel.name}\`\nChannel Id: \`${newChannel.id}\`\nChannelTOPIC: \`${newChannel.topic}\`` -// ); -// } -// }); -// client.on("emojiCreate", function (emoji) { -// send_log( -// client, -// emoji.guild, -// "GREEN", -// "EMOJI CREATED", -// `EMOJI: ${emoji}\nEMOJINAME: ${emoji.name}\nEMOJIID: ${emoji.id}\nEMOJIURL: ${emoji.url}` -// ); -// }); -// client.on("emojiDelete", function (emoji) { -// send_log( -// client, -// emoji.guild, -// "RED", -// "EMOJI DELETED", -// `EMOJI: ${emoji}\nEMOJINAME: ${emoji.name}\nEMOJIID: ${emoji.id}\nEMOJIURL: ${emoji.url}` -// ); -// }); - -// client.on("emojiUpdate", function (oldEmoji, newEmoji) { -// if (oldEmoji.name !== newEmoji.name) { -// send_log( -// client, -// oldEmoji.guild, -// "ORANGE", -// "EMOJI NAME CHANGED", -// `__Emoji: ${newEmoji}__ \n\n**Before:** \`${oldEmoji.name}\`\n**After:** \`${newEmoji.name}\`\n**Emoji ID:** \`${newEmoji.id}\`` -// ); -// } -// }); - -// client.on("guildBanAdd", function (guild, user) { -// send_log( -// client, -// guild, -// "RED", -// "USER BANNED", -// `User: ${user} (\`${user.id}\`)\n\`${user.tag}\``, -// user.user.displayAvatarURL({ dynamic: true }) -// ); -// }); - -// client.on("guildBanRemove", function (guild, user) { -// send_log( -// client, -// guild, -// "YELLOW", -// "USER UNBANNED", -// `User: ${user} (\`${user.id}\`)\n\`${user.tag}\``, -// user.user.displayAvatarURL({ dynamic: true }) -// ); -// }); - -// client.on("guildMemberAdd", function (member) { -// send_log( -// member.guild, -// client, -// "GREEN", -// "MEMBER JOINED", -// `Member: ${member.user} (\`${member.user.id}\`)\n\`${member.user.tag}\``, -// member.user.displayAvatarURL({ dynamic: true }) -// ); -// }); - -// client.on("guildMemberRemove", function (member) { -// send_log( -// client, -// member.guild, -// "RED", -// "MEMBER LEFT", -// `Member: ${member.user} (\`${member.user.id}\`)\n\`${member.user.tag}\``, -// member.user.displayAvatarURL({ dynamic: true }) -// ); -// }); - -// client.on("guildMembersChunk", function (members, guild) { -// send_log( -// guild, -// client, -// "RED", -// "MEMBER CHUNK / RAID - " + members.length + " Members", -// members.map( -// (user, index) => `${index}) - ${user} - ${user.tag} - \`${user.id}\`` -// ) -// ); -// }); - -// client.on("guildMemberUpdate", function (oldMember, newMember) { -// let options = {}; - -// if (options[newMember.guild.id]) { -// options = options[newMember.guild.id]; -// } - -// // Add default empty list -// if (typeof options.excludedroles === "undefined") -// options.excludedroles = new Array([]); -// if (typeof options.trackroles === "undefined") options.trackroles = true; -// const oldMemberRoles = oldMember.roles.cache.keyArray(); -// const newMemberRoles = newMember.roles.cache.keyArray(); -// const oldRoles = oldMemberRoles -// .filter(x => !options.excludedroles.includes(x)) -// .filter(x => !newMemberRoles.includes(x)); -// const newRoles = newMemberRoles -// .filter(x => !options.excludedroles.includes(x)) -// .filter(x => !oldMemberRoles.includes(x)); -// const rolechanged = newRoles.length || oldRoles.length; - -// if (rolechanged) { -// let roleadded = ""; -// if (newRoles.length > 0) { -// for (let i = 0; i < newRoles.length; i++) { -// if (i > 0) roleadded += ", "; -// roleadded += `<@&${newRoles[i]}>`; -// } -// } -// let roleremoved = ""; -// if (oldRoles.length > 0) { -// for (let i = 0; i < oldRoles.length; i++) { -// if (i > 0) roleremoved += ", "; -// roleremoved += `<@&${oldRoles[i]}>`; -// } -// } -// let text = `${roleremoved ? `❌ ROLE REMOVED: \n${roleremoved}` : ""}${ -// roleadded ? `✅ ROLE ADDED:\n${roleadded}` : "" -// }`; -// send_log( -// client, -// oldMember.guild, -// `${roleadded ? "GREEN" : "RED"}`, -// "Member Roles Changed", -// `Member: ${newMember.user}\nUser: \`${oldMember.user.tag}\`\n\n${text}` -// ); -// } -// }); - -// client.on("messageDelete", function (message) { -// if (message.channel.type !== "text") return; - -// send_log( -// client, -// message.guild, -// "ORANGE", -// "Message Deleted", -// ` -// **Author : ** <@${message.author.id}> - *${message.author.tag}* -// **Date : ** ${message.createdAt} -// **Channel : ** <#${message.channel.id}> - *${message.channel.name}* -// **Deleted Message : ** -// \`\`\` -// ${message.content.replace(/`/g, "'")} -// \`\`\` -// **Attachment URL : ** -// ${message.attachments.map(x => x.proxyURL)} -// ` -// ); -// }); - -// client.on("messageDeleteBulk", function (message) { -// send_log( -// client, -// message.guild, -// "RED", -// message.length + " Message Deleted BULK", -// `${message.length} Messages delete in: ${message.channel}` -// ); -// }); - -// client.on("messageUpdate", function (oldMessage, newMessage) { -// if (oldMessage.author.bot) return; -// if (oldMessage.channel.type !== "text") return; -// if (newMessage.channel.type !== "text") return; - -// if (oldMessage.content === newMessage.content) return; -// send_log( -// client, -// oldMessage.guild, -// "YELLOW", -// "Message Updated", -// ` -// **Author : ** <@${newMessage.member.user.id}> - *${newMessage.member.user.tag}* -// **Date : ** ${newMessage.createdAt} -// **Channel : ** <#${newMessage.channel.id}> - *${newMessage.channel.name}* -// **Orignal Message : ** -// \`\`\` -// ${oldMessage.content.replace(/`/g, "'")} -// \`\`\` -// **Updated Message : ** -// \`\`\` -// ${newMessage.content.replace(/`/g, "'")} -// \`\`\`` -// ); -// }); - -// client.on("roleCreate", function (role) { -// send_log( -// client, -// role.guild, -// "GREEN", -// "ROLE CREATED"`ROLE: ${role}\nROLENAME: ${role.name}\nROLEID: ${role.id}\nHEXCOLOR: ${role.hexColor}\nPOSITION: ${role.position}` -// ); -// }); - -// client.on("roleDelete", function (role) { -// send_log( -// client, -// role.guild, -// "RED", -// "ROLE DELETED"`ROLE: ${role}\nROLENAME: ${role.name}\nROLEID: ${role.id}\nHEXCOLOR: ${role.hexColor}\nPOSITION: ${role.position}` -// ); -// }); - -// client.on("roleUpdate", function (oldRole, newRole) { -// let perms = { -// 1: "CREATE_INSTANT_INVITE", -// 2: "KICK_MEMBERS", -// 4: "BAN_MEMBERS", -// 8: "ADMINISTRATOR", -// 16: "MANAGE_CHANNELS", -// 32: "MANAGE_GUILD", -// 64: "ADD_REACTIONS", -// 128: "VIEW_AUDIT_LOG", -// 256: "PRIORITY_SPEAKER", -// 1024: "VIEW_CHANNEL", -// 1024: "READ_MESSAGES", -// 2048: "SEND_MESSAGES", -// 4096: "SEND_TTS_MESSAGES", -// 8192: "MANAGE_MESSAGES", -// 16384: "EMBED_LINKS", -// 32768: "ATTACH_FILES", -// 65536: "READ_MESSAGE_HISTORY", -// 131072: "MENTION_EVERYONE", -// 262144: "EXTERNAL_EMOJIS", -// 262144: "USE_EXTERNAL_EMOJIS", -// 1048576: "CONNECT", -// 2097152: "SPEAK", -// 4194304: "MUTE_MEMBERS", -// 8388608: "DEAFEN_MEMBERS", -// 16777216: "MOVE_MEMBERS", -// 33554432: "USE_VAD", -// 67108864: "CHANGE_NICKNAME", -// 134217728: "MANAGE_NICKNAMES", -// 268435456: "MANAGE_ROLES", -// 268435456: "MANAGE_ROLES_OR_PERMISSIONS", -// 536870912: "MANAGE_WEBHOOKS", -// "1073741824 ": "MANAGE_EMOJIS", -// CREATE_INSTANT_INVITE: "CREATE_INSTANT_INVITE", -// KICK_MEMBERS: "KICK_MEMBERS", -// BAN_MEMBERS: "BAN_MEMBERS", -// ADMINISTRATOR: "ADMINISTRATOR", -// MANAGE_CHANNELS: "MANAGE_CHANNELS", -// MANAGE_GUILD: "MANAGE_GUILD", -// ADD_REACTIONS: "ADD_REACTIONS", -// VIEW_AUDIT_LOG: "VIEW_AUDIT_LOG", -// PRIORITY_SPEAKER: "PRIORITY_SPEAKER", -// VIEW_CHANNEL: "VIEW_CHANNEL", -// READ_MESSAGES: "READ_MESSAGES", -// SEND_MESSAGES: "SEND_MESSAGES", -// SEND_TTS_MESSAGES: "SEND_TTS_MESSAGES", -// MANAGE_MESSAGES: "MANAGE_MESSAGES", -// EMBED_LINKS: "EMBED_LINKS", -// ATTACH_FILES: "ATTACH_FILES", -// READ_MESSAGE_HISTORY: "READ_MESSAGE_HISTORY", -// MENTION_EVERYONE: "MENTION_EVERYONE", -// EXTERNAL_EMOJIS: "EXTERNAL_EMOJIS", -// USE_EXTERNAL_EMOJIS: "USE_EXTERNAL_EMOJIS", -// CONNECT: "CONNECT", -// SPEAK: "SPEAK", -// MUTE_MEMBERS: "MUTE_MEMBERS", -// DEAFEN_MEMBERS: "DEAFEN_MEMBERS", -// MOVE_MEMBERS: "MOVE_MEMBERS", -// USE_VAD: "USE_VAD", -// CHANGE_NICKNAME: "CHANGE_NICKNAME", -// MANAGE_NICKNAMES: "MANAGE_NICKNAMES", -// MANAGE_ROLES: "MANAGE_ROLES", -// MANAGE_ROLES_OR_PERMISSIONS: "MANAGE_ROLES_OR_PERMISSIONS", -// MANAGE_WEBHOOKS: "MANAGE_WEBHOOKS", -// MANAGE_EMOJIS: "MANAGE_EMOJIS", -// }; -// if (oldRole.name !== newRole.name) { -// send_log( -// client, -// oldRole.guild, -// "ORANGE", -// "ROLE NAME CHANGED", -// `__ROLE: ${oldRole}__ \n\n**Before:** \`${oldRole.name}\` -// **After:** \`${newRole.name}\` -// **Role ID:** \`${newRole.id}\`` -// ); -// } else if (oldRole.color !== newRole.color) { -// send_log( -// client, -// oldRole.guild, -// "ORANGE", -// "ROLE COLOR CHANGED", -// `__ROLE: ${newRole}__ \n\n**Before:** \`${oldRole.color.toString(16)}\` -// **After:** \`${newRole.color.toString(16)}\` -// **ROLE ID:** \`${newRole.id}\`` -// ); -// } else { -// send_log( -// client, -// oldRole.guild, -// "RED", -// "ROLE PERMISSIONS CHANGED", -// `__ROLE: ${newRole}__ \n**THE PERMISSIONS CHANGED PLEASE CHECK!!!**OLD PERMISSIONS: ${oldRole.permissions.bitfield} -// NEW PERMISSIONS: ${newRole.permissions.bitfield} -// **Role ID:** \`${newRole.id}\`` -// ); -// } -// }); - -// client.on("userUpdate", async (oldUser, newUser) => { -// if (oldUser.username !== newUser.username) { -// send_log( -// client, -// oldUser.guild, -// "BLACK", -// "Member Username Changed", -// `Member: ${newUser}\nOld Username: \`${oldUser.username}\`\nNew Username: \`${newUser.username}\` ` -// ); -// } -// }); -// async function send_log(client, guild, color, title, description, thumb) { -// try { -// const LogEmbed = new Discord.MessageEmbed() -// .setColor(color ? color : client.color) -// .setDescription(description ? description.substr(0, 2048) : "\u200b") -// .setTitle(title ? title.substr(0, 256) : "\u200b") -// .setTimestamp() -// .setThumbnail( -// thumb ? thumb : client.user.displayAvatarURL({ format: "png" }) -// ) -// .setFooter( -// "Made by Cath Team", -// client.user.displayAvatarURL({ format: "png" }) -// ); -// const db = await Guild.findOne({ Guild: guild.id }, (err, guild) => { -// if (err) throw err; -// }); -// if (!db) return; -// const ch = db.Log; -// const logger = await client.channels.fetch(ch); -// if (!logger) throw new Error("Error 404 - Channel Not Found"); -// try { -// const hook = new Discord.WebhookClient( -// db.LogWebhookID, -// db.LogWebhookToken -// ); -// hook.send({ -// username: guild.name, -// avatarURL: client.user.displayAvatarURL({ format: "png" }), -// embeds: [LogEmbed], -// }); -// } catch { -// return; -// } -// } catch (e) { -// console.log(e); -// } -// } diff --git a/events/message.js b/events/message.js @@ -1,427 +0,0 @@ -const client = require("../bot"); -const leven = require("leven"); -const { Collection, MessageEmbed } = require("discord.js"); -const { prefix } = require("../config.json"); -const guilds = require("../models/guilds"); -const ms = require("ms"); -const schema = require("../models/custom-commands"); -const Timeout2 = new Collection(); -const db = require("../models/bot"); -const cooldown = require("../models/cooldown"); -client.on("message", async message => { - const p = await client.prefix(message); - if (message.author.bot) return; - if (message.content.match(new RegExp(`^<@!?${client.user.id}>( |)$`))) { - const _ = new MessageEmbed() - .setTitle(client.user.username) - .addField("Links:", client.cat) - .addField( - "Prefix/Usage", - `My prefix in **${message.guild.name}** is **${p}**\n\nRun \`${p}help\` to start using the bot` - ) - .setThumbnail(client.user.displayAvatarURL()) - .setURL(client.web) - .setFooter(`Made by ${client.author}`) - .setTimestamp() - .setColor(client.color); - return message.inlineReply(_).then(m => m.delete({ timeout: 15000 })); - } - if (!message.guild) return; - if (!message.content.toLowerCase().startsWith(p.toLowerCase())) return; - if (!message.member) { - message.member = await message.guild.fetchMember(message); - } - db.findOne({ Bot: client.user.id }, async (err, data) => { - if (!data) { - new db({ - Bot: client.user.id, - Status: "false", - }); - } else { - if ( - data.Status && - data.Status == "true" && - !client.owners.includes(message.author.id) - ) - return message.inlineReply( - `**${client.user.username}** is currently in maintenance.\nYou can use **cath.exe#9686** or **Cath 2#7414** if it is online\nIf you need help, please contact **Cat drinking a cat#0795** or **Ń1ght#0001**` - ); - } - }); - const data = {}; - let guildDB = await client.data.getGuild(message.guild.id); - if (!guildDB) return; - let userDB = await client.data.getUser(message.author.id); - if (!userDB) return; - let userEconDB = await client.data.getUserEcon(message.author.id); - data.Guild = guildDB; - data.User = userDB; - data.UserEcon = userEconDB; - if (!guildDB) { - await client.data.CreateGuild(message.guild.id); - } - if (!userEconDB) { - await client.createProfile(message.author.id); - } - if (data.User) { - if (data.User.Blacklist) { - return; - } - } - guilds.findOne({ Guild: message.guild.id }, async (err, data) => { - if (data) { - if (!data.Prefix || data.Prefix === null) { - (data.Prefix = prefix), - await guilds.findOneAndUpdate({ Guild: message.guild.id }, data); - } - } - if (!data) { - new guilds({ - Guild: message.guild.id, - Prefix: prefix, - }).save(); - } - }); - const args = message.content.slice(p.length).trim().split(/ +/g); - const cmd = args.shift().toLowerCase(); - if (cmd.length == 0) return; - const cmddata = await schema.findOne({ - Guild: message.guild.id, - Command: cmd, - }); - if (!cmddata) { - let command = - client.commands.get(cmd) || client.commands.get(client.aliases.get(cmd)); - if (!command) { - const best = [ - ...client.commands.map(cmd => cmd.name), - ...client.aliases.keys(), - ].filter(c => leven(cmd.toLowerCase(), c.toLowerCase()) < c.length * 0.4); - const dym = - best.length == 0 - ? "" - : best.length == 1 - ? `Do you mean this?\n**${best[0]}**` - : `Do you mean one of these?\n${best - .slice(0, 3) - .map(value => `**${value}**`) - .join("\n")}`; - if (dym === "") return; - return message - .inlineReply( - new MessageEmbed() - .setDescription(`Couldn't find that command.\n${dym}`) - .setTimestamp() - .setColor(client.color) - ) - .then(msg => msg.delete({ timeout: 10000 })); - } - if (command) { - if (command.Owner == true) { - if (!client.owners.includes(message.author.id)) return; - } - if (command.Premium == true) { - if (data.User.Premium == false) { - return message - .inlineReply( - new MessageEmbed() - .setURL(client.web) - .setAuthor( - message.author.tag, - message.author.displayAvatarURL({ dynamic: true }) - ) - .setColor(client.color) - .setDescription( - `You aren't a premium user. You can either boost support server or gift a nitro to one of the Developer of Cath Team to be premium user` - ) - .setTimestamp() - .setFooter(`Made by ${client.author}`) - ) - .then(m => m.delete({ timeout: 10000 })); - } - } - if (command.Disable == true) { - return message - .inlineReply( - `**${command.name}** command is currently in maintenance.\nYou can use **cath.exe#9686** or **Cath 2#7414** if it is online\nIf you need help, please contact **Cat drinking a cat#0795** or **Ń1ght#0001**` - ) - .then(m => m.delete({ timeout: 10000 })); - } - if (command.Level == true) { - if (data.Guild.Level == false) { - return message - .inlineReply( - `This command is disabled due to levelling system is disabled in this server` - ) - .then(m => m.delete({ timeout: 10000 })); - } - } - if (!message.member.permissions.has(command.UserPerm)) return; - if (!message.guild.me.permissions.has(command.BotPerm)) - return message.inlineReply( - `You can't use this command. I need to have ${command.BotPerm} permission to use this command.` - ); - client.CMDLog.send( - `\`${message.author.tag}(${message.author.id})\`\n has used \n**${command.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\`` - ); - const category = command.category; - if (data.Guild) { - if (data.Guild.Category) { - if (data.Guild.Category.includes(category)) return; - } - if (data.Guild.Commands) { - if (data.Guild.Commands.includes(command.name)) return; - } - } - const check = await guilds.findOne({ - Guild: message.guild.id, - }); - if (check) { - if (!check.Prefix) { - check.Prefix = prefix; - } else; - } - if (command.timeout) { - const current_time = Date.now(); - const cooldown_amount = command.timeout; - cooldown.findOne( - { User: message.author.id, CMD: command.name }, - async (err, dataa) => { - if (dataa) { - if (data.User.Premium == true) { - if (command.timeout > 1000 * 60 * 60) { - const expiration_time = dataa.Time + command.timeout; - if (current_time < expiration_time) { - const time_left = expiration_time - current_time; - const slow = [ - "Keep it slow...", - "Calm down", - "Stop it get some help", - "Too fast", - ]; - const slowed = - slow[Math.floor(Math.random() * slow.length)]; - return message.channel - .send( - new MessageEmbed() - .setColor(client.color) - .setTimestamp() - .setTitle(slowed) - .setDescription( - `Wait **${client.function.timer( - time_left - )}** to use the command again!\nThe default cooldown is **${client.function.timer( - command.timeout - )}**` - ) - ) - .then(m => m.delete({ timeout: 10000 })); - } else { - await cooldown.findOneAndUpdate( - { User: message.author.id, CMD: command.name }, - { Time: current_time } - ); - command.run(client, message, args, data); - client.addcmdsused(message.author.id); - } - } else { - const expiration_time = dataa.Time + command.timeout / 2; - if (current_time < expiration_time) { - const time_left = expiration_time - current_time; - const slow = [ - "Keep it slow...", - "Calm down", - "Stop it get some help", - "Too fast", - ]; - const slowed = - slow[Math.floor(Math.random() * slow.length)]; - return message.channel - .send( - new MessageEmbed() - .setColor(client.color) - .setTimestamp() - .setTitle(slowed) - .setDescription( - `Wait **${client.function.timer( - time_left - )}** to use the command again!\nThe default cooldown is **${client.function.timer( - command.timeout - )}**, since you are **[premium](${ - client.invite - })** users, you only need to wait **${client.function.timer( - command.timeout / 2 - )}**` - ) - ) - .then(m => m.delete({ timeout: 10000 })); - } else { - await cooldown.findOneAndUpdate( - { User: message.author.id, CMD: command.name }, - { Time: current_time } - ); - command.run(client, message, args, data); - client.addcmdsused(message.author.id); - } - } - } else { - const expiration_time = dataa.Time + cooldown_amount; - if (current_time < expiration_time) { - const time_left = expiration_time - current_time; - const slow = [ - "Keep it slow...", - "Calm down", - "Stop it get some help", - "Too fast", - ]; - const slowed = slow[Math.floor(Math.random() * slow.length)]; - return message.channel - .send( - new MessageEmbed() - .setColor(client.color) - .setTimestamp() - .setTitle(slowed) - .setDescription( - `Wait **${client.function.timer( - time_left - )}** to use the command again!\nThe default cooldown is **${client.function.timer( - command.timeout - )}**, but **[premium](${ - client.invite - })** users only need to wait **${client.function.timer( - command.timeout / 2 - )}**` - ) - ) - .then(m => m.delete({ timeout: 10000 })); - } else { - await cooldown.findOneAndUpdate( - { User: message.author.id, CMD: command.name }, - { Time: current_time } - ); - command.run(client, message, args, data); - client.addcmdsused(message.author.id); - } - } - } else { - command.run(client, message, args, data); - client.addcmdsused(message.author.id); - new cooldown({ - User: message.author.id, - CMD: command.name, - Time: current_time, - Cooldown: command.timeout, - }).save(); - } - } - ); - } else { - command.run(client, message, args, data); - client.addcmdsused(message.author.id); - } - } - } else { - if (cmddata.Delete === true && cmddata.Random === false) { - message.delete().then(() => message.channel.send(cmddata.Response)); - } else if (cmddata.Random === true && cmddata.Delete === true) { - const randomed = - cmddata.Response[Math.floor(Math.random() * cmddata.Response.length)]; - message.delete().then(() => message.channel.send(randomed)); - } else if (cmddata.Random === true && cmddata.Delete === false) { - const randomed = - cmddata.Response[Math.floor(Math.random() * cmddata.Response.length)]; - message.channel.send(randomed); - } else { - message.channel.send(cmddata.Response); - } - } -}); -client.on("message", async message => { - const p = await client.prefix(message); - if (message.author.bot) return; - if (!message.content.startsWith(p)) return; - if (!message.guild) return; - if (!message.member) { - message.member = await message.guild.fetchMember(message); - } - const args = message.content.slice(p.length).trim().split(/ +/g); - const cmd = args.shift().toLowerCase(); - if (cmd.length == 0) return; - let path = client.hide.get(cmd); - if (path) { - if (!client.path.includes(message.guild.id)) return; - client.CMDLog.send( - `\`${message.author.tag}(${message.author.id})\`\n has used \n**${path.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\`` - ); - if (path.timeout) { - const slow = [ - "Keep it slow...", - "Calm down", - "Stop it get some help", - "Too fast", - ]; - const slowed = slow[Math.floor(Math.random() * slow.length)]; - if (Timeout2.has(`${path.name}${message.author.id}`)) - return message.channel - .send( - new MessageEmbed() - .setColor(client.color) - .setTimestamp() - .setTitle(slowed) - .setDescription( - `Wait **${client.function.timer( - time_left - )}** to use the command again!\nThe default cooldown is **${client.function.timer( - command.timeout - )}**` - ) - ) - .then(m => m.delete({ timeout: 10000 })); - path.run(client, message, args); - client.addcmdsused(message.author.id); - Timeout2.set( - `${path.name}${message.author.id}`, - Date.now() + path.timeout - ); - setTimeout(() => { - Timeout2.delete(`${path.name}${message.author.id}`); - }, path.timeout); - } else { - path.run(client, message, args); - client.addcmdsused(message.author.id); - } - } -}); -client.on("message", async message => { - const p = await client.prefix(message); - if ( - message.channel.type === "dm" && - !message.content.startsWith(p) && - !message.author.bot - ) { - var attachment = message.attachments.array(); - client.channels.cache - .get(client.DMLog) - .send( - `\`${message.author.tag}(${message.author.id})\`: ` + message.content - ); - if (attachment[0]) client.DMLog.send(attachment); - if (attachment[1]) client.DMLog.send(attachment); - if (attachment[2]) client.DMLog.send(attachment); - if (attachment[3]) client.DMLog.send(attachment); - if (attachment[4]) client.DMLog.send(attachment); - } -}); -/* -client.on("message", async (message) => { - if (message.author.bot) return; - let wordArray = message.content.split(" "); - let filterWords = ["bruh", "Bruh"]; - for (var i = 0; i < filterWords.length; i++) { - if (wordArray.includes(filterWords[i])) { - message.react("<a:cat_triggered:808684186633633822>"); - break; - } - } -}); -*/ diff --git a/events/messageCreate.js b/events/messageCreate.js @@ -1,15 +1,12 @@ const client = require("../bot"); +const codmclient = require("../client/codmclient"); const leven = require("leven"); -const { Collection, MessageEmbed, Permissions } = require("discord.js"); -const { prefix } = require("../config.json"); -const guilds = require("../models/guilds"); -const schema = require("../models/custom-commands"); -const Timeout2 = new Collection(); -const db = require("../models/bot"); +const { MessageEmbed } = require("discord.js"); const cooldown = require("../models/cooldown"); +const utils = require("../util/functions/function"); client.on("messageCreate", async message => { const p = await client.prefix(message); - if (message.author.bot) return; + if (message.author.bot || !message.guild) return; if (message.content.match(new RegExp(`^<@!?${client.user.id}>( |)$`))) { const _ = new MessageEmbed() .setTitle(client.user.username) @@ -26,29 +23,11 @@ client.on("messageCreate", async message => { const m = await message.reply({ embeds: [_] }); setTimeout(() => m.delete(), 15000); } - if (!message.guild) return; - if (!message.content.toLowerCase().startsWith(p.toLowerCase())) return; - - if (!message.member) { - message.member = await message.guild.fetchMember(message); + if (p) { + if (!message.content.toLowerCase().startsWith(p.toLowerCase())) return; } - db.findOne({ Bot: client.user.id }, async (err, data) => { - if (!data) { - new db({ - Bot: client.user.id, - Status: "false", - }); - } else { - if ( - data.Status && - data.Status == "true" && - !client.owners.includes(message.author.id) - ) - return message.reply({ - content: `**${client.user.username}** is currently in maintenance.\nYou can use **cath.exe#9686** or **Cath 2#7414** if it is online\nIf you need help, please contact **Cat drinking a cat#0795** or **Ń1ght#0001**`, - }); - } - }); + if (!message.member) + message.member = await message.guild.fetchMember(message); const data = {}; let guildDB = await client.data.getGuild(message.guild.id); if (!guildDB) return; @@ -61,168 +40,131 @@ client.on("messageCreate", async message => { if (!guildDB) await client.data.CreateGuild(message.guild.id); if (!userEconDB) await client.createProfile(message.author.id); if (data.User) { - if (data.User.Blacklist) { - return; - } + if (data.User.Blacklist) return; } const [cmd, ...args] = message.content.slice(p.length).trim().split(/ +/g); if (cmd.length == 0) return; - const cmddata = await schema.findOne({ - Guild: message.guild.id, - Command: cmd, - }); - if (!cmddata) { - const command = - client.commands.get(cmd.toLowerCase()) || - client.commands.find(c => c.aliases?.includes(cmd.toLowerCase())); - if (!command) { - const best = [ - ...client.commands.map(cmd => cmd.name), - ...client.aliases.keys(), - ].filter(c => leven(cmd.toLowerCase(), c.toLowerCase()) < c.length * 0.4); - const dym = - best.length == 0 - ? "" - : best.length == 1 - ? `Do you mean this?\n**${best[0]}**` - : `Do you mean one of these?\n${best - .slice(0, 3) - .map(value => `**${value}**`) - .join("\n")}`; - if (dym === "") return; - else { - const msg = await message.reply({ + const command = + client.commands.get(cmd.toLowerCase()) || + client.commands.find(c => c.aliases?.includes(cmd.toLowerCase())); + if (!command) { + const best = [ + ...client.commands.map(cmd => cmd.name), + ...client.aliases.keys(), + ].filter(c => leven(cmd.toLowerCase(), c.toLowerCase()) < c.length * 0.4); + const dym = + best.length == 0 + ? "" + : best.length == 1 + ? `Do you mean this?\n**${best[0]}**` + : `Do you mean one of these?\n${best + .slice(0, 3) + .map(value => `**${value}**`) + .join("\n")}`; + if (dym === "") { + return; + } else { + const msg = await message.reply({ + embeds: [ + new MessageEmbed() + .setDescription(`Couldn't find that command.\n${dym}`) + .setTimestamp() + .setColor(client.color), + ], + }); + setTimeout(function () { + msg.delete(); + }, 10000); + } + } else { + if (command.Owner) { + if (!client.owners.includes(message.author.id)) return; + } + if (command.Premium) { + if (!data.User.Premium) { + return message.reply({ embeds: [ new MessageEmbed() - .setDescription(`Couldn't find that command.\n${dym}`) + .setURL(client.web) + .setAuthor( + message.author.tag, + message.author.displayAvatarURL({ dynamic: true }) + ) + .setColor(client.color) + .setDescription( + `You aren't a premium user. You can either boost support server or subscribe to developer's team [Ko-fi](https://ko-fi.com/cathteam) or gift a nitro to one of the developer team to be premium user` + ) .setTimestamp() - .setColor(client.color), + .setFooter(`Made by ${client.author}`), ], }); - setTimeout(function () { - msg.delete(); - }, 10000); } } - if (command) { - if (command.Owner == true) { - if (!client.owners.includes(message.author.id)) return; - } - if (command.Premium == true) { - if (data.User.Premium == false) { - return message.reply({ - embeds: [ - new MessageEmbed() - .setURL(client.web) - .setAuthor( - message.author.tag, - message.author.displayAvatarURL({ dynamic: true }) - ) - .setColor(client.color) - .setDescription( - `You aren't a premium user. You can either boost support server or gift a nitro to one of the Developer of Cath Team to be premium user` - ) - .setTimestamp() - .setFooter(`Made by ${client.author}`), - ], - }); - } - } - if (!message.guild.me.permissions.has(command.BotPerm || [])) - return message.reply({ - content: `You can't use this command. I need to have ${command.BotPerm} permission to use this command.`, - }); - client.channels.cache.get(client.CMDLog).send({ - content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${command.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, + if (command.Level) { + if (!data.Guild.Level) return; + } + if (!message.guild.me.permissions.has(command.BotPerm || [])) + return message.reply({ + content: `You can't use this command. I need to have ${command.BotPerm} permission to use this command.`, }); - const category = command.category; - if (data.Guild) { - if (data.Guild.Category) { - if (data.Guild.Category.includes(category)) return; - } - if (data.Guild.Commands) { - if (data.Guild.Commands.includes(command.name)) return; - } + client.channels.cache.get(client.CMDLog).send({ + content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${command.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, + }); + if (data.Guild) { + if (data.Guild.Category) { + if (data.Guild.Category.includes(command.directory)) return; } - const check = await guilds.findOne({ - Guild: message.guild.id, - }); - if (check) { - if (!check.Prefix) { - check.Prefix = prefix; - } else; + if (data.Guild.Commands) { + if (data.Guild.Commands.includes(command.name)) return; } - if (command.timeout) { - const current_time = Date.now(); - const cooldown_amount = command.timeout; - cooldown.findOne( - { User: message.author.id, CMD: command.name }, - async (err, data) => { - if (data) { - const expiration_time = data.Time + cooldown_amount; - if (current_time < expiration_time) { - const time_left = expiration_time - current_time; - const slow = [ - "Keep it slow...", - "Calm down", - "Stop it get some help", - "Too fast", - ]; - const slowed = slow[Math.floor(Math.random() * slow.length)]; - return message.channel.send({ - embeds: [ - new MessageEmbed() - .setColor(client.color) - .setTimestamp() - .setTitle(slowed) - .setDescription( - `You are on a \`${client.function.timer( - time_left - )}\` cooldown.` - ), - ], - }); - } else { - await cooldown.findOneAndUpdate( - { User: message.author.id, CMD: command.name }, - { Time: current_time } - ); - command.run(client, message, args, data); - client.addcmdsused(message.author.id); - } + } + if (command.timeout) { + const current_time = Date.now(); + const cooldown_amount = command.timeout; + cooldown.findOne( + { User: message.author.id, CMD: command.name }, + async (err, data) => { + if (data) { + const expiration_time = data.Time + cooldown_amount; + if (current_time < expiration_time) { + utils.cooldown(data.Time, cooldown_amount, message); } else { - command.run(client, message, args, data); + await cooldown.findOneAndUpdate( + { User: message.author.id, CMD: command.name }, + { Time: current_time } + ); + command.run(client, message, args, utils, data, codmclient); client.addcmdsused(message.author.id); - new cooldown({ - User: message.author.id, - CMD: command.name, - Time: current_time, - Cooldown: command.timeout, - }).save(); + client.channels.cache.get(client.CMDLog).send({ + content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${command.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, + }); } + } else { + command.run(client, message, args, utils, data, codmclient); + client.channels.cache.get(client.CMDLog).send({ + content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${command.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, + }); + client.addcmdsused(message.author.id); + new cooldown({ + User: message.author.id, + CMD: command.name, + Time: current_time, + Cooldown: command.timeout, + }).save(); } - ); - } else { - command.run(client, message, args, data); + } + ); + } else { + try { + command.run(client, message, args, utils, data, codmclient); + client.channels.cache.get(client.CMDLog).send({ + content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${command.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, + }); client.addcmdsused(message.author.id); + } catch (e) { + console.log(e); } } - } else { - if (cmddata.Delete === true && cmddata.Random === false) { - message - .delete() - .then(() => message.channel.send({ content: cmddata.Response })); - } else if (cmddata.Random === true && cmddata.Delete === true) { - const randomed = - cmddata.Response[Math.floor(Math.random() * cmddata.Response.length)]; - message.delete().then(() => message.channel.send({ content: randomed })); - } else if (cmddata.Random === true && cmddata.Delete === false) { - const randomed = - cmddata.Response[Math.floor(Math.random() * cmddata.Response.length)]; - message.channel.send({ content: randomed }); - } else { - message.channel.send({ content: cmddata.Response }); - } } }); client.on("messageCreate", async message => { @@ -230,69 +172,26 @@ client.on("messageCreate", async message => { if (message.author.bot) return; if (!message.content.startsWith(p)) return; if (!message.guild) return; - if (!message.member) { + if (!message.member) message.member = await message.guild.fetchMember(message); - } const [cmd, ...args] = message.content.slice(p.length).trim().split(/ +/g); if (cmd.length == 0) return; let path = client.hide.get(cmd); if (path) { if (!client.path.includes(message.guild.id)) return; - client.channels.cache.get(client.CMDLog).send({ - content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${path.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, - }); - if (path.timeout) { - if (Timeout2.has(`${path.name}${message.author.id}`)) { - const slow = [ - "Keep it slow...", - "Calm down", - "Stop it get some help", - "Too fast", - ]; - const slowed = slow[Math.floor(Math.random() * slow.length)]; - const time_left = - Timeout2.get(`${path.name}${message.author.id}`) - Date.now(); - const msg = await message.channel.send({ - embeds: [ - new MessageEmbed() - .setColor(client.color) - .setTimestamp() - .setTitle(slowed) - .setDescription( - `Wait **${client.function.timer( - time_left - )}** to use the command again!\nThe default cooldown is **${client.function.timer( - path.timeout - )}**` - ), - ], - }); - setTimeout(function () { - msg.delete(); - }, 10000); - } - path.run(client, message, args); - client.addcmdsused(message.author.id); - Timeout2.set( - `${path.name}${message.author.id}`, - Date.now() + path.timeout - ); - setTimeout(() => { - Timeout2.delete(`${path.name}${message.author.id}`); - }, path.timeout); - } else { + try { path.run(client, message, args); client.addcmdsused(message.author.id); + client.channels.cache.get(client.CMDLog).send({ + content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${path.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, + }); + } catch (e) { + console.log(e); } } }); client.on("messageCreate", async message => { - const p = await client.prefix(message); - if ( - message.channel.type === "DM" && - !message.content.startsWith(p) && - !message.author.bot - ) { + if (message.channel.type === "DM" && !message.author.bot) { if (message.attachments) { if (message.attachments && message.content) { message.attachments.map(e => diff --git a/events/messsageDelete.js b/events/messsageDelete.js @@ -1,31 +0,0 @@ -const client = require("../bot"); -client.on("messageDelete", async message => { - let all = []; - if (message.attachments) { - const mapped = message.attachments.map(a => { - if ( - a.name.endsWith(".png") || - a.name.endsWith(".jpg") || - a.name.endsWith(".jpeg") || - a.name.endsWith(".gif") || - a.name.endsWith(".webp") - ) - return message.attachments.first().proxyURL; - else return message.attachments.first().url; - }); - if (mapped.length == 1) { - all.push(mapped); - } else if (mapped.length > 1) { - message.attachments.map(b => { - all.push(mapped); - }); - } - } - client.snipes.push({ - channel: message.channel, - content: message.content ? message.content : "None", - author: message.author, - attachment: all ? all : null, - date: new Date(), - }); -}); diff --git a/events/reactionroles.js b/events/reactionroles.js @@ -1,30 +0,0 @@ -const client = require("../bot"); -const Schema = require("../models/reaction"); - -client.on("messageReactionAdd", async (reaction, user) => { - if (reaction.message.partial) await reaction.message.fetch(); - if (reaction.partial) await reaction.fetch(); - if (user.bot) return; - if (!reaction.message.guild) return; - Schema.findOne({ Message: reaction.message.id }, async (err, data) => { - if (!data) return; - if (!Object.keys(data.Roles).includes(reaction.emoji.name)) return; - const [roleid] = data.Roles[reaction.emoji.name]; - reaction.message.guild.members.cache.get(user.id).roles.add(roleid); - user.send(`A role has been added`); - }); -}); -client.on("messageReactionRemove", async (reaction, user) => { - if (reaction.message.partial) await reaction.message.fetch(); - if (reaction.partial) await reaction.fetch(); - if (user.bot) return; - if (!reaction.message.guild) return; - Schema.findOne({ Message: reaction.message.id }, async (err, data) => { - if (!data) return; - if (!Object.keys(data.Roles).includes(reaction.emoji.name)) return; - - const [roleid] = data.Roles[reaction.emoji.name]; - reaction.message.guild.members.cache.get(user.id).roles.remove(roleid); - user.send(`A role has been removed`); - }); -}); diff --git a/events/ready.js b/events/ready.js @@ -1,56 +1,6 @@ const client = require("../bot"); -const config = require("../config.json"); -const prefix = config.prefix; const version = require("../package.json").version; -const { MessageEmbed } = require("discord.js"); -const m = require("../models/bot"); -const test = require("../util/dist/cmds").cmds(); client.on("ready", async () => { client.manager.init(client.user.id); - var users = client.guilds.cache - .reduce((a, b) => a + b.memberCount, 0) - .toLocaleString(); - var guilds = client.guilds.cache.size.toString(); - await client.data.botcache(client.user.id, guilds, users); - await client.data.commands(client.user.id, test); - var playing = [`v${version} | ${prefix}help`, client.web, `${users} users`]; - async function find() { - const statusdb = await m.findOne({ - Status: "true", - }); - if (statusdb && statusdb.Status == "true") { - client.user.setPresence({ - activities: [ - { - name: "Under Maintenance", - type: "STREAMING", - url: "https://twtich.tv/thekiritosgaming", - }, - ], - status: "online", - }); - } else { - setInterval(function () { - var game = Math.floor(Math.random() * playing.length + 0); - client.user.setPresence({ - activities: [ - { - name: playing[game], - type: "STREAMING", - url: "https://twitch.tv/thekiritosgaming", - }, - ], - }); - }, 5000); - } - } - find(); console.log(`${client.user.username} ✅\nVersion: v${version}`); - var embed = new MessageEmbed() - .setColor(client.color) - .setTitle(`${client.user.tag} is online`) - .setDescription(`${client.user.username} ✅\nVersion: v${version}`) - .setTimestamp() - .setFooter(`${client.user.username}`); - client.channels.cache.get(client.ReadyLog).send({ embeds: [embed] }); }); diff --git a/events/slash.js b/events/slash.js @@ -1,35 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -const client = require("../bot"); -async function createApiMessage(interaction, content) { - const apiMessage = await APIMessage.create( - client.channels.resolve(interaction.channel_id), - content - ) - .resolveData() - .resolveFiles(); - return { ...apiMessage.data, files: apiMessage.files }; -} -client.on("ready", async () => { - const a = client.api.applications(client.user.id); - a.commands.post({ - data: { - name: "help", - description: "Get some support!", - }, - }); -}); -client.ws.on("INTERACTION_CREATE", async interaction => { - let command = interaction.data.name.toLowerCase(); - let args = interaction.data.options; - if (command === "help") { - client.api.interactions(interaction.id, interaction.token).callback.post({ - data: { - type: 4, - data: { - content: - "Website: https://cath.gq/\n Support: https://discord.gg/SbQHChmGcp", - }, - }, - }); - } -}); diff --git a/events/starboard.js b/events/starboard.js @@ -0,0 +1,83 @@ +const client = require("../bot"); +const { MessageEmbed } = require("discord.js"); +client.on("messageReactionAdd", async (reaction, user) => { + const star = async () => { + const starch = reaction.message.guild.channels.cache.find( + n => n.name.toLowerCase() === "starboard" + ); + const msgs = await starch.messages.fetch({ limit: 100 }); + const here = msgs.find(msg => + msg.embeds.length === 1 + ? msg.embeds[0].footer.text.startsWith(reaction.message.id) + ? true + : false + : false + ); + if (here) here.edit(`${reaction.count} - ⭐`); + else { + const embed = new MessageEmbed() + .setColor(client.color) + .setTitle( + `From ${reaction.message.author.tag}`, + reaction.message.author.displayAvatarURL({ dynamic: true }) + ) + .setThumbnail( + reaction.message.author.displayAvatarURL({ dynamic: true }) + ) + .addField(`Message`, `[Jump!](${reaction.message.url})`) + .setDescription( + `Content: ${ + reaction.message.content ? reaction.message.content : "None" + }` + ) + .setImage( + reaction.message.attachments.length + ? reaction.message.attachments.first().url + : null + ) + .setFooter(`${reaction.message.id}`) + .setTimestamp(reaction.message.createdTimestamp); + if (starch) { + starch.send({ content: "1 - ⭐", embeds: [embed] }); + } + } + }; + if (reaction.emoji.name === "⭐") { + if (reaction.message.channel.name.toLowerCase() === "starboard") return; + if (reaction.message.partial) { + await reaction.fetch(); + await reaction.message.fetch(); + star(); + } else star(); + } +}); +client.on("messageReactionRemove", async (reaction, user) => { + const star = async () => { + const starch = reaction.message.guild.channels.cache.find( + n => n.name.toLowerCase() === "starboard" + ); + const msgs = await starch.messages.fetch({ limit: 100 }); + const here = msgs.find(msg => + msg.embeds.length === 1 + ? msg.embeds[0].footer.text.startsWith(reaction.message.id) + ? true + : false + : false + ); + if (here) { + if (reaction.count === 0) { + setTimeout(function () { + here.delete(); + }, 5000); + } else here.edit(`${reaction.count} - ⭐`); + } + }; + if (reaction.emoji.name === "⭐") { + if (reaction.message.channel.name.toLowerCase() === "starboard") return; + if (reaction.message.partial) { + await reaction.fetch(); + await reaction.message.fetch(); + star(); + } else star(); + } +}); diff --git a/events/startTyping.js b/events/startTyping.js @@ -1,10 +0,0 @@ -const client = require("../bot"); -client.on("typingStart", async (channel, user) => { - if (!user) return; - if (user.bot) return; - if (!channel) return; - if (channel.type != "dm") return; - user.send( - "```DMs is reserved for bug reports/suggestions/feedbacks/queries and is forwarded to the developers. Please refrain from using it as a clipboard or trying to run commands in here [by violating this condition, you agree to let us sell your data]```" - ); -}); diff --git a/events/typingStart.js b/events/typingStart.js @@ -1,10 +0,0 @@ -const client = require("../bot"); -client.on("typingStart", async (channel, user) => { - if (!user) return; - if (user.bot) return; - if (!channel) return; - if (channel.type != "DM") return; - user.send( - "```DMs is reserved for bug reports/suggestions/feedbacks/queries and is forwarded to the developers. Please refrain from using it as a clipboard or trying to run commands in here [by violating this condition, you agree to let us sell your data]```" - ); -}); diff --git a/package-lock.json b/package-lock.json @@ -1,3988 +0,0 @@ -{ - "name": "cath.exe", - "version": "3.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", - "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", - "dev": true - }, - "@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.14.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/runtime": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz", - "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==", - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@canvacord/assets": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@canvacord/assets/-/assets-2.0.5.tgz", - "integrity": "sha512-MceWZe5TzOymfvgf8ZU5m1oxWg6rGyH5anCgANARa47+CjVcppe6+Bd1+36pXiDTOyE4uRJk6T5RgOEJOgciug==" - }, - "@canvacord/emoji-parser": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@canvacord/emoji-parser/-/emoji-parser-1.0.1.tgz", - "integrity": "sha512-Lb3xatdd91MR9tU4sicgrxxKg+/rVD1zKTOh55bmVF2Ri5X8vHTV+jNHTvRzkomGpyepGM+7qA4xMvG8ZqtO8g==", - "requires": { - "twemoji-parser": "^13.0.0" - } - }, - "@discordjs/builders": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.5.0.tgz", - "integrity": "sha512-HP5y4Rqw68o61Qv4qM5tVmDbWi4mdTFftqIOGRo33SNPpLJ1Ga3KEIR2ibKofkmsoQhEpLmopD1AZDs3cKpHuw==", - "requires": { - "@sindresorhus/is": "^4.0.1", - "discord-api-types": "^0.22.0", - "ow": "^0.27.0", - "ts-mixer": "^6.0.0", - "tslib": "^2.3.0" - } - }, - "@discordjs/collection": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.6.tgz", - "integrity": "sha512-utRNxnd9kSS2qhyivo9lMlt5qgAUasH2gb7BEOn6p0efFh24gjGomHzWKMAPn2hEReOPQZCJaRKoURwRotKucQ==" - }, - "@discordjs/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - } - } - }, - "@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.0", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, - "@humanwhocodes/object-schema": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", - "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", - "dev": true - }, - "@kensingtontech/recacheman": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/@kensingtontech/recacheman/-/recacheman-2.2.8.tgz", - "integrity": "sha512-rbh85Pse/iqT+doCauVZWxqaXCJpnjjJKOh3hFE5b7J1SoHp/S4IY94CZ8E8uV/eHUQlPF5YfTuCYjSaMTX9eQ==", - "requires": { - "@kensingtontech/recacheman-redis": "^2.1.6", - "ms": "^2.1.3", - "recacheman-file": "^0.2.5", - "recacheman-memory": "^1.1.0" - } - }, - "@kensingtontech/recacheman-redis": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@kensingtontech/recacheman-redis/-/recacheman-redis-2.1.6.tgz", - "integrity": "sha512-hTB0i3yxjciMF0zjr5U4ui/Qv4OVb/ld2PHKvE4NTpiGUz0kzye1d0verKwBWmenvFnScKTX9KXc7/HE59CdRA==", - "requires": { - "each": "1.2.1", - "parse-redis-url": "0.0.2", - "redis": "^3.0.2" - } - }, - "@mapbox/node-pre-gyp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.5.tgz", - "integrity": "sha512-4srsKPXWlIxp5Vbqz5uLfBN+du2fJChBoYn/f2h991WLdk7jUvcSk/McVLSv/X+xQIPI8eGD5GjrnygdyHnhPA==", - "requires": { - "detect-libc": "^1.0.3", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.1", - "nopt": "^5.0.0", - "npmlog": "^4.1.2", - "rimraf": "^3.0.2", - "semver": "^7.3.4", - "tar": "^6.1.0" - } - }, - "@reconlx/discord.js": { - "version": "1.1.101", - "resolved": "https://registry.npmjs.org/@reconlx/discord.js/-/discord.js-1.1.101.tgz", - "integrity": "sha512-YKXJ74zra1tUwtx0p2U1nZWhnBTe2WhZioTMT5+W89QQrheyYus1MUWdJceAsN0eIs0p4zqhrNqWMWNY7B3xyQ==" - }, - "@sapphire/async-queue": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.4.tgz", - "integrity": "sha512-fFrlF/uWpGOX5djw5Mu2Hnnrunao75WGey0sP0J3jnhmrJ5TAPzHYOmytD5iN/+pMxS+f+u/gezqHa9tPhRHEA==" - }, - "@sindresorhus/is": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz", - "integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==" - }, - "@sourcebin/linguist": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@sourcebin/linguist/-/linguist-0.0.3.tgz", - "integrity": "sha512-VVkb/34pISdK+1tyqmwBac6crn8UhviKCRV5w/wc8iZyTCOoTrOu0Cgbqfh0bfMGxNlQuhaRy6cMmEmHxa5R3g==" - }, - "@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", - "requires": { - "defer-to-connect": "^2.0.0" - } - }, - "@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==" - }, - "@types/bson": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.5.tgz", - "integrity": "sha512-vVLwMUqhYJSQ/WKcE60eFqcyuWse5fGH+NMAXHuKrUAPoryq3ATxk5o4bgYNtg5aOM4APVg7Hnb3ASqUYG0PKg==", - "requires": { - "@types/node": "*" - } - }, - "@types/cacheable-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", - "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", - "requires": { - "@types/http-cache-semantics": "*", - "@types/keyv": "*", - "@types/node": "*", - "@types/responselike": "*" - } - }, - "@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==" - }, - "@types/keyv": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.3.tgz", - "integrity": "sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==", - "requires": { - "@types/node": "*" - } - }, - "@types/mongodb": { - "version": "3.6.20", - "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.20.tgz", - "integrity": "sha512-WcdpPJCakFzcWWD9juKoZbRtQxKIMYF/JIAM4JrNHrMcnJL6/a2NWjXxW7fo9hxboxxkg+icff8d7+WIEvKgYQ==", - "requires": { - "@types/bson": "*", - "@types/node": "*" - } - }, - "@types/node": { - "version": "16.7.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.10.tgz", - "integrity": "sha512-S63Dlv4zIPb8x6MMTgDq5WWRJQe56iBEY0O3SOFA9JrRienkOVDXSXBjjJw6HTNQYSE2JI6GMCR6LVbIMHJVvA==" - }, - "@types/responselike": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", - "requires": { - "@types/node": "*" - } - }, - "@types/ws": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", - "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", - "requires": { - "@types/node": "*" - } - }, - "@weky/inlinereply": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/@weky/inlinereply/-/inlinereply-0.0.0.tgz", - "integrity": "sha512-wUecLX4CR87PiFbH9d264zcfnyXxZbhr30NIJBjJ96U5tHdQzyOpMPInQmU8mq2hOuC6keEM3pFiXa2B75tYDA==", - "requires": { - "discord.js": "^12.5.3" - }, - "dependencies": { - "discord.js": { - "version": "12.5.3", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.5.3.tgz", - "integrity": "sha512-D3nkOa/pCkNyn6jLZnAiJApw2N9XrIsXUAdThf01i7yrEuqUmDGc7/CexVWwEcgbQR97XQ+mcnqJpmJ/92B4Aw==", - "requires": { - "@discordjs/collection": "^0.1.6", - "@discordjs/form-data": "^3.0.1", - "abort-controller": "^3.0.0", - "node-fetch": "^2.6.1", - "prism-media": "^1.2.9", - "setimmediate": "^1.0.5", - "tweetnacl": "^1.0.3", - "ws": "^7.4.4" - } - } - } - }, - "abab": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", - "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==" - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "requires": { - "event-target-shim": "^5.0.0" - } - }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "acorn": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==" - }, - "acorn-globals": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", - "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", - "requires": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" - }, - "dependencies": { - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" - } - } - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true - }, - "acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==" - }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "requires": { - "debug": "4" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "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" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" - }, - "are-we-there-yet": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", - "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "requires": { - "follow-redirects": "^1.14.0" - } - }, - "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==" - }, - "better-sqlite3": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-7.4.3.tgz", - "integrity": "sha512-07bKjClZg/f4KMVRkzWtoIvazVPcF1gsvVKVIXlxwleC2DxuIhnra3KCMlUT1rFeRYXXckot2a46UciF2d9KLw==", - "requires": { - "bindings": "^1.5.0", - "prebuild-install": "^6.0.1", - "tar": "^6.1.0" - } - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "bl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", - "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" - }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", - "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" - }, - "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" - } - }, - "browser-process-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", - "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" - }, - "bson": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz", - "integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg==" - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" - }, - "cacheable-lookup": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", - "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==" - }, - "cacheable-request": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", - "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", - "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" - }, - "canvacord": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/canvacord/-/canvacord-5.2.3.tgz", - "integrity": "sha512-aYxGA7tVQi3NCa7Qxg2b9u+wAeek2xE5q+nJjiReZofeUx0d1Xq731UerKf+iVIPBrCAcjbv/yflJL0qVwPuMQ==", - "requires": { - "@canvacord/assets": "^2.0.5", - "@canvacord/emoji-parser": "^1.0.1", - "canvas": "^2.8.0", - "gifencoder": "^2.0.1", - "moment": "^2.29.1", - "moment-duration-format": "^2.3.2" - } - }, - "canvas": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.8.0.tgz", - "integrity": "sha512-gLTi17X8WY9Cf5GZ2Yns8T5lfBOcGgFehDFb+JQwDqdOoBOcECS9ZWMEAqMSVcMYwXD659J8NyzjRY/2aE+C2Q==", - "requires": { - "@mapbox/node-pre-gyp": "^1.0.0", - "nan": "^2.14.0", - "simple-get": "^3.0.3" - } - }, - "cath": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cath/-/cath-1.1.0.tgz", - "integrity": "sha512-5QK9b7LQMb44fFXTt8IEXEVGyAk9OJEIsF8F0zTtila1ELvf603kuH1RDQRG2/Z84m3c1XcqaLl6j3zJGvTScA==", - "requires": { - "axios": "^0.21.4", - "discord.js": "^13.1.0" - } - }, - "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" - } - }, - "charenc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=" - }, - "cheerio": { - "version": "1.0.0-rc.10", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", - "integrity": "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==", - "requires": { - "cheerio-select": "^1.5.0", - "dom-serializer": "^1.3.2", - "domhandler": "^4.2.0", - "htmlparser2": "^6.1.0", - "parse5": "^6.0.1", - "parse5-htmlparser2-tree-adapter": "^6.0.1", - "tslib": "^2.2.0" - }, - "dependencies": { - "dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", - "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - } - }, - "domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==" - }, - "domhandler": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz", - "integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==", - "requires": { - "domelementtype": "^2.2.0" - } - }, - "domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "requires": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - } - }, - "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" - }, - "htmlparser2": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", - "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", - "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "domutils": "^2.5.2", - "entities": "^2.0.0" - } - } - } - }, - "cheerio-select": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.5.0.tgz", - "integrity": "sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg==", - "requires": { - "css-select": "^4.1.3", - "css-what": "^5.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0", - "domutils": "^2.7.0" - }, - "dependencies": { - "dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", - "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - } - }, - "domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==" - }, - "domhandler": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz", - "integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==", - "requires": { - "domelementtype": "^2.2.0" - } - }, - "domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "requires": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - } - }, - "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" - } - } - }, - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" - }, - "cli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", - "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", - "dev": true, - "requires": { - "exit": "0.1.2", - "glob": "^7.1.1" - } - }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "requires": { - "mimic-response": "^1.0.0" - }, - "dependencies": { - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" - } - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "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==" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "common-tags": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.0.tgz", - "integrity": "sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw==" - }, - "complex.js": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.0.15.tgz", - "integrity": "sha512-gDBvQU8IG139ZBQTSo2qvDFP+lANMGluM779csXOr6ny1NUtA3wkUnCFjlDNH/moAVfXtvClYt6G0zarFbtz5w==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "requires": { - "safe-buffer": "5.1.2" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" - }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" - }, - "core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" - }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "crypt": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=" - }, - "css-select": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz", - "integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==", - "requires": { - "boolbase": "^1.0.0", - "css-what": "^5.0.0", - "domhandler": "^4.2.0", - "domutils": "^2.6.0", - "nth-check": "^2.0.0" - }, - "dependencies": { - "dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", - "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - } - }, - "domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==" - }, - "domhandler": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz", - "integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==", - "requires": { - "domelementtype": "^2.2.0" - } - }, - "domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "requires": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - } - }, - "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" - } - } - }, - "css-what": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", - "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==" - }, - "cssom": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", - "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==" - }, - "cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", - "requires": { - "cssom": "~0.3.6" - }, - "dependencies": { - "cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==" - } - } - }, - "data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", - "requires": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" - } - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "requires": { - "ms": "2.1.2" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "decancer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/decancer/-/decancer-1.0.4.tgz", - "integrity": "sha512-nMEKK18OTTrKhWbKkqSkV6hur4KoE3njJiygKRC58I9lmQszwbiBhVE7gKSRcMaEEW7lIKJBFtO0vpTDtK7Urg==" - }, - "decimal.js": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", - "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==" - }, - "decompress-response": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", - "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", - "requires": { - "mimic-response": "^2.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" - }, - "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" - }, - "defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==" - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "denque": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz", - "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==" - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" - }, - "detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" - }, - "discord-api-types": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz", - "integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg==" - }, - "discord-buttons": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/discord-buttons/-/discord-buttons-4.0.0.tgz", - "integrity": "sha512-E/eQX4Ktj7nKwNDsTfCezBNCu73FtPWJfQcpKohfl0jct/ucMUO+7uhL2MhGsZr4SCfojk7OzccAznuntB564w==" - }, - "discord-canvas": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/discord-canvas/-/discord-canvas-1.4.1.tgz", - "integrity": "sha512-0Ee1mvmalw1Nz60MwU6SxUdFNUDrJwx8II4JxaDFqw/2nEPav7PB8giQxDPaCgcyFOAvReQJFSQ66FCr+m1O8g==", - "requires": { - "canvas": "^2.6.1", - "fortnite": "^4.3.2", - "fortnite-9812": "^1.0.4", - "fs": "^0.0.1-security" - } - }, - "discord-giveaways": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/discord-giveaways/-/discord-giveaways-5.0.1.tgz", - "integrity": "sha512-ZuZz0X/AbFIoU/T580B3o5fdmVZS/AHzzL5mCSzBkRwEEI6hmp8wkbbAtw+CTocPdGNfydwJmlycgbQTSrpE6g==", - "requires": { - "deepmerge": "^4.2.2", - "discord.js": "^13.1.0", - "serialize-javascript": "^6.0.0" - } - }, - "discord-xp": { - "version": "1.1.16", - "resolved": "https://registry.npmjs.org/discord-xp/-/discord-xp-1.1.16.tgz", - "integrity": "sha512-A5g6utg+0fCLEUl6sS5J5mpr8DAXe5KxBFQnJf89KpQ71Itt0Hdv5/seOBCc6p239nuxEfW9n29peMlLCuvlrg==", - "requires": { - "mongoose": "^5.11.11" - } - }, - "discord.js": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.1.0.tgz", - "integrity": "sha512-gxO4CXKdHpqA+WKG+f5RNnd3srTDj5uFJHgOathksDE90YNq/Qijkd2WlMgTTMS6AJoEnHxI7G9eDQHCuZ+xDA==", - "requires": { - "@discordjs/builders": "^0.5.0", - "@discordjs/collection": "^0.2.1", - "@discordjs/form-data": "^3.0.1", - "@sapphire/async-queue": "^1.1.4", - "@types/ws": "^7.4.7", - "discord-api-types": "^0.22.0", - "node-fetch": "^2.6.1", - "ws": "^7.5.1" - }, - "dependencies": { - "@discordjs/collection": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.2.1.tgz", - "integrity": "sha512-vhxqzzM8gkomw0TYRF3tgx7SwElzUlXT/Aa41O7mOcyN6wIJfj5JmDWaO5XGKsGSsNx7F3i5oIlrucCCWV1Nog==" - } - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", - "requires": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - }, - "dependencies": { - "domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==" - }, - "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" - } - } - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" - }, - "domexception": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", - "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", - "requires": { - "webidl-conversions": "^5.0.0" - }, - "dependencies": { - "webidl-conversions": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", - "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==" - } - } - }, - "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "dot-prop": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", - "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", - "requires": { - "is-obj": "^2.0.0" - } - }, - "dotenv": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", - "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==" - }, - "each": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/each/-/each-1.2.1.tgz", - "integrity": "sha512-POUbnWaseHgI8I+icHo3jAMrCqoLgVWaI7yqcQ0nat4q2f2BFUVGAndMOvr2UZoHAGAnQqotaM9RI4kZcjtAcg==" - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" - }, - "encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "requires": { - "iconv-lite": "^0.6.2" - }, - "dependencies": { - "iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } - } - } - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" - }, - "erela.js": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/erela.js/-/erela.js-2.3.3.tgz", - "integrity": "sha512-tzowGHLSodZr2j311csFSqm9lwE6plqeULTAwPwuRX9PQbXg4Ohdy/3MTMWrltiFAMSIG/5r9GQtTUt9Mqzhhw==", - "requires": { - "@discordjs/collection": "^0.1.6", - "petitio": "^1.1.0", - "ws": "^7.3.1" - } - }, - "erela.js-spotify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/erela.js-spotify/-/erela.js-spotify-1.2.0.tgz", - "integrity": "sha512-FbkdVK7OquVzyNVl4aZ3AU6RHRrHzBpORGorK5q+L26y3hB/7ze9mQ7uiOa5PsskskELRWepoluqke3U8edbmQ==", - "requires": { - "axios": "^0.20.0", - "erela.js": "^2.2.0" - }, - "dependencies": { - "axios": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.20.0.tgz", - "integrity": "sha512-ANA4rr2BDcmmAQLOKft2fufrtuvlqR+cXNNinUmvfeSNCOF98PZL+7M/v1zIdGo7OLjEA9J2gXJL+j4zGsl0bA==", - "requires": { - "follow-redirects": "^1.10.0" - } - } - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, - "escape-latex": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/escape-latex/-/escape-latex-1.2.0.tgz", - "integrity": "sha512-nV5aVWW1K0wEiUIEdZ4erkGGH8mDxGyxSeqPzRNtWP7ataw+/olFObw7hujFWlVjNsaDFw5VZ5NzVSIqRgfTiw==" - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "escodegen": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", - "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", - "requires": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - } - }, - "eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", - "dev": true, - "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - } - } - }, - "eslint-config-google": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/eslint-config-google/-/eslint-config-google-0.14.0.tgz", - "integrity": "sha512-WsbX4WbjuMvTdeVL6+J3rK1RGhCTqjsFjX7UMSMgZiyxxaNLkoJENbrGExzERFeoTpGw3F3FypTiWAP9ZXzkEw==", - "dev": true - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "dependencies": { - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - } - } - }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - }, - "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, - "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "dependencies": { - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - }, - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - }, - "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" - }, - "event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", - "dev": true - }, - "expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" - }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "express-session": { - "version": "1.17.2", - "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.17.2.tgz", - "integrity": "sha512-mPcYcLA0lvh7D4Oqr5aNJFMtBMKPLl++OKKxkHzZ0U0oDq1rpKBnkR5f5vCHR26VeArlTOEF9td4x5IjICksRQ==", - "requires": { - "cookie": "0.4.1", - "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.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==" - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - } - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "figlet": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.5.2.tgz", - "integrity": "sha512-WOn21V8AhyE1QqVfPIVxe3tupJacq1xGkPTB4iagT6o+P2cAgEOOwIxMftr4+ZCTI6d551ij9j61DFr0nsP2uQ==" - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "file-uri-to-path": { - "version": "1.0.0", - "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==" - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", - "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", - "dev": true - }, - "follow-redirects": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.3.tgz", - "integrity": "sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw==" - }, - "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "fortnite": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/fortnite/-/fortnite-4.3.2.tgz", - "integrity": "sha512-6BReElBAwP/3Gq6zEBn9gdQzrzWpMlumY9IF0suZgDshbzsS8dCDuV8JszDl1l1PVJwtzm2uexfUo9YtUqUV6Q==", - "requires": { - "node-fetch": "^2.3.0" - } - }, - "fortnite-9812": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/fortnite-9812/-/fortnite-9812-1.0.4.tgz", - "integrity": "sha512-TkdbPT1oTQ/GncnC5Sf4dVo6CLo4NJAtiU17rOUetcZ59nLAgNhceNkSqgMCYdYx6gCEB1A/9pYzm/JKOmgRcA==", - "requires": { - "node-fetch": "^2.3.0" - } - }, - "forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" - }, - "fraction.js": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.1.tgz", - "integrity": "sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg==" - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" - }, - "fs": { - "version": "0.0.1-security", - "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", - "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, - "fs-extra": { - "version": "0.26.7", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", - "integrity": "sha1-muH92UiXeY7at20JGM9C0MMYT6k=", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - }, - "dependencies": { - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "requires": { - "glob": "^7.1.3" - } - } - } - }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "requires": { - "minipass": "^3.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "requires": { - "pump": "^3.0.0" - } - }, - "gifencoder": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/gifencoder/-/gifencoder-2.0.1.tgz", - "integrity": "sha512-x19DcyWY10SkshBpokqFOo/HBht9GB75evRYvaLMbez9p+yB/o+kt0fK9AwW59nFiAMs2UUQsjv1lX/hvu9Ong==", - "requires": { - "canvas": "^2.2.0" - } - }, - "github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" - }, - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globals": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", - "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - }, - "dependencies": { - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - } - } - }, - "goosecache": { - "version": "9.0.14", - "resolved": "https://registry.npmjs.org/goosecache/-/goosecache-9.0.14.tgz", - "integrity": "sha512-EWUYpaUnRBVFabApU/tKqFTq2VPdXqU75UeCUcv6cYgPtNxErVkYyBpguwOQtvI8FLELhraK/AU6E7nyeFIqpw==", - "requires": { - "@kensingtontech/recacheman": "^2.2.8", - "loglevel": "^1.7.1", - "sha1": "^1.1.1" - } - }, - "got": { - "version": "11.8.2", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.2.tgz", - "integrity": "sha512-D0QywKgIe30ODs+fm8wMZiAcZjypcCodPNuMz5H9Mny7RJ+IjJ10BdmGW7OM7fHXP+O7r6ZwapQ/YQmMSvB0UQ==", - "requires": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.1", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - }, - "dependencies": { - "decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "requires": { - "mimic-response": "^3.1.0" - } - }, - "mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==" - } - } - }, - "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" - }, - "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-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" - }, - "html-encoding-sniffer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", - "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", - "requires": { - "whatwg-encoding": "^1.0.5" - } - }, - "html-entities": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.2.tgz", - "integrity": "sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ==" - }, - "html-to-text": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-5.1.1.tgz", - "integrity": "sha512-Bci6bD/JIfZSvG4s0gW/9mMKwBRoe/1RWLxUME/d6WUSZCdY7T60bssf/jFf7EYXRyqU4P5xdClVqiYU0/ypdA==", - "requires": { - "he": "^1.2.0", - "htmlparser2": "^3.10.1", - "lodash": "^4.17.11", - "minimist": "^1.2.0" - } - }, - "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" - }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } - } - }, - "http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "requires": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - } - }, - "http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", - "requires": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" - } - }, - "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, - "imageapi.js": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/imageapi.js/-/imageapi.js-1.7.0.tgz", - "integrity": "sha512-0OCfIWDQxCwqP5XjiumobcNbmv0rwatIOrhkQTikkJ8VjgohvaUh4yBHSKTlGHLyvPuKKNVfz4epR6Mm0xrHWQ==", - "requires": { - "node-fetch": "^2.6.1" - } - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" - }, - "is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "javascript-natural-sort": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", - "integrity": "sha1-+eIwPUUH9tdDVac2ZNFED7Wg71k=" - }, - "javascript-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-2.1.0.tgz", - "integrity": "sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg==" - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsdom": { - "version": "16.7.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", - "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", - "requires": { - "abab": "^2.0.5", - "acorn": "^8.2.4", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", - "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", - "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" - } - }, - "jshint": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.1.tgz", - "integrity": "sha512-vymzfR3OysF5P774x6zYv0bD4EpH6NWRxpq54wO9mA9RuY49yb1teKSICkLx2Ryx+mfzlVVNNbTBtsRtg78t7g==", - "dev": true, - "requires": { - "cli": "~1.0.0", - "console-browserify": "1.1.x", - "exit": "0.1.x", - "htmlparser2": "3.8.x", - "lodash": "~4.17.21", - "minimatch": "~3.0.2", - "shelljs": "0.3.x", - "strip-json-comments": "1.0.x" - }, - "dependencies": { - "domhandler": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "entities": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", - "dev": true - }, - "htmlparser2": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", - "dev": true, - "requires": { - "domelementtype": "1", - "domhandler": "2.3", - "domutils": "1.5", - "entities": "1.0", - "readable-stream": "1.1" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", - "dev": true - } - } - }, - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "kareem": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz", - "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ==" - }, - "keyv": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.0.3.tgz", - "integrity": "sha512-zdGa2TOpSZPq5mU6iowDARnMBZgtCqJ11dJROFi6tg6kTn4nuUdU09lFyLFSaHrWqpIJ+EBq4E8/Dc0Vx5vLdA==", - "requires": { - "json-buffer": "3.0.1" - } - }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", - "requires": { - "graceful-fs": "^4.1.9" - } - }, - "leven": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-4.0.0.tgz", - "integrity": "sha512-puehA3YKku3osqPlNuzGDUHq8WpwXupUg1V6NXdV38G+gr+gkBwFC8g1b/+YcIvp8gnqVIus+eJCH/eGsRmJNw==" - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", - "dev": true - }, - "loglevel": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.7.1.tgz", - "integrity": "sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw==" - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, - "lyrics-finder": { - "version": "21.7.0", - "resolved": "https://registry.npmjs.org/lyrics-finder/-/lyrics-finder-21.7.0.tgz", - "integrity": "sha512-AMaJ+MdbdemYOWM1Kxd/vzn23OD66/fdemaJWN9dU0qsxK6d09rODSphygAvaGka6mgfHaFlHN+ETHv/d60ftw==", - "requires": { - "encoding": "^0.1.13", - "html-to-text": "^5.1.1", - "node-fetch": "^2.6.0" - } - }, - "m3u8stream": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/m3u8stream/-/m3u8stream-0.8.4.tgz", - "integrity": "sha512-sco80Db+30RvcaIOndenX6E6oQNgTiBKeJbFPc+yDXwPQIkryfboEbCvXPlBRq3mQTCVPQO93TDVlfRwqpD35w==", - "requires": { - "miniget": "^4.0.0", - "sax": "^1.2.4" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, - "mathjs": { - "version": "9.4.4", - "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-9.4.4.tgz", - "integrity": "sha512-5EEJXnWOzLDgMHSFyw623nH+MTBZxquWwXtrzTsingOouJJ6UZG2VNO1lwH31IMt9aMno1axO6TYleIP4YSDaQ==", - "requires": { - "@babel/runtime": "^7.14.6", - "complex.js": "^2.0.15", - "decimal.js": "^10.3.1", - "escape-latex": "^1.2.0", - "fraction.js": "^4.1.1", - "javascript-natural-sort": "^0.7.1", - "seedrandom": "^3.0.5", - "tiny-emitter": "^2.1.0", - "typed-function": "^2.0.0" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" - }, - "memory-pager": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "optional": true - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.49.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", - "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==" - }, - "mime-types": { - "version": "2.1.32", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", - "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", - "requires": { - "mime-db": "1.49.0" - } - }, - "mimic-response": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", - "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==" - }, - "miniget": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/miniget/-/miniget-4.2.1.tgz", - "integrity": "sha512-O/DduzDR6f+oDtVype9S/Qu5hhnx73EDYGyZKwU/qN82lehFZdfhoa4DT51SpsO+8epYrB3gcRmws56ROfTIoQ==" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "minipass": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", - "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", - "requires": { - "yallist": "^4.0.0" - } - }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - }, - "mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" - }, - "moment": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", - "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" - }, - "moment-duration-format": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/moment-duration-format/-/moment-duration-format-2.3.2.tgz", - "integrity": "sha512-cBMXjSW+fjOb4tyaVHuaVE/A5TqkukDWiOfxxAjY+PEqmmBQlLwn+8OzwPiG3brouXKY5Un4pBjAeB6UToXHaQ==" - }, - "mongodb": { - "version": "3.6.11", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.11.tgz", - "integrity": "sha512-4Y4lTFHDHZZdgMaHmojtNAlqkvddX2QQBEN0K//GzxhGwlI9tZ9R0vhbjr1Decw+TF7qK0ZLjQT292XgHRRQgw==", - "requires": { - "bl": "^2.2.1", - "bson": "^1.1.4", - "denque": "^1.4.1", - "optional-require": "^1.0.3", - "safe-buffer": "^5.1.2", - "saslprep": "^1.0.0" - } - }, - "mongoose": { - "version": "5.13.9", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.13.9.tgz", - "integrity": "sha512-JbLw5ie0LJxm7V9LoNxRY//6cyFJf0cOpON2TWUWvF9pabil6ArfECL3xHV2N+mwwO4gXiIa+c0pwTzDUVTgqw==", - "requires": { - "@types/bson": "1.x || 4.0.x", - "@types/mongodb": "^3.5.27", - "bson": "^1.1.4", - "kareem": "2.3.2", - "mongodb": "3.6.11", - "mongoose-legacy-pluralize": "1.0.2", - "mpath": "0.8.4", - "mquery": "3.2.5", - "ms": "2.1.2", - "optional-require": "1.0.x", - "regexp-clone": "1.0.0", - "safe-buffer": "5.2.1", - "sift": "13.5.2", - "sliced": "1.0.1" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - } - } - }, - "mongoose-legacy-pluralize": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", - "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" - }, - "mpath": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.4.tgz", - "integrity": "sha512-DTxNZomBcTWlrMW76jy1wvV37X/cNNxPW1y2Jzd4DZkAaC5ZGsm8bfGfNOthcDuRJujXLqiuS6o3Tpy0JEoh7g==" - }, - "mquery": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.5.tgz", - "integrity": "sha512-VjOKHHgU84wij7IUoZzFRU07IAxd5kWJaDmyUzQlbjHjyoeK5TNeeo8ZsFDtTYnSgpW6n/nMNIHvE3u8Lbrf4A==", - "requires": { - "bluebird": "3.5.1", - "debug": "3.1.0", - "regexp-clone": "^1.0.0", - "safe-buffer": "5.1.2", - "sliced": "1.0.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "nan": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", - "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==" - }, - "napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" - }, - "node": { - "version": "16.6.1", - "resolved": "https://registry.npmjs.org/node/-/node-16.6.1.tgz", - "integrity": "sha512-qlIQ5vkAAMP+T1bYivwngIqZlUzerPSeaeAQVUvyQ2XZ8WN86ZUdzcpkW/iuEnP9paNcpAsA4p9yCsfrdjG7YQ==", - "dev": true, - "requires": { - "node-bin-setup": "^1.0.0" - } - }, - "node-abi": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", - "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==", - "requires": { - "semver": "^5.4.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, - "node-bin-setup": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-bin-setup/-/node-bin-setup-1.0.6.tgz", - "integrity": "sha512-uPIxXNis1CRbv1DwqAxkgBk5NFV3s7cMN/Gf556jSw6jBvV7ca4F9lRL/8cALcZecRibeqU+5dFYqFFmzv5a0Q==", - "dev": true - }, - "node-fetch": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.2.tgz", - "integrity": "sha512-aLoxToI6RfZ+0NOjmWAgn9+LEd30YCkJKFSyWacNZdEKTit/ZMcKjGkTRo8uWEsnIb/hfKecNPEbln02PdWbcA==" - }, - "node-superfetch": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/node-superfetch/-/node-superfetch-0.2.3.tgz", - "integrity": "sha512-xOqifvw/3N+tIeeC80/TNJXkoxDZm8JWc7/0VBkJ86ttQTlJvoicuVaeJlKKHYRlmC2O6ygNIhNPwLYX4bxqdA==", - "requires": { - "form-data": "^4.0.0", - "node-fetch": "^2.6.1" - }, - "dependencies": { - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - } - } - }, - "nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "requires": { - "abbrev": "1" - } - }, - "normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==" - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "nth-check": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", - "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", - "requires": { - "boolbase": "^1.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "nwsapi": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", - "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "requires": { - "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", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "optional-require": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.0.3.tgz", - "integrity": "sha512-RV2Zp2MY2aeYK5G+B/Sps8lW5NHAzE5QClbFP15j+PWmP+T9PxlJXBOOLoSAdgwFvS4t0aMR4vpedMkbHfh0nA==" - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "ow": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz", - "integrity": "sha512-SGnrGUbhn4VaUGdU0EJLMwZWSupPmF46hnTRII7aCLCrqixTAC5eKo8kI4/XXf1eaaI8YEVT+3FeGNJI9himAQ==", - "requires": { - "@sindresorhus/is": "^4.0.1", - "callsites": "^3.1.0", - "dot-prop": "^6.0.1", - "lodash.isequal": "^4.5.0", - "type-fest": "^1.2.1", - "vali-date": "^1.0.0" - } - }, - "p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==" - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-redis-url": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/parse-redis-url/-/parse-redis-url-0.0.2.tgz", - "integrity": "sha1-E8kqCrvm8lEgBqjEnebLe43Usnc=" - }, - "parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" - }, - "parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", - "requires": { - "parse5": "^6.0.1" - } - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" - }, - "petitio": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/petitio/-/petitio-1.3.2.tgz", - "integrity": "sha512-hbbT+rOvovz39ZneGW+C8B4YsKH20KLXYVDT/IzSUxaY8H7al/TO+vFCm+H5cnYe62gIqF9ak5p8OJktV/I0Ig==" - }, - "prebuild-install": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz", - "integrity": "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==", - "requires": { - "detect-libc": "^1.0.3", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^2.21.0", - "npmlog": "^4.0.1", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^3.0.3", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "prettier": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.0.tgz", - "integrity": "sha512-DsEPLY1dE5HF3BxCRBmD4uYZ+5DCbvatnolqTqcxEgKVZnL2kUfyu7b8pPQ5+hTBkdhU9SLUmK0/pHb07RE4WQ==", - "dev": true - }, - "prism-media": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.3.2.tgz", - "integrity": "sha512-L6UsGHcT6i4wrQhFF1aPK+MNYgjRqR2tUoIqEY+CG1NqVkMjPRKzS37j9f8GiYPlD6wG9ruBj+q5Ax+bH8Ik1g==" - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "requires": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" - }, - "quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==" - }, - "quick.db": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/quick.db/-/quick.db-7.1.3.tgz", - "integrity": "sha512-0S1fVb9OAZGhkI4ZIc5Oe4yWMwhz20xSsziwd6+yGWKKMsPt+XOfj/gD5CesGxd2WdqBkZFBiP8ZqWDu55HLHA==", - "requires": { - "better-sqlite3": "^7.1.1", - "lodash": "^4.17.20" - } - }, - "quickchart-js": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/quickchart-js/-/quickchart-js-1.4.1.tgz", - "integrity": "sha512-LLfHUqFmygKMQKh3e4sMInx31htEVkNMnBwHFYnS7ogBuRmsVx4tE1VU1wPay2/FRDUZTNohyvEbm5EKFzHD0g==", - "requires": { - "axios": "^0.21.1", - "javascript-stringify": "^2.0.1" - } - }, - "random-bytes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", - "integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs=" - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" - }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "recacheman-file": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/recacheman-file/-/recacheman-file-0.2.5.tgz", - "integrity": "sha512-wG3NrjR/+QTGVjV+omK8n81LPHNzhfHNiMGx25upFUX3FBmGBbtPZCLFlwc2wUDt4HIReKQ3sIjOQVBUE8/T5Q==", - "requires": { - "fs-extra": "~0.26.2", - "sanitize-filename": "^1.5.3" - } - }, - "recacheman-memory": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/recacheman-memory/-/recacheman-memory-1.1.2.tgz", - "integrity": "sha512-FqaAJ0Rn0yZaGPPKI6aAb6z5PbPLKGhlZnCWRB2vYzBtPOx3c/PhCT3B1jt1zjkVjDNLs06+NGRoK3GY/A0qsw==", - "requires": { - "lru-cache": "~4.1.x" - }, - "dependencies": { - "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" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - } - } - }, - "reconlx": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/reconlx/-/reconlx-2.4.3.tgz", - "integrity": "sha512-Xtd3sNPE668Y+50KVOPHVtpJ/QJk+xhwWwO7zXakWD7vTIO5PGwO2vPhQAM4SHF4JhgCNIoFCapgo7rWKhEKuA==", - "requires": { - "axios": "^0.21.1", - "discord.js": "^13.0.1", - "jsdom": "^16.7.0", - "mongoose": "^5.13.5", - "sourcebin": "^4.2.5" - } - }, - "redis": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/redis/-/redis-3.1.2.tgz", - "integrity": "sha512-grn5KoZLr/qrRQVwoSkmzdbw6pwF+/rwODtrOr6vuBRiR/f3rjSTGupbF90Zpqm2oenix8Do6RV7pYEkGwlKkw==", - "requires": { - "denque": "^1.5.0", - "redis-commands": "^1.7.0", - "redis-errors": "^1.2.0", - "redis-parser": "^3.0.0" - } - }, - "redis-commands": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.7.0.tgz", - "integrity": "sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ==" - }, - "redis-errors": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", - "integrity": "sha1-62LSrbFeTq9GEMBK/hUpOEJQq60=" - }, - "redis-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", - "integrity": "sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ=", - "requires": { - "redis-errors": "^1.0.0" - } - }, - "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" - }, - "regexp-clone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", - "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, - "resolve-alpn": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "responselike": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", - "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", - "requires": { - "lowercase-keys": "^2.0.0" - } - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "sanitize-filename": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz", - "integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==", - "requires": { - "truncate-utf8-bytes": "^1.0.0" - } - }, - "saslprep": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", - "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", - "optional": true, - "requires": { - "sparse-bitfield": "^3.0.3" - } - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, - "saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", - "requires": { - "xmlchars": "^2.2.0" - } - }, - "seedrandom": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", - "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==" - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - } - } - }, - "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "requires": { - "randombytes": "^2.1.0" - } - }, - "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" - }, - "sha1": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", - "integrity": "sha1-rdqnqTFo85PxnrKxUJFhjicA+Eg=", - "requires": { - "charenc": ">= 0.0.1", - "crypt": ">= 0.0.1" - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "shelljs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", - "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", - "dev": true - }, - "sift": { - "version": "13.5.2", - "resolved": "https://registry.npmjs.org/sift/-/sift-13.5.2.tgz", - "integrity": "sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA==" - }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" - }, - "simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" - }, - "simple-get": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", - "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", - "requires": { - "decompress-response": "^4.2.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - } - } - }, - "sliced": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", - "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" - }, - "soundcloud-downloader": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/soundcloud-downloader/-/soundcloud-downloader-1.0.0.tgz", - "integrity": "sha512-UaEGaO+NASmTKJduGGgFjWVixLKFbvkxuX1oIYseZCsdEAg4q3o+Zn5Q9NWjQ1y0QciPkhEDnS22wnPb3XZ7pw==", - "requires": { - "@babel/runtime": "^7.10.3", - "axios": "^0.21.0", - "dotenv": "^8.2.0", - "m3u8stream": "^0.8.0", - "soundcloud-key-fetch": "^1.0.10" - }, - "dependencies": { - "dotenv": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", - "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==" - } - } - }, - "soundcloud-key-fetch": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/soundcloud-key-fetch/-/soundcloud-key-fetch-1.0.11.tgz", - "integrity": "sha512-ofnXB3yeHGVKnFKEMBP/kIJzGu1SduQzJc+zmkPbKgelvYNsEU/aTGD0PlhmyZquaCkTGByF8CEPRrAnt7ki4g==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true - }, - "sourcebin": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/sourcebin/-/sourcebin-4.2.5.tgz", - "integrity": "sha512-YLfvrooTQhTgOSIKN35Zwlll2dlTaZ5zibKn/lADi8IzbF7AQKz2WKnzILCFIkOMpjDSFMVCzwzJVXVYg0bBEg==", - "requires": { - "@sourcebin/linguist": "^0.0.3", - "got": "^11.8.1" - } - }, - "sparse-bitfield": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", - "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", - "optional": true, - "requires": { - "memory-pager": "^1.0.2" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" - }, - "string-toolkit": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/string-toolkit/-/string-toolkit-1.5.0.tgz", - "integrity": "sha512-JCUSyVqYc8upsrYaCFqsVocSjjUQF8kuCyElwHuXXkPXHyc23YFR6BmacR+UnxkgM7+37/Y79qbOv0HlUzOOvQ==", - "requires": { - "decancer": "1.0.4" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "superscript-text": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/superscript-text/-/superscript-text-1.0.0.tgz", - "integrity": "sha1-58snUlZzYN9QvrBhDOjfPXHY39g=" - }, - "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" - } - }, - "symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" - }, - "table": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", - "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ajv": { - "version": "8.6.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", - "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, - "tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", - "requires": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - } - }, - "tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "requires": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - }, - "dependencies": { - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - } - } - }, - "tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "requires": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "dependencies": { - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "tiny-emitter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", - "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" - }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" - }, - "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==", - "requires": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.1.2" - } - }, - "tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", - "requires": { - "punycode": "^2.1.1" - } - }, - "truncate-utf8-bytes": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", - "integrity": "sha1-QFkjkJWS1W94pYGENLC3hInKXys=", - "requires": { - "utf8-byte-length": "^1.0.1" - } - }, - "ts-mixer": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.0.tgz", - "integrity": "sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ==" - }, - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" - }, - "twemoji-parser": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/twemoji-parser/-/twemoji-parser-13.1.0.tgz", - "integrity": "sha512-AQOzLJpYlpWMy8n+0ATyKKZzWlZBJN+G0C+5lhX7Ftc2PeEVdUU/7ns2Pn2vVje26AIZ/OHwFoUbdv6YYD/wGg==" - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==" - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "typed-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-2.0.0.tgz", - "integrity": "sha512-Hhy1Iwo/e4AtLZNK10ewVVcP2UEs408DS35ubP825w/YgSBK1KVLwALvvIG4yX75QJrxjCpcWkzkVRB0BwwYlA==" - }, - "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" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "utf8-byte-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz", - "integrity": "sha1-9F8VDExm7uloGGUFq5P8u4rWv2E=" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" - }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "vali-date": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", - "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=" - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" - }, - "w3c-hr-time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", - "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", - "requires": { - "browser-process-hrtime": "^1.0.0" - } - }, - "w3c-xmlserializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", - "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", - "requires": { - "xml-name-validator": "^3.0.0" - } - }, - "webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==" - }, - "weky": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/weky/-/weky-3.1.5.tgz", - "integrity": "sha512-BtgpAx8BF9UoUZpSd2RGUMCGgWa1Vj7A1bit0D/lI/FLBkMvviLClyOqr7bfC2m4gh1u2oB8MteIIdSNLxc8Dw==", - "requires": { - "@weky/inlinereply": "^0.0.0", - "axios": "^0.21.1", - "chalk": "^4.1.1", - "cheerio": "^1.0.0-rc.10", - "discord-buttons": "^4.0.0", - "discord.js": "^12.5.3", - "html-entities": "^2.3.2", - "mathjs": "^9.4.3", - "node-fetch": "^2.6.1", - "quick.db": "^7.1.3", - "string-width": "^2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "discord.js": { - "version": "12.5.3", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.5.3.tgz", - "integrity": "sha512-D3nkOa/pCkNyn6jLZnAiJApw2N9XrIsXUAdThf01i7yrEuqUmDGc7/CexVWwEcgbQR97XQ+mcnqJpmJ/92B4Aw==", - "requires": { - "@discordjs/collection": "^0.1.6", - "@discordjs/form-data": "^3.0.1", - "abort-controller": "^3.0.0", - "node-fetch": "^2.6.1", - "prism-media": "^1.2.9", - "setimmediate": "^1.0.5", - "tweetnacl": "^1.0.3", - "ws": "^7.4.4" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", - "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", - "requires": { - "iconv-lite": "0.4.24" - } - }, - "whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==" - }, - "whatwg-url": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", - "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", - "requires": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "ws": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.4.tgz", - "integrity": "sha512-zP9z6GXm6zC27YtspwH99T3qTG7bBFv2VIkeHstMLrLlDJuzA7tQ5ls3OJ1hOGGCzTQPniNJoHXIAOS0Jljohg==" - }, - "xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==" - }, - "xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - } -} diff --git a/package.json b/package.json @@ -29,7 +29,7 @@ "discord bot" ], "author": "Ń1ght#0001", - "license": "ISC", + "license": "Apache-2.0", "bugs": { "url": "https://github.com/night0721/cath/issues" }, @@ -39,42 +39,29 @@ "eslint-config-google": "^0.14.0", "jshint": "^2.13.0", "node": "^16.6.1", - "prettier": "^2.4.0" + "prettier": "^2.3.2" }, "dependencies": { - "@reconlx/discord.js": "^1.1.101", "axios": "^0.21.4", - "canvacord": "^5.2.1", + "canvacord": "^5.2.3", "canvas": "^2.8.0", - "cath": "^1.1.0", - "common-tags": "^1.8.0", - "cors": "^2.8.5", - "discord-canvas": "^1.4.1", + "cath": "^1.2.2", "discord-giveaways": "^5.0.1", "discord-xp": "^1.1.16", "discord.js": "^13.1.0", "dotenv": "^10.0.0", "erela.js": "^2.3.3", "erela.js-spotify": "^1.2.0", - "express": "^4.17.1", - "express-session": "^1.17.2", - "figlet": "^1.5.0", - "glob": "^7.1.7", + "figlet": "^1.5.2", "goosecache": "^9.0.14", - "imageapi.js": "^1.7.0", - "leven": "^4.0.0", + "leven": "^3.1.0", "lyrics-finder": "^21.7.0", "moment": "^2.29.1", "mongoose": "^5.13.9", - "ms": "^2.1.3", - "node-fetch": "^2.6.2", - "node-superfetch": "^0.2.3", - "quick.db": "^7.1.3", - "quickchart-js": "^1.2.0", + "quickchart-js": "^1.4.2", "reconlx": "^2.4.3", "soundcloud-downloader": "^1.0.0", - "string-toolkit": "^1.4.0", - "superscript-text": "^1.0.0", - "weky": "^3.1.5" + "string-toolkit": "^1.5.0", + "weky": "^3.1.8" } } diff --git a/start.bat b/start.bat @@ -0,0 +1 @@ +node . +\ No newline at end of file diff --git a/unused/commands/Config/choices.js b/unused/commands/Config/choices.js @@ -0,0 +1,123 @@ +const schema = require("../../models/modmail"); +module.exports = { + name: "choices", + UserPerm: "ADMINISTRATOR", + description: "Add choices for modmail in a server", + usage: "(add/list/rmv) (Emoji) {Text}", + category: "Config", + run: async (client, message, args) => { + schema.findOne({ Guild: message.guild.id }, async (err, data) => { + if (data) return; + else { + new schema({ + Guild: message.guild.id, + }).save(); + } + }); + if (args[0].toLowerCase() === "add") { + if (!args[1]) return client.err(message, "Config", "choices", 11); + if (!args[2]) return client.err(message, "Config", "choices", 12); + if (!args.slice(2).join(" ").length > 100) + return client.err(message, "Config", "choices", 13); + const config = await schema.findOne({ Guild: message.guild.id }); + if ( + !config || + !config.Choices || + !Object.entries(config.Choices).length + ) { + const choices = { + 0: { + emoji: args[1], + text: args.slice(2).join(" "), + }, + }; + schema.findOne({ Guild: message.guild.id }, async (err, data) => { + if (data) { + if (data.Choices) { + data.Choices = choices; + await schema.findOneAndUpdate({ Guild: message.guild.id }, data); + } else if (data.Guild) { + data.Choices = choices; + await schema.findOneAndUpdate({ Guild: message.guild.id }, data); + } else { + new schema({ + Guild: message.guild.id, + Choices: choices, + }).save(); + } + } + }); + return message.channel.send({ + content: `${message.author.tag} has added ${args[1]} as a modmail choice`, + }); + } else { + const choices = Object.entries(config.Choices); + if (choices.length >= 5) + return client.err(message, "Config", "choices", 14); + const last = choices[choices.length - 1]; + const parsed = config.Choices; + parsed[(parseInt(last[0]) + 1).toString()] = { + emoji: args[1], + text: args.slice(2).join(" "), + }; + schema.findOne({ Guild: message.guild.id }, async (err, data) => { + if (data) { + data.Choices = parsed; + await schema.findOneAndUpdate({ Guild: message.guild.id }, data); + } else { + new schema({ + Guild: message.guild.id, + Choices: parsed, + }).save(); + } + }); + return message.channel.send({ + content: `${message.author.tag} has added ${args[1]} as a modmail choice`, + }); + } + } + if (args[0].toLowerCase() === "list") { + const Data = await schema.findOne({ Guild: message.guild.id }); + if (!Data || !Data.Choices || !Object.entries(Data.Choices).length) + return client.err(message, "Config", "choices", 10); + else + return message.channel.send( + Object.entries(Data.Choices) + .map(value => { + return `${value[1].emoji}: ${value[1].text}`; + }) + .join("\n") + ); + } + if (args[0].toLowerCase() === "rmv") { + if (!args[1]) return client.err(message, "Config", "choices", 11); + schema.findOne({ Guild: message.guild.id }, async (err, data) => { + if (!data || !data.Choices || !Object.entries(data.Choices).length) + return client.err(message, "Config", "choices", 10); + const choices = Object.entries(data.Choices); + const found = choices.find(value => value[1].emoji == args[1]); + if (!found) return client.err(message, "Config", "choices", 15); + const filtered = choices.filter(value => value[1].emoji != args[1]); + const parsed = {}; + filtered.map(value => { + parsed[value[0]] = { + emoji: value[1].emoji, + text: value[1].text, + }; + }); + if (data) { + data.Choices = parsed; + await schema.findOneAndUpdate({ Guild: message.guild.id }, data); + } else { + new schema({ + Guild: message.guild.id, + Choices: parsed, + }).save(); + } + }); + return message.channel.send({ + content: `${args[1]} is removed from choices.`, + }); + } + }, +}; diff --git a/commands/Config/cmd-list.js b/unused/commands/Config/cmd-list.js diff --git a/commands/Config/create.js b/unused/commands/Config/create.js diff --git a/commands/Config/delete.js b/unused/commands/Config/delete.js diff --git a/commands/Config/migrate.js b/unused/commands/Config/migrate.js diff --git a/unused/commands/Config/modmail-category.js b/unused/commands/Config/modmail-category.js @@ -0,0 +1,32 @@ +const schema = require("../../models/modmail"); +const { Client, Message, MessageEmbed } = require("discord.js"); + +module.exports = { + name: "modmail-category", + UserPerm: "ADMINISTRATOR", + description: "Setup modmail category in a server", + usage: "(Category ID)", + category: "Config", + run: async (client, message, args) => { + if (!args.length) + return client.err(message, "Config", "modmail-category", 0); + const category = message.guild.channels.cache.find( + ch => (ch.type = "GUILD_CATEGORY" && ch.id == args[0]) + ); + if (!category) return client.err(message, "Config", "modmail-category", 1); + schema.findOne({ Guild: message.guild.id }, async (err, data) => { + if (data) { + data.Category = category.id; + await schema.findOneAndUpdate({ Guild: message.guild.id }, data); + } else { + new schema({ + Guild: message.guild.id, + Category: category.id, + }).save(); + } + }); + return message.channel.send({ + content: `**Saved category to ${category.name}**`, + }); + }, +}; diff --git a/unused/commands/Config/modmail-role.js b/unused/commands/Config/modmail-role.js @@ -0,0 +1,29 @@ +const schema = require("../../models/modmail"); + +module.exports = { + name: "modmail-role", + UserPerm: "ADMINISTRATOR", + description: "Add role for modmail in a server", + usage: "(Role)", + category: "Config", + run: async (client, message, args) => { + if (!args.length) return client.err(message, "Config", "modmail-role", 0); + const role = + message.mentions.roles.first() || message.guild.roles.cache.get(args[0]); + if (!role) return client.err(message, "Config", "modmail-role", 404); + schema.findOne({ Guild: message.guild.id }, async (err, data) => { + if (data) { + data.Role = role.id; + await schema.findOneAndUpdate({ Guild: message.guild.id }, data); + } else { + new schema({ + Guild: message.guild.id, + Role: role.id, + }).save(); + } + }); + return message.channel.send({ + content: `Updated **${role.name}** as the modmail role`, + }); + }, +}; diff --git a/commands/Config/panel.js b/unused/commands/Config/panel.js diff --git a/commands/Config/rr-add.js b/unused/commands/Config/rr-add.js diff --git a/unused/commands/Config/rr-rmv.js b/unused/commands/Config/rr-rmv.js @@ -0,0 +1,34 @@ +const Schema = require("../../models/reaction"); +module.exports = { + name: "rr-rmv", + UserPerm: "ADMINISTRATOR", + description: "Remove reaction role for server", + category: "Config", + run: async (client, message, args, utils) => { + message.channel + .send({ content: "**Do you want to remove the reaction roles?**" }) + .then(async msg => { + Schema.findOne({ Guild: message.guild.id }, async (err, data) => { + if (err) throw err; + if (!data) return client.err(message, "Config", "rr-rmv", 10); + }); + const emoji = await utils.confirmation( + msg, + message.author, + ["✅", "❌"], + 10000 + ); + if (emoji === "✅") { + msg.delete(); + await Schema.findOneAndDelete({ Guild: message.guild.id }); + message.channel.send({ + content: `Removed reaction roles for this server.`, + }); + } + if (emoji === "❌") { + msg.delete(); + message.channel.send({ content: "Cancelled." }); + } + }); + }, +}; diff --git a/commands/Fun/connect4.js b/unused/commands/Fun/connect4.js diff --git a/commands/Fun/quote.js b/unused/commands/Fun/quote.js diff --git a/unused/commands/Utilities/modmail.js b/unused/commands/Utilities/modmail.js @@ -0,0 +1,165 @@ +const schema = require("../../models/modmail"); +const { MessageEmbed, MessageAttachment } = require("discord.js"); +const fs = require("fs"); +module.exports = { + name: "modmail", + BotPerm: "MANAGE_CHANNELS", + description: "Create a modmail thread with moderators in a server", + usage: "(Emoji) (Text)", + category: "Utilities", + run: async (client, interaction, args) => { + try { + const data = await schema.findOne({ Guild: interaction.guild.id }); + if ( + !data || + !data.Role || + !data.Category || + !data.Choices || + !Object.entries(data.Choices).length || + !interaction.guild.roles.cache.has(data.Role) || + !interaction.guild.channels.cache.find( + value => value.type == "GUILD_CATEGORY" && value.id === data.Category + ) + ) + return interaction.followUp({ + content: `This server isn't setup properly. Please find an administrator or a moderator to specify a category, role and choices for users to create thread. The issue may be caused by invalid role/category.`, + }); + interaction.deleteReply(); + const choices = Object.entries(data.Choices); + const embed = new MessageEmbed() + .setDescription( + `Choices of topic:\n${choices + .map(value => `${value[1].emoji} - ${value[1].text}`) + .join("\n")}` + ) + .setAuthor( + interaction.guild.name, + interaction.guild.iconURL({ dynamic: true }) + ) + .setColor(client.color) + .setTimestamp() + .setTitle(`${interaction.user.tag}'s modmail`); + const msg = await interaction.user.send({ + content: "Please react below", + embeds: [embed], + }); + choices.map(async value => { + await msg.react(value[1].emoji); + }); + const filter = (reaction, user) => { + return ( + choices.map(value => value[1].emoji).includes(reaction.emoji.name) && + user.id !== interaction.user.id + ); + }; + const reactionCollector = msg.createReactionCollector({ + filter, + }); + let type; + reactionCollector + .on("collect", async (reaction, user) => { + type = choices.find(value => value[1].emoji == reaction.emoji.name); + await msg.delete(); + reactionCollector.stop("done"); + }) + .on("end", async (collected, reason) => { + if (reason.toLowerCase() == "time") { + return interaction.user.send({ + content: "You didn't provide a reaction in-time. Cancelled", + }); + } else { + const channel = await interaction.guild.channels.create( + `${interaction.user.username}-${interaction.user.discriminator}`, + { + reason: "Modmail thread", + parent: data.Category, + topic: `${type[1].text}`, + type: "text", + } + ); + const transcript = []; + channel.permissionOverwrites.create(data.Role, { + VIEW_CHANNEL: true, + SEND_MESSAGES: true, + }); + channel.permissionOverwrites.create(interaction.guild.id, { + VIEW_CHANNEL: false, + }); + channel.send({ + content: `A modmail thread has been started by **${interaction.user.tag}** with type: **${type[1].text}**\nUse \`close\` to close the thread`, + }); + interaction.user.send({ + content: "Thread created. Use `close` to close the thread.", + }); + const filter = m => !m.author.bot; + const channelCollector = channel.createMessageCollector({ filter }); + const dmCollector = + interaction.user.dmChannel.createMessageCollector({ + filter, + }); + channelCollector.on("collect", async m => { + if (m.content.toLowerCase().startsWith("close")) { + interaction.user.send({ + content: `Admin has closed the thread`, + }); + channel.send({ content: "Closing.." }); + dmCollector.stop("done"); + channelCollector.stop("done"); + fs.writeFileSync( + `./${interaction.user.id}.txt`, + transcript.join("\n") + ); + const attachment = new MessageAttachment( + fs.createReadStream(`./${interaction.user.id}.txt`), + `Transcript-${interaction.user.id}` + ); + await channel.send({ + content: "Transcript:", + files: [attachment], + }); + fs.unlinkSync(`./transcript-${interaction.user.id}.txt`); + setTimeout(() => { + channel.delete(); + }, 1000 * 10); + } + interaction.user.send({ content: `**Admin**: ${m.content}` }); + transcript.push(`**Admin**: ${m.content}`); + }); + dmCollector.on("collect", async m => { + if (m.content.toLowerCase().startsWith("close")) { + interaction.user.send({ content: "Closed" }); + channel.send({ + content: `${interaction.user.tag} has closed the thread`, + }); + dmCollector.stop("done"); + channelCollector.stop("done"); + fs.writeFileSync( + `./${interaction.user.id}.txt`, + transcript.join("\n") + ); + const attachment = new MessageAttachment( + fs.createReadStream(`./${interaction.user.id}.txt`), + `Transcript-${interaction.user.id}` + ); + await channel.send({ + content: "Transcript:", + files: [attachment], + }); + fs.unlinkSync(`./${interaction.user.id}.txt`); + setTimeout(() => { + channel.delete(); + }, 1000 * 60 * 12); + } + channel.send({ + content: `**${interaction.user.tag}**: ${m.content}`, + }); + transcript.push(`**${interaction.user.tag}**: ${m.content}`); + }); + } + }); + } catch (e) { + console.log(e); + return interaction.followUp({ content: "An error occured" }); + } + }, +}; diff --git a/unused/events/messageCreate.js b/unused/events/messageCreate.js @@ -0,0 +1,240 @@ +const client = require("../bot"); +const codmclient = require("../client/codmclient"); +const leven = require("leven"); +const { MessageEmbed } = require("discord.js"); +const schema = require("../unused/models/custom-commands"); +const cooldown = require("../models/cooldown"); +const utils = require("../util/functions/function"); +client.on("messageCreate", async message => { + const p = await client.prefix(message); + if (message.author.bot || !message.guild) return; + if (message.content.match(new RegExp(`^<@!?${client.user.id}>( |)$`))) { + const _ = new MessageEmbed() + .setTitle(client.user.username) + .addField("Links:", client.cat) + .addField( + "Prefix/Usage", + `My prefix in **${message.guild.name}** is **${p}**\n\nRun \`${p}help\` to start using the bot` + ) + .setThumbnail(client.user.displayAvatarURL()) + .setURL(client.web) + .setFooter(`Made by ${client.author}`) + .setTimestamp() + .setColor(client.color); + const m = await message.reply({ embeds: [_] }); + setTimeout(() => m.delete(), 15000); + } + if (p) { + if (!message.content.toLowerCase().startsWith(p.toLowerCase())) return; + } + if (!message.member) + message.member = await message.guild.fetchMember(message); + const data = {}; + let guildDB = await client.data.getGuild(message.guild.id); + if (!guildDB) return; + let userDB = await client.data.getUser(message.author.id); + if (!userDB) return; + let userEconDB = await client.data.getUserEcon(message.author.id); + data.Guild = guildDB; + data.User = userDB; + data.UserEcon = userEconDB; + if (!guildDB) await client.data.CreateGuild(message.guild.id); + if (!userEconDB) await client.createProfile(message.author.id); + if (data.User) { + if (data.User.Blacklist) return; + } + const [cmd, ...args] = message.content.slice(p.length).trim().split(/ +/g); + if (cmd.length == 0) return; + const cmddata = await schema.findOne({ + Guild: message.guild.id, + Command: cmd, + }); + if (!cmddata) { + const command = + client.commands.get(cmd.toLowerCase()) || + client.commands.find(c => c.aliases?.includes(cmd.toLowerCase())); + if (!command) { + const best = [ + ...client.commands.map(cmd => cmd.name), + ...client.aliases.keys(), + ].filter(c => leven(cmd.toLowerCase(), c.toLowerCase()) < c.length * 0.4); + const dym = + best.length == 0 + ? "" + : best.length == 1 + ? `Do you mean this?\n**${best[0]}**` + : `Do you mean one of these?\n${best + .slice(0, 3) + .map(value => `**${value}**`) + .join("\n")}`; + if (dym === "") return; + else { + const msg = await message.reply({ + embeds: [ + new MessageEmbed() + .setDescription(`Couldn't find that command.\n${dym}`) + .setTimestamp() + .setColor(client.color), + ], + }); + setTimeout(function () { + msg.delete(); + }, 10000); + } + } + if (command) { + if (command.Owner) { + if (!client.owners.includes(message.author.id)) return; + } + if (command.Premium) { + if (!data.User.Premium) { + return message.reply({ + embeds: [ + new MessageEmbed() + .setURL(client.web) + .setAuthor( + message.author.tag, + message.author.displayAvatarURL({ dynamic: true }) + ) + .setColor(client.color) + .setDescription( + `You aren't a premium user. You can either boost support server or subscribe to developer's team [Ko-fi](https://ko-fi.com/cathteam) or gift a nitro to one of the developer team to be premium user` + ) + .setTimestamp() + .setFooter(`Made by ${client.author}`), + ], + }); + } + } + if (command.Level) { + if (!data.Guild.Level) return; + } + if (!message.guild.me.permissions.has(command.BotPerm || [])) + return message.reply({ + content: `You can't use this command. I need to have ${command.BotPerm} permission to use this command.`, + }); + client.channels.cache.get(client.CMDLog).send({ + content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${command.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, + }); + if (data.Guild) { + if (data.Guild.Category) { + if (data.Guild.Category.includes(command.directory)) return; + } + if (data.Guild.Commands) { + if (data.Guild.Commands.includes(command.name)) return; + } + } + if (command.timeout) { + const current_time = Date.now(); + const cooldown_amount = command.timeout; + cooldown.findOne( + { User: message.author.id, CMD: command.name }, + async (err, data) => { + if (data) { + const expiration_time = data.Time + cooldown_amount; + if (current_time < expiration_time) { + utils.cooldown(data.Time, cooldown_amount, message); + } else { + await cooldown.findOneAndUpdate( + { User: message.author.id, CMD: command.name }, + { Time: current_time } + ); + command.run(client, message, args, utils, data, codmclient); + client.addcmdsused(message.author.id); + client.channels.cache.get(client.CMDLog).send({ + content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${command.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, + }); + } + } else { + command.run(client, message, args, utils, data, codmclient); + client.channels.cache.get(client.CMDLog).send({ + content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${command.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, + }); + client.addcmdsused(message.author.id); + new cooldown({ + User: message.author.id, + CMD: command.name, + Time: current_time, + Cooldown: command.timeout, + }).save(); + } + } + ); + } else { + try { + command.run(client, message, args, utils, data, codmclient); + client.channels.cache.get(client.CMDLog).send({ + content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${command.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, + }); + client.addcmdsused(message.author.id); + } catch (e) { + console.log(e); + } + } + } + } else { + if (cmddata.Delete === true && cmddata.Random === false) { + message + .delete() + .then(() => message.channel.send({ content: cmddata.Response })); + } else if (cmddata.Random === true && cmddata.Delete === true) { + const randomed = + cmddata.Response[Math.floor(Math.random() * cmddata.Response.length)]; + message.delete().then(() => message.channel.send({ content: randomed })); + } else if (cmddata.Random === true && cmddata.Delete === false) { + const randomed = + cmddata.Response[Math.floor(Math.random() * cmddata.Response.length)]; + message.channel.send({ content: randomed }); + } else { + message.channel.send({ content: cmddata.Response }); + } + } +}); +client.on("messageCreate", async message => { + const p = await client.prefix(message); + if (message.author.bot) return; + if (!message.content.startsWith(p)) return; + if (!message.guild) return; + if (!message.member) + message.member = await message.guild.fetchMember(message); + const [cmd, ...args] = message.content.slice(p.length).trim().split(/ +/g); + if (cmd.length == 0) return; + let path = client.hide.get(cmd); + if (path) { + if (!client.path.includes(message.guild.id)) return; + try { + path.run(client, message, args); + client.addcmdsused(message.author.id); + client.channels.cache.get(client.CMDLog).send({ + content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${path.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, + }); + } catch (e) { + console.log(e); + } + } +}); +client.on("messageCreate", async message => { + if (message.channel.type === "DM" && !message.author.bot) { + if (message.attachments) { + if (message.attachments && message.content) { + message.attachments.map(e => + client.channels.cache.get(client.DMLog).send({ + content: `\`${message.author.tag}(${message.author.id})\`: ${ + message.content + e.url + }`, + }) + ); + } else { + message.attachments.map(e => + client.channels.cache.get(client.DMLog).send({ + content: `\`${message.author.tag}(${message.author.id})\`: ${e.url}`, + }) + ); + } + } else { + client.channels.cache.get(client.DMLog).send({ + content: `\`${message.author.tag}(${message.author.id})\`: ${message.content}`, + }); + } + } +}); diff --git a/unused/models/custom-commands.js b/unused/models/custom-commands.js @@ -0,0 +1,11 @@ +const mongoose = require("mongoose"); +module.exports = mongoose.model( + "custom-commands", + new mongoose.Schema({ + Guild: String, + Command: String, + Response: Array, + Delete: Boolean, + Random: Boolean, + }) +); diff --git a/unused/models/modmail.js b/unused/models/modmail.js @@ -0,0 +1,11 @@ +const mongoose = require("mongoose"); + +module.exports = mongoose.model( + "modmail", + new mongoose.Schema({ + Guild: String, + Category: String, + Choices: Object, + Role: String, + }) +); diff --git a/unused/models/reaction.js b/unused/models/reaction.js @@ -0,0 +1,10 @@ +const mongoose = require("mongoose"); + +module.exports = mongoose.model( + "reaction-roles", + new mongoose.Schema({ + Guild: String, + Message: String, + Roles: Object, + }) +); diff --git a/util/Data/output.json b/util/Data/output.json @@ -0,0 +1 @@ +{"results":[{"Weapon":"AK-47","Valid":1,"ID":0,"Muzzle":"","Barrel":"MIP Extended Light Barrel","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"5.45 Large Caliber","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/772099026195316746/847174280823308308/image3.png?width=937&height=562","Last Updated":"June 23, 2021"},{"Weapon":"AK-47","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":1,"ID":0,"Muzzle":"","Barrel":"YKM Integral Supprssor","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"","Underbarrel":"Tactical Foregrip A","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063210239164416/Screenshot_20210620-110317.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"AK117","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":1,"ID":0,"Muzzle":"MIP Light Flash Guard","Barrel":"","Optic":"","Stock":"No Stock","Rear Grip":"","Ammunition":"40 Round Extended Mag","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"Slight of Hand","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/691133003866439701/861887618820472842/Screenshot_20210706-1353282.png","Last Updated":"July 6, 2021"},{"Weapon":"ASM10","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AS VAL","Valid":1,"ID":0,"Muzzle":"","Barrel":"MIP Quick Response Barrel","Optic":"","Stock":"OWC Skeleton Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"Extended Mag B","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"Aggressive","Short Description":"For CQB Situations","URL":"https://media.discordapp.net/attachments/540218400413188116/856063210528309258/Screenshot_20210620-110651.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"AS VAL","Valid":1,"ID":1,"Muzzle":"","Barrel":"MIP 200mm Mid-Range Barrel","Optic":"","Stock":"YKM Combat Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"Extended Mag B","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"Mid-Ranged","Short Description":"For Mid- Ranged Gunfights","URL":"https://media.discordapp.net/attachments/540218400413188116/856063211257200680/Screenshot_20210620-111341.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"AS VAL","Valid":1,"ID":2,"Muzzle":"","Barrel":"MIP Quick Response Barrel","Optic":"","Stock":"OWC Ranger Stock","Rear Grip":"Ruberized Grip Tape","Ammunition":"Extended Mag B","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"-","Short Description":"Zero Recoil, That's it.","URL":"https://media.discordapp.net/attachments/540218400413188116/856063210997284904/Screenshot_20210620-111321.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"AS VAL","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AS VAL","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AS VAL","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AS VAL","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AS VAL","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AS VAL","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AS VAL","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":1,"ID":0,"Muzzle":"MIP Light Muzzel Brake","Barrel":"MIP Light Barrel(Short)","Optic":"","Stock":"","Rear Grip":"Granulated Grip Tape","Ammunition":"40 Round Fast Reload","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063253745238016/Screenshot_20210620-111526.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"BK57","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":1,"ID":0,"Muzzle":"","Barrel":"","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"25 Round OTM Mag","Underbarrel":"Tactical Foregrip A","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063254002532362/Screenshot_20210620-111622.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"DR-H","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":1,"ID":0,"Muzzle":"","Barrel":"MIP Light","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"","Underbarrel":"Tactical Foregrip A","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063254270181396/Screenshot_20210620-111728.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"HBRa3","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":1,"ID":0,"Muzzle":"Monolithic Supprssor","Barrel":"MIP Light","Optic":"","Stock":"","Rear Grip":"Granulated Grip Tape","Ammunition":"Large Caliber Ammo","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://images-ext-2.discordapp.net/external/JSvyv8bccoWsPb5e8JnH1S_e5C1lKrcTJtZy5YMpSwY/%3Fwidth%3D937%26height%3D562/https/media.discordapp.net/attachments/772099026195316746/847174261705146458/image4.png","Last Updated":"June 23, 2021"},{"Weapon":"HVK-30","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":1,"ID":0,"Muzzle":"","Barrel":"YKM Integral Supprssor Light","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"40 Round Fast Reload","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063281622286346/Screenshot_20210620-113515.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"ICR-1","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":1,"ID":0,"Muzzle":"MIP Light Muzzel Brake","Barrel":"MIP Light Barrel(Short)","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063281978015744/Screenshot_20210620-113641.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"KN-44","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":1,"ID":0,"Muzzle":"","Barrel":"YKM Integral Suppressor Light","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"","Underbarrel":"Tactical Foregrip A","Laser":"OWC Laser-Tactical","Perk":"FMJ","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063282258509834/Screenshot_20210620-113830.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"LK24","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":1,"ID":0,"Muzzle":"","Barrel":"YKM Integral Suppressor Light","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"","Underbarrel":"Tactical Foregrip A","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063281360535582/Screenshot_20210620-114224.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"M4","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":1,"ID":0,"Muzzle":"OWC Light Compensator","Barrel":"","Optic":"Holographic Sight 2","Stock":"","Rear Grip":"Rubberized Grip Tape","Ammunition":"","Underbarrel":"Operator Foregrip","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://images-ext-1.discordapp.net/external/2cYevpZoxTuLufgwG63xrACTOLpEN-1yrf_fSyc-pdU/%3Fwidth%3D937%26height%3D562/https/media.discordapp.net/attachments/772099026195316746/847174281255190568/image4.png","Last Updated":"June 23, 2021"},{"Weapon":"M16","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":1,"ID":0,"Muzzle":"","Barrel":"MIP Light Barrel(Short)","Optic":"","Stock":"YKM Combat Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"25 Round Extended Mag","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://images-ext-2.discordapp.net/external/4jMUlyNOK5Rhd8ELwm9-pI8nZQFxs16jg6AxVEnGF7Y/%3Fwidth%3D937%26height%3D562/https/media.discordapp.net/attachments/772099026195316746/847174262841540658/image7.png","Last Updated":"June 23, 2021"},{"Weapon":"Man-O-War","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":1,"ID":0,"Muzzle":"","Barrel":"Taskforce Barrel","Optic":"","Stock":"Agile Stock","Rear Grip":"Firm Grip Tape","Ammunition":"Extended Mag A","Underbarrel":"Field Agent Foregrip","Laser":"","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/772099026195316746/847174260522090516/image2.png?width=937&height=562","Last Updated":"June 23, 2021"},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":1,"ID":0,"Muzzle":"","Barrel":"MIP Light Barrel(Short)","Optic":"","Stock":"YKM Light Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"Stopping Power Reload","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://images-ext-2.discordapp.net/external/frQJP-E_j3iL1NQsCvBhsaqeHu3Zt7iHxZNEh1d2YPE/%3Fwidth%3D937%26height%3D562/https/media.discordapp.net/attachments/772099026195316746/847174281698738216/image5.png","Last Updated":"June 23, 2021"},{"Weapon":"Type 25","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":1,"ID":0,"Muzzle":"","Barrel":"MIP Light Barrel(Short)","Optic":"","Stock":"RTC Steady Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"","Underbarrel":"Tactical Foregrip A","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://images-ext-2.discordapp.net/external/4quPh-O02WlvhpGSiMvD10Ojn9tvSWg1b7-Rehnh6MQ/%3Fwidth%3D937%26height%3D562/https/media.discordapp.net/attachments/772099026195316746/847174260052459540/image1.png","Last Updated":"June 23, 2021"},{"Weapon":"FR .556","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":1,"ID":0,"Muzzle":"MIP Light Flash Guard","Barrel":"","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"","Underbarrel":"","Laser":"MIP Laser 5mW","Perk":"Long Shot","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/691133003866439701/861891137254326272/brave_8pS8PhHl4P.png?width=1128&height=634","Last Updated":"July 6, 2021"},{"Weapon":"CR-56 AMAX","Valid":1,"ID":1,"Muzzle":"Monolithic Suppressor","Barrel":"MIP Custom Long","Optic":"","Stock":"No Stock","Rear Grip":"","Ammunition":"Extended Mag","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Jokesta","Title":"","Short Description":"","URL":"","Last Updated":"June 30, 2021"},{"Weapon":"CR-56 AMAX","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""}]} +\ No newline at end of file diff --git a/util/assets/fonts/Poppins-Regular.ttf b/util/assets/fonts/Poppins-Regular.ttf Binary files differ. diff --git a/util/assets/fonts/Poppins-SemiBold.ttf b/util/assets/fonts/Poppins-SemiBold.ttf Binary files differ. diff --git a/util/dist/cmds.js b/util/dist/cmds.js @@ -0,0 +1,39 @@ +const { readdirSync } = require("fs"); +const utils = require("../../util/functions/function"); +function cmds() { + let categories = []; + readdirSync("./commands").forEach(dir => { + const dirs = readdirSync(`./commands/${dir}`).filter(file => + file.endsWith(".js") + ); + let commands = []; + dirs.map(cmd => { + const file = require(`../../commands/${dir}/${cmd}`); + commands.push({ + name: file.name ? file.name : "No command name", + description: file.description + ? file.description + : "No command description", + aliases: file.aliases ? file.aliases : "No command aliases", + usage: file.usage ? `C.${file.name} ${file.usage}` : `C.${file.name}`, + timeout: file.timeout + ? utils.ms(file.timeout, { long: true }) + : "No command cooldown", + BotPermission: file.BotPerm + ? file.BotPerm + : "No required bot permission", + UserPermission: file.UserPerm + ? file.UserPerm + : "No required user permission", + status: file.status ? file.status : true, + }); + }); + let data = { + name: dir, + commands, + }; + categories.push(data); + }); + return categories; +} +module.exports = { cmds }; diff --git a/util/dist/err.js b/util/dist/err.js @@ -0,0 +1,224 @@ +const { MessageEmbed } = require("discord.js"); +const client = require("../../bot"); +/** + * @param {String} message + * @param {String} dir + * @param {String} file + * @param {String} err + */ +module.exports = async (message, dir, file, err) => { + switch (err) { + case 101: + err = "Invalid argument"; + break; + case 0: + err = "Missing argument"; + break; + case 1: + err = "Missing 'User' argument"; + break; + case 2: + err = "'User' argument can't be author"; + break; + case 3: + err = "Missing 'Role' argument"; + break; + case 4: + err = "Missing 'Message' argument"; + break; + case 5: + err = "Missing 'Number' argument"; + break; + case 6: + err = "Missing permission"; + break; + case 7: + err = "Invalid number"; + break; + case 8: + err = "User doesn't have enough hierarchy"; + break; + case 9: + err = "Bot doesn't have enough hierarchy"; + break; + case 10: + err = "There isn't any data"; + break; + case 11: + err = "Missing 'Emoji' argument"; + break; + case 12: + err = "Missing 'Text' argument"; + break; + case 13: + err = "'Text' argument must be less than or equal to 100"; + break; + case 14: + err = "The maximum of modmail choices is 5"; + break; + case 15: + err = "Emoji can't be found"; + break; + case 16: + err = "'Time' argument must be larger than 1 second"; + break; + case 17: + err = "Missing 'Command'/'Category' argument"; + break; + case 18: + err = "'Command'/'Category' is already disabled"; + break; + case 19: + err = "Missing 'Time' argument"; + break; + case 20: + err = "Insufficient balance"; + break; + case 21: + err = "Missing 'Item' argument"; + break; + case 22: + err = "Invalid Item"; + break; + case 23: + err = "You didn't have enough item to gift"; + break; + case 24: + err = "Item invalid or you don't have that item"; + break; + case 25: + err = "Inventory is empty"; + break; + case 26: + err = "Giveaway not found"; + break; + case 27: + err = "Missing 'Message ID' argument"; + break; + case 28: + err = "Missing 'Channel' argument"; + break; + case 29: + err = "'Time' argument is invalid"; + break; + case 30: + err = "Missing 'Winners' argument"; + break; + case 31: + err = "'Winner' argument must be a number"; + break; + case 32: + err = "Missing 'Prize' argument"; + break; + case 33: + err = "You cannot hug yourself"; + break; + case 34: + err = "There isn't any song playing in the server currently"; + break; + case 35: + err = "You must be in a voice channel"; + break; + case 36: + err = "The player has stopped and the queue has been cleared"; + break; + case 37: + err = "There is no queue"; + break; + case 38: + err = "Can't find the playlist at YouTube"; + break; + case 39: + err = "Can't join the voice channel"; + break; + case 40: + err = "Left the voice channel since there is no song at the queue"; + break; + case 41: + err = "I am not in a voice channel"; + break; + case 42: + err = "I can't find this song/video"; + break; + case 43: + err = "I can't find the song at SoundCloud"; + break; + case 44: + err = "I can't find the song at YouTube"; + break; + case 45: + err = "Invalid selection"; + break; + case 46: + err = "Missing 'Prefix' argument"; + break; + case 47: + err = "Missing 'Command' argument"; + break; + case 48: + err = "The attachment must be an image"; + break; + case 49: + err = "'Emoji' name must be more than 2 characters"; + break; + case 50: + err = + "The error maybe the link isn't a image, or the image size is too big"; + break; + case 51: + err = "Missing 'Query' argument"; + break; + case 52: + err = "This message doesn't exist in this channel"; + break; + case 53: + err = "Missing 'Code' argument"; + break; + case 54: + err = "'Text' argument must be less than or equal to 2000"; + break; + case 55: + err = "Different channel between user and client"; + break; + case 404: + err = "Error 404 - Not Found"; + break; + case 505: + err = "You have reached the maximum number of premium servers"; + break; + case 506: + err = "This server is already premium"; + break; + case 999: + err = "An unexpected error occured. Please try again."; + break; + default: + "Missing argument"; + break; + } + const pull = require(`../../commands/${dir}/${file}`); + let pre = await client.prefix(message); + let embed = new MessageEmbed() + .setAuthor( + `Error from ${message.author.tag}`, + message.author.displayAvatarURL({ dynamic: true }) + ) + .setColor("RED") + .setDescription( + `${require("../../config.json").ca}\nUse \`${pre}help ${ + pull.name + }\` to get help\n\n ` + ) + .addField( + `**>Usage**: ${pre}${pull.name} ${pull.usage ? pull.usage : ""}`, + `\`${err}\`` + ) + .setTimestamp() + .setThumbnail(client.user.displayAvatarURL({ dynamic: false })) + .setURL(client.web) + .setFooter(`Made by ${client.author}`); + const msg = await message.reply({ embeds: [embed] }); + setTimeout(function () { + msg.delete(); + }, 15000); +}; diff --git a/util/dist/handler.js b/util/dist/handler.js @@ -0,0 +1,82 @@ +const { glob } = require("glob"); +const { promisify } = require("util"); +const { Client } = require("discord.js"); +const globPromise = promisify(glob); +/** + * @param {Client} client + */ +module.exports = async client => { + const commands = await globPromise(`${process.cwd()}/commands/**/*.js`); + commands.map(value => { + if (!value.includes("Owner")) { + const file = require(value); + const splitted = value.split("/"); + const directory = splitted[splitted.length - 2]; + if (file.name) { + const properties = { directory, ...file }; + client.commands.set(file.name, properties); + } + } + }); + const events = await globPromise(`${process.cwd()}/events/*.js`); + events.map(value => require(value)); + const paths = await globPromise(`${process.cwd()}/cat/*.js`); + paths.map(value => { + const file = require(value); + const splitted = value.split("/"); + const directory = splitted[splitted.length - 2]; + if (file.name) { + const properties = { directory, ...file }; + client.hide.set(file.name, properties); + } + }); + const cmds = []; + const scommands = await globPromise(`${process.cwd()}/command/*/*.js`); + scommands.map(value => { + if (!value.includes("Owner")) { + const file = require(value); + const splitted = value.split("/"); + const directory = splitted[splitted.length - 2]; + if (file.name) { + const properties = { directory, ...file }; + client.slashCommands.set(file.name, properties); + } + if (["MESSAGE", "USER"].includes(file.type)) delete file.description; + if (file.userPerms) file.defaultPermission = false; + cmds.push(file); + } + }); + const ownercmds = []; + const owners = await globPromise(`${process.cwd()}/command/Owner/*.js`); + owners.map(value => { + const file = require(value); + client.hide.set(file.name, file); + if (["MESSAGE", "USER"].includes(file.type)) delete file.description; + if (file.userPerms) file.defaultPermission = false; + ownercmds.push(file); + }); + client.on("ready", async () => { + const g = client.guilds.cache.get("840225563193114624"); + await g.commands.set(ownercmds); + await client.application.commands.set(cmds).then(async cmd => { + const getroles = name => { + const perms = cmds.find(n => n.name == name).userPerms; + if (!perms) return null; + return g.roles.cache.filter( + z => z.permissions.has(perms) && !z.managed + ); + }; + const fullPermissions = cmd.reduce((accumulator, v) => { + const roles = getroles(v.name); + if (!roles) return accumulator; + const permissions = roles.reduce((a, w) => { + return [...a, { id: w.id, type: "ROLE", permission: true }]; + }, []); + return [...accumulator, { id: v.id, permissions }]; + }, []); + client.guilds.cache.forEach(g => + g.commands.permissions.set({ fullPermissions }) + ); + }); + }); +}; diff --git a/util/dist/item.js b/util/dist/item.js @@ -0,0 +1,68 @@ +module.exports = [ + { + item: "<:na45:840231919529623562> NA-45", + alias: "na45", + id: "na45", + price: 10000, + }, + { + item: "<:50gs:840231952045178892> Akimbo .50 GS", + alias: ".50gs", + id: ".50gs", + price: 10000, + }, + { + item: "<:mantaray:840231914747985941> Manta Ray", + alias: "mantaray", + id: "mantaray", + price: 50000, + }, + { + item: "<:zer0:840231945778626642> Zero", + alias: "zero", + id: "zero", + price: 50000, + }, + { + item: "<:artery:840231910575833118> Artery", + alias: "artery", + id: "artery", + price: 50000, + }, + { + item: "<:alias:840231973443338321> Alias", + alias: "alias", + id: "alias", + price: 50000, + }, + { + item: "<:urban:840231930741653545> Urban Tracker", + alias: "urban", + id: "urban", + price: 50000, + }, + { + item: "<:scylla:840231932289089556> Scylla", + alias: "scylla", + id: "scylla", + price: 50000, + }, + { + item: "<:parkk:840231975380975636> Park", + alias: "park", + id: "park", + price: 50000, + }, + { + item: "<:mara:840231965210968104> Mara", + alias: "mara", + id: "mara", + price: 50000, + }, + { + item: "<:outrider:840231986504794153> Outrider", + alias: "outrider", + id: "outrider", + price: 50000, + }, +]; diff --git a/util/dist/manager.js b/util/dist/manager.js @@ -0,0 +1,86 @@ +const { Manager } = require("erela.js"); +const Spotify = require("erela.js-spotify"); +const { MessageEmbed } = require("discord.js"); +module.exports = async client => { + try { + const id = process.env.SPOTIFY_ID; + const secret = process.env.SPOTIFY_SECRET; + client.manager = new Manager({ + plugins: [ + new Spotify({ + clientID: id, + clientSecret: secret, + }), + ], + nodes: [ + { + host: process.env.host, + port: Number(process.env.port), + password: process.env.password, + retryDelay: 5000, + }, + ], + autoPlay: true, + send: (id, payload) => { + const guild = client.guilds.cache.get(id); + if (guild) guild.shard.send(payload); + }, + }) + .on("nodeConnect", node => + console.log(`Node "${node.options.identifier}" has connected.`) + ) + .on("nodeError", (node, error) => + console.log( + `Node "${node.options.identifier}" encountered an error: ${error.message}.` + ) + ) + .on("trackStart", (player, track) => { + const channel = client.channels.cache.get(player.textChannel); + const embed = new MessageEmbed() + .setColor("02023a") + .setAuthor( + `Now Playing`, + client.user.displayAvatarURL({ + dynamic: true, + }) + ) + .setFooter(`Made by ${client.author}`) + .setTimestamp() + .setDescription(`[${track.title}](${track.uri})`) + .addField(`Requested By : `, `${track.requester}`, true); + channel.send({ embeds: [embed] }); + }) + .on("trackStuck", (player, track) => { + const channel = client.channels.cache.get(player.textChannel); + const embed = new MessageEmbed() + .setColor("02023a") + .setAuthor( + `Track Stuck`, + client.user.displayAvatarURL({ + dynamic: true, + }) + ) + .setDescription(`${track.title}`) + .setFooter(`Made by ${client.author}`) + .setTimestamp(); + channel.send({ embeds: [embed] }); + }) + .on("queueEnd", player => { + const channel = client.channels.cache.get(player.textChannel); + const embed2 = new MessageEmbed() + .setColor("02023a") + .setAuthor( + `Queue has ended`, + client.user.displayAvatarURL({ + dynamic: true, + }) + ) + .setFooter(`Made by ${client.author}`) + .setTimestamp(); + channel.send({ embeds: [embed2] }); + player.destroy(); + }); + } catch (e) { + console.log(e); + } +}; diff --git a/util/dist/npm.sh b/util/dist/npm.sh @@ -0,0 +1,4 @@ +npm i --save-dev node@16 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH +rm -rf node_modules && rm package-lock.json && npm cache clear --force && npm cache clean --force && npm i +npm run node-update && npm run node-clean +npm uninstall canvas && npm i canvas +\ No newline at end of file diff --git a/util/dist/slash.js b/util/dist/slash.js @@ -0,0 +1,224 @@ +const { MessageEmbed } = require("discord.js"); +const client = require("../../bot"); +/** + * @param {String} interaction + * @param {String} dir + * @param {String} file + * @param {String} err + */ +module.exports = async (interaction, dir, file, err) => { + switch (err) { + case 101: + err = "Invalid argument"; + break; + case 0: + err = "Missing argument"; + break; + case 1: + err = "Missing 'User' argument"; + break; + case 2: + err = "'User' argument can't be author"; + break; + case 3: + err = "Missing 'Role' argument"; + break; + case 4: + err = "Missing 'Message' argument"; + break; + case 5: + err = "Missing 'Number' argument"; + break; + case 6: + err = "Missing permission"; + break; + case 7: + err = "Invalid number"; + break; + case 8: + err = "User doesn't have enough hierarchy"; + break; + case 9: + err = "Bot doesn't have enough hierarchy"; + break; + case 10: + err = "There isn't any data"; + break; + case 11: + err = "Missing 'Emoji' argument"; + break; + case 12: + err = "Missing 'Text' argument"; + break; + case 13: + err = "'Text' argument must be less than or equal to 100"; + break; + case 14: + err = "The maximum of modmail choices is 5"; + break; + case 15: + err = "Emoji can't be found"; + break; + case 16: + err = "'Time' argument must be larger than 1 second"; + break; + case 17: + err = "Missing 'Command'/'Category' argument"; + break; + case 18: + err = "'Command'/'Category' is already disabled"; + break; + case 19: + err = "Missing 'Time' argument"; + break; + case 20: + err = "Insufficient balance"; + break; + case 21: + err = "Missing 'Item' argument"; + break; + case 22: + err = "Invalid Item"; + break; + case 23: + err = "You didn't have enough item to gift"; + break; + case 24: + err = "Item invalid or you don't have that item"; + break; + case 25: + err = "Inventory is empty"; + break; + case 26: + err = "Giveaway not found"; + break; + case 27: + err = "Missing 'Message ID' argument"; + break; + case 28: + err = "Missing 'Channel' argument"; + break; + case 29: + err = "'Time' argument is invalid"; + break; + case 30: + err = "Missing 'Winners' argument"; + break; + case 31: + err = "'Winner' argument must be a number"; + break; + case 32: + err = "Missing 'Prize' argument"; + break; + case 33: + err = "You cannot hug yourself"; + break; + case 34: + err = "There isn't any song playing in the server currently"; + break; + case 35: + err = "You must be in a voice channel"; + break; + case 36: + err = "The player has stopped and the queue has been cleared"; + break; + case 37: + err = "There is no queue"; + break; + case 38: + err = "Can't find the playlist at YouTube"; + break; + case 39: + err = "Can't join the voice channel"; + break; + case 40: + err = "Left the voice channel since there is no song at the queue"; + break; + case 41: + err = "I am not in a voice channel"; + break; + case 42: + err = "I can't find this song/video"; + break; + case 43: + err = "I can't find the song at SoundCloud"; + break; + case 44: + err = "I can't find the song at YouTube"; + break; + case 45: + err = "Invalid selection"; + break; + case 46: + err = "Missing 'Prefix' argument"; + break; + case 47: + err = "Missing 'Command' argument"; + break; + case 48: + err = "The attachment must be an image"; + break; + case 49: + err = "'Emoji' name must be more than 2 characters"; + break; + case 50: + err = + "The error maybe the link isn't a image, or the image size is too big"; + break; + case 51: + err = "Missing 'Query' argument"; + break; + case 52: + err = "This message doesn't exist in this channel"; + break; + case 53: + err = "Missing 'Code' argument"; + break; + case 54: + err = "'Text' argument must be less than or equal to 2000"; + break; + case 55: + err = "Different channel between user and client"; + break; + case 404: + err = "Error 404 - Not Found"; + break; + case 505: + err = "You have reached the maximum number of premium servers"; + break; + case 506: + err = "This server is already premium"; + break; + case 999: + err = "An unexpected error occured. Please try again."; + break; + default: + "Missing argument"; + break; + } + const pull = require(`../../command/${dir}/${file}`); + let pre = await client.prefix(interaction); + let embed = new MessageEmbed() + .setAuthor( + `Error from ${interaction.user.tag}`, + interaction.user.displayAvatarURL({ dynamic: true }) + ) + .setColor("RED") + .setDescription( + `${require("../../config.json").ca}\nUse \`${pre}help ${ + pull.name + }\` to get help\n\n ` + ) + .addField( + `**>Usage**: ${pre}${pull.name} ${pull.usage ? pull.usage : ""}`, + `\`${err}\`` + ) + .setTimestamp() + .setThumbnail(client.user.displayAvatarURL({ dynamic: false })) + .setURL(client.web) + .setFooter(`Made by ${client.author}`); + const msg = await interaction.followUp({ embeds: [embed] }); + setTimeout(function () { + msg.delete(); + }, 15000); +}; diff --git a/util/functions/economy.js b/util/functions/economy.js @@ -0,0 +1,248 @@ +module.exports = async (client, message) => { + const econ = require("../../models/econ"); + const user = require("../../models/users"); + client.createUser = id => { + user.findOne({ User: id }, (err, data) => { + new user({ + User: id, + }).save(); + }); + }; + client.createProfile = id => { + econ.findOne({ User: id }, (err, data) => { + new econ({ + User: id, + }).save(); + }); + }; + client.multi = interaction => + new Promise(async ful => { + var multiplier = 0; + const b = await user.findOne({ User: interaction.user.id }); + if (!b) { + client.createUser(interaction.user.id); + } + if (b) { + if (b.Tier == 3) { + multiplier += 0.1; + } + if (b.Tier == 2) { + multiplier += 0.15; + } + if (b.Tier == 1) { + multiplier += 0.2; + } + if (b.Premium === true) { + multiplier += 0.25; + } + } + if (client.path.includes(interaction.guild.id)) { + multiplier += 0.15; + } + if ( + [ + "🐱", + "😾", + "😿", + "😽", + "🙀", + "😼", + "😻", + "😹", + "😸", + "😺", + "cathexe", + "cath", + ] + .map(x => (interaction.channel.name.includes(x) ? 1 : 0)) + .filter(x => x).length + ) { + multiplier += 0.1; + } + + ful(Math.round(multiplier * 10)); + }); + + client.bal = id => + new Promise(async ful => { + const data = await econ.findOne({ User: id }); + if (!data) { + client.createProfile(id); + } + ful(data.CP); + }); + + client.add = (id, amount, interaction) => { + econ.findOne({ User: id }, async (err, data) => { + var multi = 0; + if (err) throw err; + if (data) { + const users = require("../../models/users"); + users.findOne({ User: id }, (err, b) => { + if (!b) { + client.createUser(id); + } + if (b) { + if (b.Tier == 3) { + multi += 0.1; + } + if (b.Tier == 2) { + multi += 0.15; + } + if (b.Tier === 1) { + multi += 0.2; + } + if (b.Premium === true) { + multi += 0.25; + } + } + if (client.path.includes(interaction.guild.id)) { + multi += 0.15; + } + if ( + [ + "🐱", + "😾", + "😿", + "😽", + "🙀", + "😼", + "😻", + "😹", + "😸", + "😺", + "cathexe", + "cath", + ] + .map(x => (interaction.channel.name.includes(x) ? 1 : 0)) + .filter(x => x).length + ) { + multi += 0.1; + } + if (multi === 0) { + data.CP += amount; + data.save(); + } else { + data.CP += Math.round(amount * multi + amount); + data.save(); + } + }); + } else { + client.createProfile(id); + } + }); + }; + client.rmv = (id, amount) => { + econ.findOne({ User: id }, async (err, data) => { + if (err) throw err; + if (data) { + data.CP -= amount; + data.save(); + } else { + client.createProfile(id); + } + }); + }; + client.addItem = (id, item, amount) => { + const economy = require("../../models/inventory"); + economy.findOne({ User: id }, (err, data) => { + if (!data) { + client.createProfile(id); + } else { + data[item] += amount; + data.save(); + } + }); + }; + client.removeItem = (id, item, amount) => { + const inventory = require("../../models/inventory"); + inventory.findOne({ User: id }, (err, data) => { + if (!data) { + client.createProfile(id); + } else { + data[item] -= amount; + data.save(); + } + }); + }; + client.addcmdsused = id => { + user.findOne({ User: id }, async (err, data) => { + if (err) console.log(err); + if (data) { + data.CommandUsed++; + data.save(); + } else { + client.createUser(id); + } + }); + }; + + client.ADDBJWin = id => { + econ.findOne({ User: id }, async (err, data) => { + if (err) throw err; + if (data) { + data.BJWins++; + data.save(); + } else { + client.createProfile(id); + } + }); + }; + client.ADDSWin = id => { + econ.findOne({ User: id }, async (err, data) => { + if (err) throw err; + if (data) { + data.SlotsWins++; + data.save(); + } else { + client.createProfile(id); + } + }); + }; + client.ADDBWin = id => { + econ.findOne({ User: id }, async (err, data) => { + if (err) throw err; + if (data) { + data.BetWins++; + data.save(); + } else { + client.createProfile(id); + } + }); + }; + client.cmdsUSED = id => + new Promise(async ful => { + const data = await user.findOne({ User: id }); + if (!data) { + client.createProfile(id); + } + ful(data.CommandUsed); + }); + + client.bjWin = id => + new Promise(async ful => { + const data = await econ.findOne({ User: id }); + if (!data) { + client.createProfile(id); + } + ful(data.BJWins); + }); + + client.sWin = id => + new Promise(async ful => { + const data = await econ.findOne({ User: id }); + if (!data) { + client.createProfile(id); + } + ful(data.SlotsWins); + }); + + client.bWin = id => + new Promise(async ful => { + const data = await econ.findOne({ User: id }); + if (!data) { + client.createProfile(id); + } + ful(data.BetWins); + }); +}; diff --git a/util/functions/function.js b/util/functions/function.js @@ -0,0 +1,366 @@ +const { MessageEmbed } = require("discord.js"); +function rndint(max, min) { + return Math.floor(Math.random() * (max - (min ? min : 0))) + (min ? min : 0); +} +function toBool() { + const num = Math.floor(Math.random() * 2); + return num === 1; +} +function timer(timestamp) { + const timeLeft = timestamp; + const days = Math.floor(timeLeft / 86400000); + const hours = Math.floor(timeLeft / 3600000) - days * 24; + const minutes = Math.floor(timeLeft / 60000) - days * 1440 - hours * 60; + const seconds = + Math.floor(timeLeft / 1000) - days * 86400 - hours * 3600 - minutes * 60; + const mseconds = timeLeft / 1000 - days * 86400 - hours * 3600 - minutes * 60; + let string = ""; + if (days) string = string + `${days} ${days == 1 ? "day " : "days "}`; + if (hours) string = string + `${hours} ${hours == 1 ? "hour " : "hours "}`; + if (minutes) + string = string + `${minutes} ${minutes == 1 ? "minute " : "minutes "}`; + if (seconds) + string = string + `${seconds} ${seconds == 1 ? "second " : "seconds "}`; + if (!string.length) string = `${mseconds.toFixed(1)} second`; + return string; +} +function sleep(ms) { + let start = new Date().getTime(); + let end = start; + while (end < start + ms) { + end = new Date().getTime(); + } +} +function toHHMMSS(str) { + var sec_num = parseInt(str, 10); + var hours = Math.floor(sec_num / 3600); + var minutes = Math.floor((sec_num - hours * 3600) / 60); + var seconds = sec_num - hours * 3600 - minutes * 60; + if (hours < 10) { + hours = "0" + hours; + } + if (minutes < 10) { + minutes = "0" + minutes; + } + if (seconds < 10) { + seconds = "0" + seconds; + } + return hours + ":" + minutes + ":" + seconds; +} +function fixPermissions(arr = Array) { + const permissions = { + ADMINISTRATOR: "Administrator", + VIEW_AUDIT_LOG: "View Audit Log", + VIEW_GUILD_INSIGHTS: "View Server Insights", + MANAGE_GUILD: "Manage Server", + MANAGE_ROLES: "Manage Roles", + MANAGE_CHANNELS: "Manage Channels", + KICK_MEMBERS: "Kick Members", + BAN_MEMBERS: "Ban Members", + CREATE_INSTANT_INVITE: "Create Invite", + CHANGE_NICKNAME: "Change Nickname", + MANAGE_NICKNAMES: "Manage Nicknames", + MANAGE_EMOJIS_AND_STICKERS: "Manage Emojis and Stickers", + MANAGE_WEBHOOKS: "Manage Webhooks", + VIEW_CHANNEL: "Read Text Channels & See Voice Channels", + SEND_MESSAGES: "Send Messages", + SEND_TTS_MESSAGES: "Send TTS Messages", + MANAGE_MESSAGES: "Manage Messages", + EMBED_LINKS: "Embed Links", + ATTACH_FILES: "Attach Files", + READ_MESSAGE_HISTORY: "Read Message History", + MENTION_EVERYONE: "Mention @everyone, @here, and All Roles", + USE_EXTERNAL_EMOJIS: "Use External Emojis", + ADD_REACTIONS: "Add Reactions", + CONNECT: "Connect", + SPEAK: "Speak", + STREAM: "Video", + MUTE_MEMBERS: "Mute Members", + DEAFEN_MEMBERS: "Deafen Members", + MOVE_MEMBERS: "Move Members", + USE_VAD: "Use Voice Activity", + PRIORITY_SPEAKER: "Priority Speaker", + REQUEST_TO_SPEAK: "Request to Speak", + MANAGE_THREADS: "Manage Threads", + USE_PUBLIC_THREADS: "Use Public Threads", + USE_PRIVATE_THREADS: "Use Private Threads", + USE_EXTERNAL_STICKERS: "Use External Stickers", + USE_APPLICATION_COMMANDS: "Use Application Commands", + }; + const final = []; + for (const perm in permissions) { + if (arr.includes(perm)) final.push(`✔️ ${permissions[perm]}`); + else final.push(`❌ ${permissions[perm]}`); + } + return `${`\`\`\`diff\n${final.join("\n")}\`\`\``}`; +} +function formatPerms(perm) { + return perm + .toLowerCase() + .replace(/(^|"|_)(\S)/g, s => s.toUpperCase()) + .replace(/_/g, " ") + .replace(/Guild/g, "Server") + .replace(/Use Vad/g, "Use Voice Acitvity"); +} +function trimArray(arr = []) { + if (arr.length > 10) { + const length = arr.length - 10; + arr = arr.slice(0, 10); + arr.push(`\n${length} more...`); + } + return arr.join(" **|** "); +} +function checkDays(date) { + let now = new Date(); + let diff = now.getTime() - date.getTime(); + let days = Math.floor(diff / 86400000); + return days + (days == 1 ? " day" : " days") + " ago"; +} +function format(str) { + return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase(); +} +function fixFeatures(arr = []) { + const all = { + ANIMATED_ICON: "Animated Icon", + BANNER: "Banner", + COMMERCE: "Commerce", + COMMUNITY: "Community", + DISCOVERABLE: "Discoverable", + FEATURABLE: "Featurable", + INVITE_SPLASH: "Invite Splash", + MEMBER_VERIFICATION_GATE_ENABLED: "Member Verification Gate Enabled", + NEWS: "News", + PARTNERED: "Partnered", + PREVIEW_ENABLED: "Preview Enabled", + VANITY_URL: "Vanity URL", + VERIFIED: "Verified", + VIP_REGIONS: "VIP Region", + WELCOME_SCREEN_ENABLED: "Welcome Screen Enabled", + TICKETED_EVENTS_ENABLED: "Ticketed Events Enabled", + MONETIZATION_ENABLED: "Monetization Enabled", + MORE_STICKERS: "More Stickers", + THREE_DAY_THREAD_ARCHIVE: "Three Day Thread Archive", + SEVEN_DAY_THREAD_ARCHIVE: "Seven Day Thread Archive", + PRIVATE_THREADS: "Private Threads,", + }; + const final = []; + for (const feature in all) { + if (arr.includes(feature)) final.push(`✅ ${all[feature]}`); + } + return `${final.join("\n")}`; +} +function cooldown(dbtime, defaults, msg) { + const expiration_time = dbtime + defaults; + const time_left = expiration_time - Date.now(); + const slow = [ + "Keep it slow...", + "Calm down", + "Stop it get some help", + "Too fast", + "Slow down little bit", + ]; + const slowed = slow[Math.floor(Math.random() * slow.length)]; + return msg.channel.send({ + embeds: [ + new MessageEmbed() + .setColor("RANDOM") + .setTimestamp() + .setTitle(slowed) + .setDescription( + `Wait **${timer( + time_left + )}** to use the command again!\nThe default cooldown is **${timer( + defaults + )}**` + ), + ], + }); +} +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var mn = d * 30; +var w = d * 7; +var y = d * 365.25; + +/** + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + */ + +function ms(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse(val); + } else if (type === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + "val is not a non-empty string or a valid number. val=" + + JSON.stringify(val) + ); +} + +/** + * @param {String} str + * @return {Number} + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = + /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|months?|mths|mn|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || "ms").toLowerCase(); + switch (type) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n * y; + case "month": + case "months": + case "mth": + case "mths": + return n * mn; + case "weeks": + case "week": + case "w": + return n * w; + case "days": + case "day": + case "d": + return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= mn) { + return Math.round(ms / mn) + "mo"; + } + if (msAbs >= w) { + return Math.round(ms / w) + "w"; + } + if (msAbs >= d) { + return Math.round(ms / d) + "d"; + } + if (msAbs >= h) { + return Math.round(ms / h) + "h"; + } + if (msAbs >= m) { + return Math.round(ms / m) + "m"; + } + if (msAbs >= s) { + return Math.round(ms / s) + "s"; + } + return ms + "ms"; +} + +/** + * @param {Number} ms + * @return {String} + */ + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= mn) { + return plural(ms, msAbs, mn, "month"); + } + if (msAbs >= w) { + return plural(ms, msAbs, w, "week"); + } + if (msAbs >= d) { + return plural(ms, msAbs, d, "day"); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, "hour"); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, "minute"); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, "second"); + } + return ms + " ms"; +} +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); +} +async function confirmation(message, author, validReactions, time = 60000) { + try { + for (const reaction of validReactions) await message.react(reaction); + const filter = (reaction, user) => + validReactions.includes(reaction.emoji.name) && user.id === author.id; + + return message + .awaitReactions({ filter, max: 1, time: time }) + .then(collected => collected.first() && collected.first().emoji.name); + } catch (e) { + console.log(e); + } +} +module.exports = { + rndint, + toBool, + timer, + sleep, + toHHMMSS, + fixPermissions, + trimArray, + formatPerms, + checkDays, + format, + fixFeatures, + cooldown, + ms, + confirmation, +}; diff --git a/util/functions/mongoose.js b/util/functions/mongoose.js @@ -0,0 +1,540 @@ +const mongoose = require("mongoose"); +const { GooseCache } = require("goosecache"); +const cachegoose = new GooseCache(mongoose, { + engine: "memory", +}); +mongoose.set("useFindAndModify", false); +const u = require("../../models/users"); +const g = require("../../models/guilds"); +const m = require("../../models/bot"); +const e = require("../../models/econ"); +module.exports = { + /** + * @param {String} URI - Mongo Connection URI + */ + async connect(URI) { + if (!URI) throw new Error("Please provide a Mongoose URI"); + return mongoose.connect(URI, { + useNewUrlParser: true, + useUnifiedTopology: true, + }); + }, + /** + * @param {String} ID - Guild ID + */ + async getGuild(ID) { + if (!ID) throw new Error("Guild ID?"); + const guild = await g.findOne({ Guild: ID }).lean().cache(120); + if (!guild) { + const gg = new g({ Guild: ID }); + const { + Guild, + Prefix, + Welcome, + Goodbye, + Log, + Premium, + Category, + Commands, + Level, + } = gg; + await gg.save().catch(error => console.log(error)); + return { + Guild, + Prefix, + Welcome, + Goodbye, + Log, + Premium, + Category, + Commands, + Level, + }; + } else { + const Guild = guild.Guild; + const Prefix = guild.Prefix; + const Welcome = guild.Welcome; + const Goodbye = guild.Goodbye; + const Log = guild.Log; + const Premium = guild.Premium; + const Category = guild.Category; + const Commands = guild.Commands; + const Level = guild.Level; + return { + Guild, + Prefix, + Welcome, + Goodbye, + Log, + Premium, + Category, + Commands, + Level, + }; + } + }, + /** + * @param {String} ID - User ID + */ + async getUser(ID) { + if (!ID) throw new Error("User ID?"); + const user = await u.findOne({ User: ID }).lean().cache(120); + if (!user) { + const ss = new u({ User: ID }); + const { + User, + AFK, + AFKDate, + Tier, + Premium, + Blacklist, + Blacklist_Reason, + PremiumServers, + CommandUsed, + } = ss; + await ss.save().catch(error => console.log(error)); + return { + User, + AFK, + AFKDate, + Tier, + Premium, + Blacklist, + Blacklist_Reason, + PremiumServers, + CommandUsed, + }; + } else { + const User = user.User; + const AFK = user.AFK; + const AFKDate = user.AFKDate; + const Tier = user.Tier; + const Premium = user.Premium; + const Blacklist = user.Blacklist; + const Blacklist_Reason = user.Blacklist_Reason; + const PremiumServers = user.PremiumServers; + const CommandUsed = user.CommandUsed; + return { + User, + AFK, + AFKDate, + Tier, + Premium, + Blacklist, + Blacklist_Reason, + PremiumServers, + CommandUsed, + }; + } + }, + /** + * @param {String} ID - User ID + */ + async getUserEcon(ID) { + if (!ID) throw new Error("User ID?"); + const user = await u.findOne({ User: ID }).lean().cache(120); + if (!user) { + const ss = new u({ User: ID }); + const { User, CP, BJWins, SlotsWins, BetWins } = ss; + await ss.save().catch(error => console.log(error)); + return { + User, + CP, + BJWins, + SlotsWins, + BetWins, + }; + } else { + const User = user.User; + const CP = user.CP; + const BJWins = user.BJWins; + const SlotsWins = user.SlotsWins; + const BetWins = user.BetWins; + return { + User, + CP, + BJWins, + SlotsWins, + BetWins, + }; + } + }, + /** + * @param {String} ID - User ID + * @param {String} Reason - AFK Reason + */ + async AFK(ID, Reason) { + if (!ID) throw new Error("User ID?"); + if (!Reason) throw new Error("AFK Reason?"); + const user = await u.findOne({ User: ID }); + if (!user) { + const sss = new u({ User: ID }); + await sss.save().catch(error => console.log(error)); + return { Reason, Time }; + } else { + user.User = ID; + user.AFK = Reason; + await user.save().catch(error => console.log(error)); + cachegoose.clearCache(); + return { Reason }; + } + }, + /** + * @param {String} ID - User ID + */ + async DelAFK(ID) { + if (!ID) throw new Error("User ID?"); + const user = await u.findOne({ User: ID }); + if (!user) { + const sssss = new u({ User: ID }); + await sssss.save().catch(error => console.log(error)); + return { ID }; + } else { + user.AFK = null; + user.AFKDate = null; + await user.save().catch(error => console.log(error)); + cachegoose.clearCache(); + return { ID }; + } + }, + /** + * @param {String} ID - ID of the User + * @param {String} Toggle - Blacklist Toggle(true/false) + * @param {String} Reason - Blacklist Reason + */ + async BK(ID, Toggle, Reason) { + if (!ID) throw new Error("User ID?"); + if (!Toggle) throw new Error("Blacklist Toggle?"); + if (!Reason) throw new Error("Blacklist Feason?"); + const user = await u.findOne({ User: ID }); + if (!user) { + const sus = new u({ User: ID }); + if (Toggle == "true") { + user.Blacklist = true; + user.Blacklist_Reason = Reason; + } else { + user.Blacklist = false; + user.Blacklist_Reason = null; + } + await sus.save().catch(error => console.log(error)); + cachegoose.clearCache(); + return { Reason }; + } else { + if (Toggle == "true") { + user.Blacklist = true; + user.Blacklist_Reason = Reason; + } else { + user.Blacklist = false; + user.Blacklist_Reason = null; + } + await user.save().catch(error => console.log(error)); + cachegoose.clearCache(); + return { Reason }; + } + }, + /** + * @param {String} ID - ID of the User + * @param {Boolean} Toggle - Premium Toggle(true/false) + * @param {Number} Tier - Tier + */ + async Premium(ID, Toggle, Tier) { + if (!ID) throw new Error("User ID?"); + if (!Toggle) throw new Error("Premium Toggle?"); + if (!Tier) throw new Error("Premium Feason?"); + const user = await u.findOne({ User: ID }); + if (!user) { + const sus = new u({ User: ID }); + if (Toggle == "true") { + user.Premium = true; + user.Tier = Tier; + } else { + user.Premium = false; + user.Tier = 0; + } + await sus.save().catch(error => console.log(error)); + cachegoose.clearCache(); + return { Tier }; + } else { + if (Toggle == "true") { + user.Premium = true; + user.Tier = Tier; + } else { + user.Premium = false; + user.Tier = 0; + } + await user.save().catch(error => console.log(error)); + cachegoose.clearCache(); + return { Tier }; + } + }, + /** + * @param {String} ID + */ + async CreateGuild(ID) { + await new g({ Guild: ID }); + return; + }, + /** + * @param {String} ID + */ + async CreateBot(ID) { + await new m({ Guild: ID }); + return; + }, + /** + * @param {String} ID - Guild ID + */ + async DelGuild(ID) { + await g.deleteMany({ Guild: ID }); + return; + }, + /** + * @param {String} ID - User ID + * @param {String} Prefix - Guild Prefix + */ + async setPrefix(ID, Prefix) { + if (!ID) throw new Error("Guild ID?"); + if (!Prefix) throw new Error("Prefix?"); + const guild = await g.findOne({ Guild: ID }); + if (!guild) { + const newU = new g({ Guild: ID }); + await newU.save().catch(error => console.log(error)); + return { Prefix }; + } + guild.Prefix = Prefix; + await guild.save().catch(error => console.log(error)); + cachegoose.clearCache(); + return { Prefix }; + }, + /** + * @param {String} ID - Guild ID + * @param {String} Channel - Welcome Channel + */ + async setWelcome(ID, Channel) { + if (!ID) throw new Error("Guild ID?"); + if (!Channel) throw new Error("Channel?"); + const guild = await g.findOne({ Guild: ID }); + if (!guild) { + const newU = new g({ Guild: ID }); + await newU.save().catch(error => console.log(error)); + return { Channel }; + } + guild.Welcome = Channel; + await guild.save().catch(error => console.log(error)); + cachegoose.clearCache(); + return { Channel }; + }, + /** + * @param {String} ID - Guild ID + * @param {String} Channel - Goodbye Channel + */ + async setGoodbye(ID, Channel) { + if (!ID) throw new Error("Guild ID?"); + if (!Channel) throw new Error("Channel?"); + const guild = await g.findOne({ Guild: ID }); + if (!guild) { + const newU = new g({ Guild: ID }); + await newU.save().catch(error => console.log(error)); + return { Channel }; + } + guild.Goodbye = Channel; + await guild.save().catch(error => console.log(error)); + cachegoose.clearCache(); + return { Channel }; + }, + /** + * @param {String} ID - Guild ID + * @param {String} Channel - Log Channel + * @param {String} WebhookID - WebhookID + * @param {String} WebhookToken - WebhookToken + */ + async setLog(ID, Channel, WID, WToken) { + if (!ID) throw new Error("Guild ID?"); + if (!Channel) throw new Error("Channel?"); + if (!WID) throw new Error("WebhookID?"); + if (!WToken) throw new Error("WebhookToken?"); + const guild = await g.findOne({ Guild: ID }); + if (!guild) { + const newU = new g({ Guild: ID }); + newU.LogChannel = Channel; + newU.LogWebhookID = WID; + newU.LogWebhookToken = WToken; + await newU.save().catch(error => console.log(error)); + return { Channel }; + } + guild.Log = Channel; + guild.LogWebhookID = WID; + guild.LogWebhookToken = WToken; + await guild.save().catch(error => console.log(error)); + cachegoose.clearCache(); + return { Channel }; + }, + /** + * @param {String} ID - Guild ID + * @param {String} Toggle - premium Toggle + */ + async setPremium(ID, Toggle) { + if (!ID) throw new Error("Please Provide a Guild ID"); + if (!Toggle) throw new Error("Please Provide a Toggle!"); + const guild = await g.findOne({ Guild: ID }); + if (!guild) { + const newU = new g({ Guild: ID }); + if (Toggle == "true") { + guild.Premium = true; + } else { + guild.Premium = false; + } + await newU.save().catch(error => console.log(error)); + return; + } else { + if (Toggle == "true") { + guild.Premium = true; + } else { + guild.Premium = false; + } + } + await guild.save().catch(error => console.log(error)); + cachegoose.clearCache(); + return; + }, + /** + * @param {String} User - User ID + * @param {String} ID - Guild ID + * @param {String} Method - Method + */ + async pushGuild(User, ID, method) { + if (!method) return new Error("Method?"); + u.findOne({ User: User }, async (err, data) => { + if (err) throw err; + if (!data) return new Error("User not found"); + if (method === "push") { + await data.PremiumServers.push(ID); + await data.save().catch(error => console.log(error)); + data.save(); + } + if (method === "splice") { + const index = data.PremiumServers.indexOf(ID); + data.PremiumServers.splice(index, 1); + data.save(); + } + cachegoose.clearCache(); + return { User }; + }); + }, + /** + * @param {String} ID - Guild ID + * @param {String} Type - Type + * @param {String} Name - Name + */ + async disable(ID, Type, Name) { + if (!Name) throw new Error("Name?"); + if (!Type) throw new Error("Type?"); + if (!ID) throw new Error("Guild ID?"); + if (Type === "category") { + const db = await g.findOne({ Guild: ID }); + if (!db) { + const newdoc = await new g({ Guild: ID }); + await newdoc.save().catch(error => console.log(error)); + } + await db.Category.push(Name); + await db.save().catch(e => console.log(e)); + } + if (Type === "command") { + const db = await g.findOne({ Guild: ID }); + if (!db) { + const newdoc = await new g({ Guild: ID }); + await newdoc.save().catch(error => console.log(error)); + } + await db.Commands.push(Name); + await db.save().catch(e => console.log(e)); + } + cachegoose.clearCache(); + return { Name }; + }, + /** + * @param {String} ID - Guild ID + * @param {String} Type - Type + * @param {String} Name - Name + */ + async enable(ID, Type, Name) { + if (!ID) throw new Error("Guild ID?"); + if (!Name) throw new Error("Name?"); + if (!Type) throw new Error("Type?"); + if (Type === "category") { + const db = await g.findOne({ Guild: ID }); + if (!db) { + return false; + } + const index = db.Category.indexOf(Name.toLowerCase()); + await db.Category.splice(index, 1); + await db.save().catch(e => console.log(e)); + } + if (Type === "command") { + const db = await g.findOne({ Guild: ID }); + if (!db) { + return false; + } + const index = db.Commands.indexOf(Name); + await db.Commands.splice(index, 1); + await db.save().catch(e => console.log(e)); + } + cachegoose.clearCache(); + return true; + }, + /** + * @param {String} ID - Bot ID + * @param {String} Toggle - Maintenance Toggle + */ + async maintenance(ID, Toggle) { + if (!ID) throw new Error("Please Provide a ID!"); + if (!Toggle) throw new Error("Please Provide a Toggle!"); + const idk = await m.findOne({ Bot: ID }); + if (!idk) { + const newdb = new m({ Bot: ID }); + if (Toggle === "true") { + newdb.Status = "true"; + } else { + newdb.Status = "false"; + } + await newdb.save().catch(error => console.log(error)); + return; + } else { + if (Toggle === "true") { + idk.Status = "true"; + } else { + idk.Status = "false"; + } + } + await idk.save().catch(error => console.log(error)); + cachegoose.clearCache(); + return; + }, + /** + * @param {String} ID - Guild ID + * @param {String} Toggle - Level Toggle + */ + async setGLevel(ID, Toggle) { + if (!ID) throw new Error("Please Provide a Guild ID"); + if (!Toggle) throw new Error("Please Provide a Toggle!"); + const guild = await g.findOne({ Guild: ID }); + if (!guild) { + const newU = new g({ Guild: ID }); + if (Toggle == "true") { + guild.Level = true; + } else { + guild.Level = false; + } + await newU.save().catch(error => console.log(error)); + return; + } else { + if (Toggle == "true") { + guild.Level = true; + } else { + guild.Level = false; + } + } + await guild.save().catch(error => console.log(error)); + cachegoose.clearCache(); + return; + }, +}; diff --git a/util/pagination/pagify.js b/util/pagination/pagify.js @@ -1,119 +0,0 @@ -const Discord = require('discord.js') - -async function pagify(client, message, options = {}) { - - if (!(message instanceof Discord.Message)) - throw new TypeError( - "First parameter must be a type of <discord.js>.Message" - ); - options = { - page: options.page, - type: ["message", "embed"].includes( - options.type && options.type.toString().toLowerCase() - ) - ? options.type - : "message", - messages: Array.isArray(options.messages) ? options.messages : [], - pages: options.pages || true - }; - if (!options.messages.length) - throw new TypeError("'options.messages' must have at least one element"); - if ( - options.type === "embed" && - !options.messages.every(m => m instanceof Discord.MessageEmbed) - ) - throw new TypeError( - "'options.type' were chosen as 'embed' but not every element of 'options.messages' were an instance of <discord.js>.MessageEmbed" - ); - let pages = 0, - reactions = - options.messages.length > 1 - ? ["⏪", "◀️", "#️⃣", "▶️", "⏩", "⏹️"] - : ["⏹️"], - mainMessage = await message.channel.send( - `${options.messages.length > 1 && options.pages === true - ? `[${pages + 1}/${options.messages.length}] ${"○" - .repeat(options.messages.length) - .replaceAt(pages, "●")}` - : "" - }`, - options.messages[pages] - ); - await Promise.all(reactions.map(r => mainMessage.react(r))); - let collector = mainMessage.createReactionCollector( - (reaction, user) => - reactions.some(r => r === reaction.emoji.name) && - user.id === message.author.id, - { - time: options.time - } - ); - collector.on("collect", async (reaction, user) => { - switch (reaction.emoji.name) { - case "⏪": - if (pages === 0) return; - pages = 0; - break; - case "◀️": - if (pages === 0) { - pages = options.messages.length - 1; - } else { - pages -= 1; - } - break; - case "⏹️": - for (let reaction of mainMessage.reactions.cache - .filter(r => r.users.cache.has(clinet.user.id)) - .array()) { - await reaction.users.remove(client.user.id); - } - return collector.stop(); - break; - case "▶️": - if (pages === options.messages.length - 1) { - pages = 0; - } else { - pages += 1; - } - break; - case "⏩": - if (pages === options.messages.length - 1) return; - pages = options.messages.length - 1; - break; - case "#️⃣": - let m = await message.channel.send("What page do you wish to go to?"); - let collected = await m.channel.awaitMessages( - response => message.content, - { - max: 1, - errors: ["time"] - } - ); - try { - m.delete(); - let content = parseInt(collected.first().content); - if (content && content > 0 && content <= options.messages.length) - pages = content - 1; - } catch (err) { - console.log(err.message); - m.delete(); - } - - break; - } - await mainMessage.edit( - `${options.messages.length > 1 && options.pages === true - ? `[${pages + 1}/${options.messages.length}] ${"○" - .repeat(options.messages.length) - .replaceAt(pages, "●")}` - : "" - }`, - options.type === "message" - ? options.messages[pages] - : { - embed: options.messages[pages] - } - ); - }) -} -module.exports = pagify -\ No newline at end of file diff --git a/util/pagination/pagination.js b/util/pagination/pagination.js @@ -1,5 +1,3 @@ -const { MessageEmbed, Permissions } = require("discord.js"); - module.exports = class Util { static chunk(arr, size) { const temp = []; @@ -15,37 +13,30 @@ module.exports = class Util { static async pagination(msg, author, contents, init = true, currPage = 0) { if (init) for (const emoji of this.paginationEmojis) await msg.react(emoji); - - const collector = msg.createReactionCollector( - (reaction, user) => { - return ( - this.paginationEmojis.includes(reaction.emoji.name) && - user.id === author.id - ); - }, - { - max: 1, - time: 90000, - } - ); - + const filter = (reaction, user) => { + return ( + this.paginationEmojis.includes(reaction.emoji.name) && + user.id === author.id + ); + }; + const collector = msg.createReactionCollector({ + filter, + max: 1, + time: 90000, + }); collector .on("collect", reaction => { reaction.users.remove(author); - const emoji = reaction.emoji.name; if (emoji === this.paginationEmojis[0]) currPage--; if (emoji === this.paginationEmojis[1]) return collector.stop(); if (emoji === this.paginationEmojis[2]) currPage++; currPage = ((currPage % contents.length) + contents.length) % contents.length; - const embed = msg.embeds[0] .setDescription(contents[currPage]) .setFooter(`Page ${currPage + 1} of ${contents.length}.`); - - msg.edit(embed); - + msg.edit({ embeds: [embed] }); this.pagination(msg, author, contents, false, currPage); }) .on("end", (_, reason) => {