├── .gitignore ├── LICENCE ├── README.md ├── assets ├── giveawayEnd.png ├── giveawayEnded.png ├── giveawayEnter.png ├── giveawayLeave.png ├── giveawayPause.png ├── giveawayReroll.png ├── giveawayStart.png └── giveawayWon.png ├── package-lock.json ├── package.json └── src ├── Commands ├── Giveaways │ └── giveaway.js └── Info │ ├── help.js │ └── ping.js ├── Events ├── Client │ └── ready.js └── Guild │ └── interactionCreate.js ├── GiveawaysEvents ├── Others │ ├── giveawayEnded.js │ └── giveawayRerolled.js └── Reactions │ ├── endedGiveawayReactionAdded.js │ ├── giveawayReactionAdded.js │ └── giveawayReactionRemoved.js ├── Schemas └── giveawaysSchema.js ├── Templates ├── commandTemplate.js └── eventTemplate.js ├── Util ├── commandHandler.js ├── eventsHandler.js ├── giveawaysEventsHandler.js └── giveawaysManager.js ├── config.js └── main.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Giveaway Bot 2 | #### Cool discord for giveaways on your discord server written in Discord.JS v14, discord-giveaways v6 and using custom handlers. Easy to setup. 3 | 4 | # Requirements 5 | - [Node.JS](https://nodejs.org) v16+ 6 | - [Computer](https://www.youtube.com/watch?v=dQw4w9WgXcQ) 7 | 8 | # Configuration 9 | - Download [CODE](https://github.com/BlobDeveloper/discord-giveaway-bot/archive/refs/heads/main.zip) 10 | - Open `config.js` file in `src` folder 11 | - Change things that are required 12 | - That's it, then open project in terminal and type 13 | ``` 14 | npm i && node . 15 | ``` 16 | 17 | # Links 18 | - 🔗 [Discord Developers Portal](https://discord.com/developers/) 19 | - 🔗 [MongoDB](https://mongodb.com/) 20 | 21 | # Features 22 | - Complete code ready to work properly 23 | - Bot uses MongoDB database to store data and not JSON 24 | - Free 25 | - Customizable 26 | - Latest Discord.JS version 27 | - Custom Handlers 28 | - Slash Commands 29 | - Giveaway events such as joining a contest, leaving a giveaway, winning a giveaway, etc. (The bot sends a private message about these events to the reaction member.) 30 | 31 | # Commands 32 | 33 | ### Info: 34 | - help 35 | - ping 36 | 37 | ### Giveaways: 38 | - start 39 | - pause 40 | - unpause 41 | - end 42 | - reroll 43 | - delete 44 | 45 | # Preview 46 | 47 | #### Start Giveaway 48 | ![](./assets//giveawayStart.png) 49 | 50 | #### Pause Giveaway 51 | ![](./assets/giveawayPause.png) 52 | 53 | #### End Giveaway 54 | ![](./assets/giveawayEnd.png) 55 | 56 | ### Reroll Giveaway 57 | ![](./assets/giveawayReroll.png) 58 | - And much more! 59 | 60 | # Events 61 | ### Enter Giveaway 62 | ![](./assets/giveawayEnter.png) 63 | 64 | ### Leave from Giveaway 65 | ![](./assets/giveawayLeave.png) 66 | 67 | ### Enter ended Giveaway 68 | ![](./assets/giveawayEnded.png) 69 | - And much more! 70 | 71 |
72 | If you like this project, support it with a star
73 |
74 | 75 | Did you find a bug?
76 | Please create an issue! https://github.com/BlobDeveloper/discord-giveaways-bot/issues 77 | -------------------------------------------------------------------------------- /assets/giveawayEnd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlobDeveloper/discord-giveaways-bot/4582e150a21bafb7369b0d0b7c791bc2a7cb25c5/assets/giveawayEnd.png -------------------------------------------------------------------------------- /assets/giveawayEnded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlobDeveloper/discord-giveaways-bot/4582e150a21bafb7369b0d0b7c791bc2a7cb25c5/assets/giveawayEnded.png -------------------------------------------------------------------------------- /assets/giveawayEnter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlobDeveloper/discord-giveaways-bot/4582e150a21bafb7369b0d0b7c791bc2a7cb25c5/assets/giveawayEnter.png -------------------------------------------------------------------------------- /assets/giveawayLeave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlobDeveloper/discord-giveaways-bot/4582e150a21bafb7369b0d0b7c791bc2a7cb25c5/assets/giveawayLeave.png -------------------------------------------------------------------------------- /assets/giveawayPause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlobDeveloper/discord-giveaways-bot/4582e150a21bafb7369b0d0b7c791bc2a7cb25c5/assets/giveawayPause.png -------------------------------------------------------------------------------- /assets/giveawayReroll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlobDeveloper/discord-giveaways-bot/4582e150a21bafb7369b0d0b7c791bc2a7cb25c5/assets/giveawayReroll.png -------------------------------------------------------------------------------- /assets/giveawayStart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlobDeveloper/discord-giveaways-bot/4582e150a21bafb7369b0d0b7c791bc2a7cb25c5/assets/giveawayStart.png -------------------------------------------------------------------------------- /assets/giveawayWon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlobDeveloper/discord-giveaways-bot/4582e150a21bafb7369b0d0b7c791bc2a7cb25c5/assets/giveawayWon.png -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "discord-giveaway-bot", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "discord-giveaway-bot", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "colors": "^1.4.0", 13 | "discord-giveaways": "^6.0.1", 14 | "discord.js": "^14.2.0", 15 | "mongoose": "^6.5.2", 16 | "ms": "^2.1.3" 17 | } 18 | }, 19 | "node_modules/@discordjs/builders": { 20 | "version": "1.1.0", 21 | "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.1.0.tgz", 22 | "integrity": "sha512-EO8TSltiIc9Z1wE854wAFvv5AccqEtvjFmao9PPoxQhRaJ0hEb7FwWRTCA1jGg4ZWI3hcp4m+RET5ufZQz3rOg==", 23 | "dependencies": { 24 | "@sapphire/shapeshift": "^3.5.1", 25 | "discord-api-types": "^0.36.3", 26 | "fast-deep-equal": "^3.1.3", 27 | "ts-mixer": "^6.0.1", 28 | "tslib": "^2.4.0" 29 | }, 30 | "engines": { 31 | "node": ">=16.9.0" 32 | } 33 | }, 34 | "node_modules/@discordjs/collection": { 35 | "version": "1.0.1", 36 | "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.1.tgz", 37 | "integrity": "sha512-5V/wswzR3r2RVYXLxxg4TvrAnBhVCNgHTXhC+OUtLoriJ072rPMHo+Iw1SS1vrCckp8Es40XM411+WkNRPaXFw==", 38 | "engines": { 39 | "node": ">=16.9.0" 40 | } 41 | }, 42 | "node_modules/@discordjs/rest": { 43 | "version": "1.0.1", 44 | "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.1.tgz", 45 | "integrity": "sha512-w08CTKVzzYYvKxEjXKOs9AdS7KQ1J502TrPfF8eCZ2lF6AfKuMP/32YgDakiwIyYTDjEQS/v0nKLSFcncHRMtg==", 46 | "dependencies": { 47 | "@discordjs/collection": "^1.0.1", 48 | "@sapphire/async-queue": "^1.3.2", 49 | "@sapphire/snowflake": "^3.2.2", 50 | "discord-api-types": "^0.36.3", 51 | "file-type": "^17.1.4", 52 | "tslib": "^2.4.0", 53 | "undici": "^5.8.0" 54 | }, 55 | "engines": { 56 | "node": ">=16.9.0" 57 | } 58 | }, 59 | "node_modules/@sapphire/async-queue": { 60 | "version": "1.5.0", 61 | "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz", 62 | "integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==", 63 | "engines": { 64 | "node": ">=v14.0.0", 65 | "npm": ">=7.0.0" 66 | } 67 | }, 68 | "node_modules/@sapphire/shapeshift": { 69 | "version": "3.5.1", 70 | "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.5.1.tgz", 71 | "integrity": "sha512-7JFsW5IglyOIUQI1eE0g6h06D/Far6HqpcowRScgCiLSqTf3hhkPWCWotVTtVycnDCMYIwPeaw6IEPBomKC8pA==", 72 | "dependencies": { 73 | "fast-deep-equal": "^3.1.3", 74 | "lodash.uniqwith": "^4.5.0" 75 | }, 76 | "engines": { 77 | "node": ">=v14.0.0", 78 | "npm": ">=7.0.0" 79 | } 80 | }, 81 | "node_modules/@sapphire/snowflake": { 82 | "version": "3.2.2", 83 | "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.2.2.tgz", 84 | "integrity": "sha512-ula2O0kpSZtX9rKXNeQMrHwNd7E4jPDJYUXmEGTFdMRfyfMw+FPyh04oKMjAiDuOi64bYgVkOV3MjK+loImFhQ==", 85 | "engines": { 86 | "node": ">=v14.0.0", 87 | "npm": ">=7.0.0" 88 | } 89 | }, 90 | "node_modules/@tokenizer/token": { 91 | "version": "0.3.0", 92 | "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", 93 | "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" 94 | }, 95 | "node_modules/@types/node": { 96 | "version": "18.7.6", 97 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.6.tgz", 98 | "integrity": "sha512-EdxgKRXgYsNITy5mjjXjVE/CS8YENSdhiagGrLqjG0pvA2owgJ6i4l7wy/PFZGC0B1/H20lWKN7ONVDNYDZm7A==" 99 | }, 100 | "node_modules/@types/webidl-conversions": { 101 | "version": "6.1.1", 102 | "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz", 103 | "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==" 104 | }, 105 | "node_modules/@types/whatwg-url": { 106 | "version": "8.2.2", 107 | "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", 108 | "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", 109 | "dependencies": { 110 | "@types/node": "*", 111 | "@types/webidl-conversions": "*" 112 | } 113 | }, 114 | "node_modules/@types/ws": { 115 | "version": "8.5.3", 116 | "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", 117 | "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", 118 | "dependencies": { 119 | "@types/node": "*" 120 | } 121 | }, 122 | "node_modules/base64-js": { 123 | "version": "1.5.1", 124 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 125 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", 126 | "funding": [ 127 | { 128 | "type": "github", 129 | "url": "https://github.com/sponsors/feross" 130 | }, 131 | { 132 | "type": "patreon", 133 | "url": "https://www.patreon.com/feross" 134 | }, 135 | { 136 | "type": "consulting", 137 | "url": "https://feross.org/support" 138 | } 139 | ] 140 | }, 141 | "node_modules/bson": { 142 | "version": "4.6.5", 143 | "resolved": "https://registry.npmjs.org/bson/-/bson-4.6.5.tgz", 144 | "integrity": "sha512-uqrgcjyOaZsHfz7ea8zLRCLe1u+QGUSzMZmvXqO24CDW7DWoW1qiN9folSwa7hSneTSgM2ykDIzF5kcQQ8cwNw==", 145 | "dependencies": { 146 | "buffer": "^5.6.0" 147 | }, 148 | "engines": { 149 | "node": ">=6.9.0" 150 | } 151 | }, 152 | "node_modules/buffer": { 153 | "version": "5.7.1", 154 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", 155 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", 156 | "funding": [ 157 | { 158 | "type": "github", 159 | "url": "https://github.com/sponsors/feross" 160 | }, 161 | { 162 | "type": "patreon", 163 | "url": "https://www.patreon.com/feross" 164 | }, 165 | { 166 | "type": "consulting", 167 | "url": "https://feross.org/support" 168 | } 169 | ], 170 | "dependencies": { 171 | "base64-js": "^1.3.1", 172 | "ieee754": "^1.1.13" 173 | } 174 | }, 175 | "node_modules/colors": { 176 | "version": "1.4.0", 177 | "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", 178 | "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", 179 | "engines": { 180 | "node": ">=0.1.90" 181 | } 182 | }, 183 | "node_modules/debug": { 184 | "version": "4.3.4", 185 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 186 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 187 | "dependencies": { 188 | "ms": "2.1.2" 189 | }, 190 | "engines": { 191 | "node": ">=6.0" 192 | }, 193 | "peerDependenciesMeta": { 194 | "supports-color": { 195 | "optional": true 196 | } 197 | } 198 | }, 199 | "node_modules/debug/node_modules/ms": { 200 | "version": "2.1.2", 201 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 202 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 203 | }, 204 | "node_modules/deepmerge-ts": { 205 | "version": "4.2.1", 206 | "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-4.2.1.tgz", 207 | "integrity": "sha512-xzJLiUo4z1dD2nggSfaMvHo5qWLoy/JVa9rKuktC6FrQQEBI8Qnj7KwuCYZhqBoGOOpGqs6+3MR2ZhSMcTr4BA==", 208 | "engines": { 209 | "node": ">=12.4.0" 210 | } 211 | }, 212 | "node_modules/denque": { 213 | "version": "2.1.0", 214 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", 215 | "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", 216 | "engines": { 217 | "node": ">=0.10" 218 | } 219 | }, 220 | "node_modules/discord-api-types": { 221 | "version": "0.36.3", 222 | "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", 223 | "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" 224 | }, 225 | "node_modules/discord-giveaways": { 226 | "version": "6.0.1", 227 | "resolved": "https://registry.npmjs.org/discord-giveaways/-/discord-giveaways-6.0.1.tgz", 228 | "integrity": "sha512-hs6Vtb62VdlV7NfB93Phaxc8FW0cH4N1Nkb0bXVZ2npgn73yGOFVmdp8bBP5gsC2ady9OAXXI8Gb66t1IddkFw==", 229 | "dependencies": { 230 | "deepmerge-ts": "^4.2.1", 231 | "serialize-javascript": "^6.0.0" 232 | }, 233 | "engines": { 234 | "node": ">=16.9.0" 235 | }, 236 | "peerDependencies": { 237 | "discord.js": ">=14.0.0" 238 | } 239 | }, 240 | "node_modules/discord.js": { 241 | "version": "14.2.0", 242 | "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.2.0.tgz", 243 | "integrity": "sha512-kIGhEeOB1d9k7whL9HCCuRuzK2GL7i/hTesYINOZ2szWm4TOsBVwRU+i9O/zDb2M+Gvff4SJ4EpAtCVV0okgVw==", 244 | "dependencies": { 245 | "@discordjs/builders": "^1.1.0", 246 | "@discordjs/collection": "^1.0.1", 247 | "@discordjs/rest": "^1.0.1", 248 | "@sapphire/snowflake": "^3.2.2", 249 | "@types/ws": "^8.5.3", 250 | "discord-api-types": "^0.36.3", 251 | "fast-deep-equal": "^3.1.3", 252 | "lodash.snakecase": "^4.1.1", 253 | "tslib": "^2.4.0", 254 | "undici": "^5.8.2", 255 | "ws": "^8.8.1" 256 | }, 257 | "engines": { 258 | "node": ">=16.9.0" 259 | } 260 | }, 261 | "node_modules/fast-deep-equal": { 262 | "version": "3.1.3", 263 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 264 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" 265 | }, 266 | "node_modules/file-type": { 267 | "version": "17.1.6", 268 | "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.6.tgz", 269 | "integrity": "sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw==", 270 | "dependencies": { 271 | "readable-web-to-node-stream": "^3.0.2", 272 | "strtok3": "^7.0.0-alpha.9", 273 | "token-types": "^5.0.0-alpha.2" 274 | }, 275 | "engines": { 276 | "node": "^12.20.0 || ^14.13.1 || >=16.0.0" 277 | }, 278 | "funding": { 279 | "url": "https://github.com/sindresorhus/file-type?sponsor=1" 280 | } 281 | }, 282 | "node_modules/ieee754": { 283 | "version": "1.2.1", 284 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 285 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", 286 | "funding": [ 287 | { 288 | "type": "github", 289 | "url": "https://github.com/sponsors/feross" 290 | }, 291 | { 292 | "type": "patreon", 293 | "url": "https://www.patreon.com/feross" 294 | }, 295 | { 296 | "type": "consulting", 297 | "url": "https://feross.org/support" 298 | } 299 | ] 300 | }, 301 | "node_modules/inherits": { 302 | "version": "2.0.4", 303 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 304 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 305 | }, 306 | "node_modules/ip": { 307 | "version": "2.0.0", 308 | "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", 309 | "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" 310 | }, 311 | "node_modules/kareem": { 312 | "version": "2.4.1", 313 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.4.1.tgz", 314 | "integrity": "sha512-aJ9opVoXroQUPfovYP5kaj2lM7Jn02Gw13bL0lg9v0V7SaUc0qavPs0Eue7d2DcC3NjqI6QAUElXNsuZSeM+EA==" 315 | }, 316 | "node_modules/lodash.snakecase": { 317 | "version": "4.1.1", 318 | "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", 319 | "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" 320 | }, 321 | "node_modules/lodash.uniqwith": { 322 | "version": "4.5.0", 323 | "resolved": "https://registry.npmjs.org/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz", 324 | "integrity": "sha512-7lYL8bLopMoy4CTICbxygAUq6CdRJ36vFc80DucPueUee+d5NBRxz3FdT9Pes/HEx5mPoT9jwnsEJWz1N7uq7Q==" 325 | }, 326 | "node_modules/memory-pager": { 327 | "version": "1.5.0", 328 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", 329 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", 330 | "optional": true 331 | }, 332 | "node_modules/mongodb": { 333 | "version": "4.8.1", 334 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.8.1.tgz", 335 | "integrity": "sha512-/NyiM3Ox9AwP5zrfT9TXjRKDJbXlLaUDQ9Rg//2lbg8D2A8GXV0VidYYnA/gfdK6uwbnL4FnAflH7FbGw3TS7w==", 336 | "dependencies": { 337 | "bson": "^4.6.5", 338 | "denque": "^2.0.1", 339 | "mongodb-connection-string-url": "^2.5.2", 340 | "socks": "^2.6.2" 341 | }, 342 | "engines": { 343 | "node": ">=12.9.0" 344 | }, 345 | "optionalDependencies": { 346 | "saslprep": "^1.0.3" 347 | } 348 | }, 349 | "node_modules/mongodb-connection-string-url": { 350 | "version": "2.5.3", 351 | "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.3.tgz", 352 | "integrity": "sha512-f+/WsED+xF4B74l3k9V/XkTVj5/fxFH2o5ToKXd8Iyi5UhM+sO9u0Ape17Mvl/GkZaFtM0HQnzAG5OTmhKw+tQ==", 353 | "dependencies": { 354 | "@types/whatwg-url": "^8.2.1", 355 | "whatwg-url": "^11.0.0" 356 | } 357 | }, 358 | "node_modules/mongoose": { 359 | "version": "6.5.2", 360 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.5.2.tgz", 361 | "integrity": "sha512-3CFDrSLtK2qjM1pZeZpLTUyqPRkc11Iuh74ZrwS4IwEJ3K2PqGnmyPLw7ex4Kzu37ujIMp3MAuiBlUjfrcb6hw==", 362 | "dependencies": { 363 | "bson": "^4.6.5", 364 | "kareem": "2.4.1", 365 | "mongodb": "4.8.1", 366 | "mpath": "0.9.0", 367 | "mquery": "4.0.3", 368 | "ms": "2.1.3", 369 | "sift": "16.0.0" 370 | }, 371 | "engines": { 372 | "node": ">=12.0.0" 373 | }, 374 | "funding": { 375 | "type": "opencollective", 376 | "url": "https://opencollective.com/mongoose" 377 | } 378 | }, 379 | "node_modules/mpath": { 380 | "version": "0.9.0", 381 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", 382 | "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", 383 | "engines": { 384 | "node": ">=4.0.0" 385 | } 386 | }, 387 | "node_modules/mquery": { 388 | "version": "4.0.3", 389 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.3.tgz", 390 | "integrity": "sha512-J5heI+P08I6VJ2Ky3+33IpCdAvlYGTSUjwTPxkAr8i8EoduPMBX2OY/wa3IKZIQl7MU4SbFk8ndgSKyB/cl1zA==", 391 | "dependencies": { 392 | "debug": "4.x" 393 | }, 394 | "engines": { 395 | "node": ">=12.0.0" 396 | } 397 | }, 398 | "node_modules/ms": { 399 | "version": "2.1.3", 400 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 401 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 402 | }, 403 | "node_modules/peek-readable": { 404 | "version": "5.0.0", 405 | "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", 406 | "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==", 407 | "engines": { 408 | "node": ">=14.16" 409 | }, 410 | "funding": { 411 | "type": "github", 412 | "url": "https://github.com/sponsors/Borewit" 413 | } 414 | }, 415 | "node_modules/punycode": { 416 | "version": "2.1.1", 417 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 418 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 419 | "engines": { 420 | "node": ">=6" 421 | } 422 | }, 423 | "node_modules/randombytes": { 424 | "version": "2.1.0", 425 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 426 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 427 | "dependencies": { 428 | "safe-buffer": "^5.1.0" 429 | } 430 | }, 431 | "node_modules/readable-stream": { 432 | "version": "3.6.0", 433 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 434 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 435 | "dependencies": { 436 | "inherits": "^2.0.3", 437 | "string_decoder": "^1.1.1", 438 | "util-deprecate": "^1.0.1" 439 | }, 440 | "engines": { 441 | "node": ">= 6" 442 | } 443 | }, 444 | "node_modules/readable-web-to-node-stream": { 445 | "version": "3.0.2", 446 | "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz", 447 | "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==", 448 | "dependencies": { 449 | "readable-stream": "^3.6.0" 450 | }, 451 | "engines": { 452 | "node": ">=8" 453 | }, 454 | "funding": { 455 | "type": "github", 456 | "url": "https://github.com/sponsors/Borewit" 457 | } 458 | }, 459 | "node_modules/safe-buffer": { 460 | "version": "5.2.1", 461 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 462 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 463 | "funding": [ 464 | { 465 | "type": "github", 466 | "url": "https://github.com/sponsors/feross" 467 | }, 468 | { 469 | "type": "patreon", 470 | "url": "https://www.patreon.com/feross" 471 | }, 472 | { 473 | "type": "consulting", 474 | "url": "https://feross.org/support" 475 | } 476 | ] 477 | }, 478 | "node_modules/saslprep": { 479 | "version": "1.0.3", 480 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", 481 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", 482 | "optional": true, 483 | "dependencies": { 484 | "sparse-bitfield": "^3.0.3" 485 | }, 486 | "engines": { 487 | "node": ">=6" 488 | } 489 | }, 490 | "node_modules/serialize-javascript": { 491 | "version": "6.0.0", 492 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", 493 | "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", 494 | "dependencies": { 495 | "randombytes": "^2.1.0" 496 | } 497 | }, 498 | "node_modules/sift": { 499 | "version": "16.0.0", 500 | "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.0.tgz", 501 | "integrity": "sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ==" 502 | }, 503 | "node_modules/smart-buffer": { 504 | "version": "4.2.0", 505 | "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", 506 | "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", 507 | "engines": { 508 | "node": ">= 6.0.0", 509 | "npm": ">= 3.0.0" 510 | } 511 | }, 512 | "node_modules/socks": { 513 | "version": "2.7.0", 514 | "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz", 515 | "integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==", 516 | "dependencies": { 517 | "ip": "^2.0.0", 518 | "smart-buffer": "^4.2.0" 519 | }, 520 | "engines": { 521 | "node": ">= 10.13.0", 522 | "npm": ">= 3.0.0" 523 | } 524 | }, 525 | "node_modules/sparse-bitfield": { 526 | "version": "3.0.3", 527 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", 528 | "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", 529 | "optional": true, 530 | "dependencies": { 531 | "memory-pager": "^1.0.2" 532 | } 533 | }, 534 | "node_modules/string_decoder": { 535 | "version": "1.3.0", 536 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", 537 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", 538 | "dependencies": { 539 | "safe-buffer": "~5.2.0" 540 | } 541 | }, 542 | "node_modules/strtok3": { 543 | "version": "7.0.0", 544 | "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", 545 | "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==", 546 | "dependencies": { 547 | "@tokenizer/token": "^0.3.0", 548 | "peek-readable": "^5.0.0" 549 | }, 550 | "engines": { 551 | "node": ">=14.16" 552 | }, 553 | "funding": { 554 | "type": "github", 555 | "url": "https://github.com/sponsors/Borewit" 556 | } 557 | }, 558 | "node_modules/token-types": { 559 | "version": "5.0.1", 560 | "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", 561 | "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", 562 | "dependencies": { 563 | "@tokenizer/token": "^0.3.0", 564 | "ieee754": "^1.2.1" 565 | }, 566 | "engines": { 567 | "node": ">=14.16" 568 | }, 569 | "funding": { 570 | "type": "github", 571 | "url": "https://github.com/sponsors/Borewit" 572 | } 573 | }, 574 | "node_modules/tr46": { 575 | "version": "3.0.0", 576 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", 577 | "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", 578 | "dependencies": { 579 | "punycode": "^2.1.1" 580 | }, 581 | "engines": { 582 | "node": ">=12" 583 | } 584 | }, 585 | "node_modules/ts-mixer": { 586 | "version": "6.0.1", 587 | "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz", 588 | "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg==" 589 | }, 590 | "node_modules/tslib": { 591 | "version": "2.4.0", 592 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", 593 | "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" 594 | }, 595 | "node_modules/undici": { 596 | "version": "5.8.2", 597 | "resolved": "https://registry.npmjs.org/undici/-/undici-5.8.2.tgz", 598 | "integrity": "sha512-3KLq3pXMS0Y4IELV045fTxqz04Nk9Ms7yfBBHum3yxsTR4XNn+ZCaUbf/mWitgYDAhsplQ0B1G4S5D345lMO3A==", 599 | "engines": { 600 | "node": ">=12.18" 601 | } 602 | }, 603 | "node_modules/util-deprecate": { 604 | "version": "1.0.2", 605 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 606 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" 607 | }, 608 | "node_modules/webidl-conversions": { 609 | "version": "7.0.0", 610 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", 611 | "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", 612 | "engines": { 613 | "node": ">=12" 614 | } 615 | }, 616 | "node_modules/whatwg-url": { 617 | "version": "11.0.0", 618 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", 619 | "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", 620 | "dependencies": { 621 | "tr46": "^3.0.0", 622 | "webidl-conversions": "^7.0.0" 623 | }, 624 | "engines": { 625 | "node": ">=12" 626 | } 627 | }, 628 | "node_modules/ws": { 629 | "version": "8.8.1", 630 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", 631 | "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", 632 | "engines": { 633 | "node": ">=10.0.0" 634 | }, 635 | "peerDependencies": { 636 | "bufferutil": "^4.0.1", 637 | "utf-8-validate": "^5.0.2" 638 | }, 639 | "peerDependenciesMeta": { 640 | "bufferutil": { 641 | "optional": true 642 | }, 643 | "utf-8-validate": { 644 | "optional": true 645 | } 646 | } 647 | } 648 | }, 649 | "dependencies": { 650 | "@discordjs/builders": { 651 | "version": "1.1.0", 652 | "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.1.0.tgz", 653 | "integrity": "sha512-EO8TSltiIc9Z1wE854wAFvv5AccqEtvjFmao9PPoxQhRaJ0hEb7FwWRTCA1jGg4ZWI3hcp4m+RET5ufZQz3rOg==", 654 | "requires": { 655 | "@sapphire/shapeshift": "^3.5.1", 656 | "discord-api-types": "^0.36.3", 657 | "fast-deep-equal": "^3.1.3", 658 | "ts-mixer": "^6.0.1", 659 | "tslib": "^2.4.0" 660 | } 661 | }, 662 | "@discordjs/collection": { 663 | "version": "1.0.1", 664 | "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.1.tgz", 665 | "integrity": "sha512-5V/wswzR3r2RVYXLxxg4TvrAnBhVCNgHTXhC+OUtLoriJ072rPMHo+Iw1SS1vrCckp8Es40XM411+WkNRPaXFw==" 666 | }, 667 | "@discordjs/rest": { 668 | "version": "1.0.1", 669 | "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.1.tgz", 670 | "integrity": "sha512-w08CTKVzzYYvKxEjXKOs9AdS7KQ1J502TrPfF8eCZ2lF6AfKuMP/32YgDakiwIyYTDjEQS/v0nKLSFcncHRMtg==", 671 | "requires": { 672 | "@discordjs/collection": "^1.0.1", 673 | "@sapphire/async-queue": "^1.3.2", 674 | "@sapphire/snowflake": "^3.2.2", 675 | "discord-api-types": "^0.36.3", 676 | "file-type": "^17.1.4", 677 | "tslib": "^2.4.0", 678 | "undici": "^5.8.0" 679 | } 680 | }, 681 | "@sapphire/async-queue": { 682 | "version": "1.5.0", 683 | "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz", 684 | "integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==" 685 | }, 686 | "@sapphire/shapeshift": { 687 | "version": "3.5.1", 688 | "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.5.1.tgz", 689 | "integrity": "sha512-7JFsW5IglyOIUQI1eE0g6h06D/Far6HqpcowRScgCiLSqTf3hhkPWCWotVTtVycnDCMYIwPeaw6IEPBomKC8pA==", 690 | "requires": { 691 | "fast-deep-equal": "^3.1.3", 692 | "lodash.uniqwith": "^4.5.0" 693 | } 694 | }, 695 | "@sapphire/snowflake": { 696 | "version": "3.2.2", 697 | "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.2.2.tgz", 698 | "integrity": "sha512-ula2O0kpSZtX9rKXNeQMrHwNd7E4jPDJYUXmEGTFdMRfyfMw+FPyh04oKMjAiDuOi64bYgVkOV3MjK+loImFhQ==" 699 | }, 700 | "@tokenizer/token": { 701 | "version": "0.3.0", 702 | "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", 703 | "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" 704 | }, 705 | "@types/node": { 706 | "version": "18.7.6", 707 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.6.tgz", 708 | "integrity": "sha512-EdxgKRXgYsNITy5mjjXjVE/CS8YENSdhiagGrLqjG0pvA2owgJ6i4l7wy/PFZGC0B1/H20lWKN7ONVDNYDZm7A==" 709 | }, 710 | "@types/webidl-conversions": { 711 | "version": "6.1.1", 712 | "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz", 713 | "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==" 714 | }, 715 | "@types/whatwg-url": { 716 | "version": "8.2.2", 717 | "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", 718 | "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", 719 | "requires": { 720 | "@types/node": "*", 721 | "@types/webidl-conversions": "*" 722 | } 723 | }, 724 | "@types/ws": { 725 | "version": "8.5.3", 726 | "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", 727 | "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", 728 | "requires": { 729 | "@types/node": "*" 730 | } 731 | }, 732 | "base64-js": { 733 | "version": "1.5.1", 734 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 735 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" 736 | }, 737 | "bson": { 738 | "version": "4.6.5", 739 | "resolved": "https://registry.npmjs.org/bson/-/bson-4.6.5.tgz", 740 | "integrity": "sha512-uqrgcjyOaZsHfz7ea8zLRCLe1u+QGUSzMZmvXqO24CDW7DWoW1qiN9folSwa7hSneTSgM2ykDIzF5kcQQ8cwNw==", 741 | "requires": { 742 | "buffer": "^5.6.0" 743 | } 744 | }, 745 | "buffer": { 746 | "version": "5.7.1", 747 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", 748 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", 749 | "requires": { 750 | "base64-js": "^1.3.1", 751 | "ieee754": "^1.1.13" 752 | } 753 | }, 754 | "colors": { 755 | "version": "1.4.0", 756 | "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", 757 | "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" 758 | }, 759 | "debug": { 760 | "version": "4.3.4", 761 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 762 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 763 | "requires": { 764 | "ms": "2.1.2" 765 | }, 766 | "dependencies": { 767 | "ms": { 768 | "version": "2.1.2", 769 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 770 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 771 | } 772 | } 773 | }, 774 | "deepmerge-ts": { 775 | "version": "4.2.1", 776 | "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-4.2.1.tgz", 777 | "integrity": "sha512-xzJLiUo4z1dD2nggSfaMvHo5qWLoy/JVa9rKuktC6FrQQEBI8Qnj7KwuCYZhqBoGOOpGqs6+3MR2ZhSMcTr4BA==" 778 | }, 779 | "denque": { 780 | "version": "2.1.0", 781 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", 782 | "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==" 783 | }, 784 | "discord-api-types": { 785 | "version": "0.36.3", 786 | "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", 787 | "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" 788 | }, 789 | "discord-giveaways": { 790 | "version": "6.0.1", 791 | "resolved": "https://registry.npmjs.org/discord-giveaways/-/discord-giveaways-6.0.1.tgz", 792 | "integrity": "sha512-hs6Vtb62VdlV7NfB93Phaxc8FW0cH4N1Nkb0bXVZ2npgn73yGOFVmdp8bBP5gsC2ady9OAXXI8Gb66t1IddkFw==", 793 | "requires": { 794 | "deepmerge-ts": "^4.2.1", 795 | "serialize-javascript": "^6.0.0" 796 | } 797 | }, 798 | "discord.js": { 799 | "version": "14.2.0", 800 | "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.2.0.tgz", 801 | "integrity": "sha512-kIGhEeOB1d9k7whL9HCCuRuzK2GL7i/hTesYINOZ2szWm4TOsBVwRU+i9O/zDb2M+Gvff4SJ4EpAtCVV0okgVw==", 802 | "requires": { 803 | "@discordjs/builders": "^1.1.0", 804 | "@discordjs/collection": "^1.0.1", 805 | "@discordjs/rest": "^1.0.1", 806 | "@sapphire/snowflake": "^3.2.2", 807 | "@types/ws": "^8.5.3", 808 | "discord-api-types": "^0.36.3", 809 | "fast-deep-equal": "^3.1.3", 810 | "lodash.snakecase": "^4.1.1", 811 | "tslib": "^2.4.0", 812 | "undici": "^5.8.2", 813 | "ws": "^8.8.1" 814 | } 815 | }, 816 | "fast-deep-equal": { 817 | "version": "3.1.3", 818 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 819 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" 820 | }, 821 | "file-type": { 822 | "version": "17.1.6", 823 | "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.6.tgz", 824 | "integrity": "sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw==", 825 | "requires": { 826 | "readable-web-to-node-stream": "^3.0.2", 827 | "strtok3": "^7.0.0-alpha.9", 828 | "token-types": "^5.0.0-alpha.2" 829 | } 830 | }, 831 | "ieee754": { 832 | "version": "1.2.1", 833 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 834 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" 835 | }, 836 | "inherits": { 837 | "version": "2.0.4", 838 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 839 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 840 | }, 841 | "ip": { 842 | "version": "2.0.0", 843 | "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", 844 | "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" 845 | }, 846 | "kareem": { 847 | "version": "2.4.1", 848 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.4.1.tgz", 849 | "integrity": "sha512-aJ9opVoXroQUPfovYP5kaj2lM7Jn02Gw13bL0lg9v0V7SaUc0qavPs0Eue7d2DcC3NjqI6QAUElXNsuZSeM+EA==" 850 | }, 851 | "lodash.snakecase": { 852 | "version": "4.1.1", 853 | "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", 854 | "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" 855 | }, 856 | "lodash.uniqwith": { 857 | "version": "4.5.0", 858 | "resolved": "https://registry.npmjs.org/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz", 859 | "integrity": "sha512-7lYL8bLopMoy4CTICbxygAUq6CdRJ36vFc80DucPueUee+d5NBRxz3FdT9Pes/HEx5mPoT9jwnsEJWz1N7uq7Q==" 860 | }, 861 | "memory-pager": { 862 | "version": "1.5.0", 863 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", 864 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", 865 | "optional": true 866 | }, 867 | "mongodb": { 868 | "version": "4.8.1", 869 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.8.1.tgz", 870 | "integrity": "sha512-/NyiM3Ox9AwP5zrfT9TXjRKDJbXlLaUDQ9Rg//2lbg8D2A8GXV0VidYYnA/gfdK6uwbnL4FnAflH7FbGw3TS7w==", 871 | "requires": { 872 | "bson": "^4.6.5", 873 | "denque": "^2.0.1", 874 | "mongodb-connection-string-url": "^2.5.2", 875 | "saslprep": "^1.0.3", 876 | "socks": "^2.6.2" 877 | } 878 | }, 879 | "mongodb-connection-string-url": { 880 | "version": "2.5.3", 881 | "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.3.tgz", 882 | "integrity": "sha512-f+/WsED+xF4B74l3k9V/XkTVj5/fxFH2o5ToKXd8Iyi5UhM+sO9u0Ape17Mvl/GkZaFtM0HQnzAG5OTmhKw+tQ==", 883 | "requires": { 884 | "@types/whatwg-url": "^8.2.1", 885 | "whatwg-url": "^11.0.0" 886 | } 887 | }, 888 | "mongoose": { 889 | "version": "6.5.2", 890 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.5.2.tgz", 891 | "integrity": "sha512-3CFDrSLtK2qjM1pZeZpLTUyqPRkc11Iuh74ZrwS4IwEJ3K2PqGnmyPLw7ex4Kzu37ujIMp3MAuiBlUjfrcb6hw==", 892 | "requires": { 893 | "bson": "^4.6.5", 894 | "kareem": "2.4.1", 895 | "mongodb": "4.8.1", 896 | "mpath": "0.9.0", 897 | "mquery": "4.0.3", 898 | "ms": "2.1.3", 899 | "sift": "16.0.0" 900 | } 901 | }, 902 | "mpath": { 903 | "version": "0.9.0", 904 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", 905 | "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==" 906 | }, 907 | "mquery": { 908 | "version": "4.0.3", 909 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.3.tgz", 910 | "integrity": "sha512-J5heI+P08I6VJ2Ky3+33IpCdAvlYGTSUjwTPxkAr8i8EoduPMBX2OY/wa3IKZIQl7MU4SbFk8ndgSKyB/cl1zA==", 911 | "requires": { 912 | "debug": "4.x" 913 | } 914 | }, 915 | "ms": { 916 | "version": "2.1.3", 917 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 918 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 919 | }, 920 | "peek-readable": { 921 | "version": "5.0.0", 922 | "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", 923 | "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==" 924 | }, 925 | "punycode": { 926 | "version": "2.1.1", 927 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 928 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" 929 | }, 930 | "randombytes": { 931 | "version": "2.1.0", 932 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 933 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 934 | "requires": { 935 | "safe-buffer": "^5.1.0" 936 | } 937 | }, 938 | "readable-stream": { 939 | "version": "3.6.0", 940 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 941 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 942 | "requires": { 943 | "inherits": "^2.0.3", 944 | "string_decoder": "^1.1.1", 945 | "util-deprecate": "^1.0.1" 946 | } 947 | }, 948 | "readable-web-to-node-stream": { 949 | "version": "3.0.2", 950 | "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz", 951 | "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==", 952 | "requires": { 953 | "readable-stream": "^3.6.0" 954 | } 955 | }, 956 | "safe-buffer": { 957 | "version": "5.2.1", 958 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 959 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" 960 | }, 961 | "saslprep": { 962 | "version": "1.0.3", 963 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", 964 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", 965 | "optional": true, 966 | "requires": { 967 | "sparse-bitfield": "^3.0.3" 968 | } 969 | }, 970 | "serialize-javascript": { 971 | "version": "6.0.0", 972 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", 973 | "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", 974 | "requires": { 975 | "randombytes": "^2.1.0" 976 | } 977 | }, 978 | "sift": { 979 | "version": "16.0.0", 980 | "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.0.tgz", 981 | "integrity": "sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ==" 982 | }, 983 | "smart-buffer": { 984 | "version": "4.2.0", 985 | "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", 986 | "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" 987 | }, 988 | "socks": { 989 | "version": "2.7.0", 990 | "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz", 991 | "integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==", 992 | "requires": { 993 | "ip": "^2.0.0", 994 | "smart-buffer": "^4.2.0" 995 | } 996 | }, 997 | "sparse-bitfield": { 998 | "version": "3.0.3", 999 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", 1000 | "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", 1001 | "optional": true, 1002 | "requires": { 1003 | "memory-pager": "^1.0.2" 1004 | } 1005 | }, 1006 | "string_decoder": { 1007 | "version": "1.3.0", 1008 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", 1009 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", 1010 | "requires": { 1011 | "safe-buffer": "~5.2.0" 1012 | } 1013 | }, 1014 | "strtok3": { 1015 | "version": "7.0.0", 1016 | "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", 1017 | "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==", 1018 | "requires": { 1019 | "@tokenizer/token": "^0.3.0", 1020 | "peek-readable": "^5.0.0" 1021 | } 1022 | }, 1023 | "token-types": { 1024 | "version": "5.0.1", 1025 | "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", 1026 | "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", 1027 | "requires": { 1028 | "@tokenizer/token": "^0.3.0", 1029 | "ieee754": "^1.2.1" 1030 | } 1031 | }, 1032 | "tr46": { 1033 | "version": "3.0.0", 1034 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", 1035 | "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", 1036 | "requires": { 1037 | "punycode": "^2.1.1" 1038 | } 1039 | }, 1040 | "ts-mixer": { 1041 | "version": "6.0.1", 1042 | "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz", 1043 | "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg==" 1044 | }, 1045 | "tslib": { 1046 | "version": "2.4.0", 1047 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", 1048 | "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" 1049 | }, 1050 | "undici": { 1051 | "version": "5.8.2", 1052 | "resolved": "https://registry.npmjs.org/undici/-/undici-5.8.2.tgz", 1053 | "integrity": "sha512-3KLq3pXMS0Y4IELV045fTxqz04Nk9Ms7yfBBHum3yxsTR4XNn+ZCaUbf/mWitgYDAhsplQ0B1G4S5D345lMO3A==" 1054 | }, 1055 | "util-deprecate": { 1056 | "version": "1.0.2", 1057 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1058 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" 1059 | }, 1060 | "webidl-conversions": { 1061 | "version": "7.0.0", 1062 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", 1063 | "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" 1064 | }, 1065 | "whatwg-url": { 1066 | "version": "11.0.0", 1067 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", 1068 | "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", 1069 | "requires": { 1070 | "tr46": "^3.0.0", 1071 | "webidl-conversions": "^7.0.0" 1072 | } 1073 | }, 1074 | "ws": { 1075 | "version": "8.8.1", 1076 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", 1077 | "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", 1078 | "requires": {} 1079 | } 1080 | } 1081 | } 1082 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "discord-giveaway-bot", 3 | "version": "1.0.0", 4 | "description": "Cool discord bot for giveaways on your discord server written in Discord.JS v14, discord-giveaways v6 and using custom handlers.", 5 | "main": "./src/main.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/BlobDeveloper/discord-giveaways-bot.git" 12 | }, 13 | "keywords": [ 14 | "discord", 15 | "discordjs", 16 | "discord-giveaway-bot", 17 | "discord-giveaway", 18 | "giveawaybot", 19 | "giveaways" 20 | ], 21 | "author": "BlobDev#2388", 22 | "license": "ISC", 23 | "bugs": { 24 | "url": "https://github.com/BlobDeveloper/discord-giveaways-bot/issues" 25 | }, 26 | "homepage": "https://github.com/BlobDeveloper/discord-giveaways-bot#readme", 27 | "dependencies": { 28 | "colors": "^1.4.0", 29 | "discord-giveaways": "^6.0.1", 30 | "discord.js": "^14.2.0", 31 | "mongoose": "^6.5.2", 32 | "ms": "^2.1.3" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Commands/Giveaways/giveaway.js: -------------------------------------------------------------------------------- 1 | const { Client, ChatInputCommandInteraction, ApplicationCommandOptionType, ChannelType, EmbedBuilder } = require('discord.js'); 2 | const ms = require('ms'); 3 | 4 | module.exports = { 5 | name: 'giveaway', 6 | description: '⚙ Giveaways system', 7 | options: [ 8 | { 9 | name: 'start', 10 | description: '🎉 Starts a giveaway', 11 | type: ApplicationCommandOptionType.Subcommand, 12 | options: [ 13 | { name: 'length', description: 'Enter the length of the giveaway', type: ApplicationCommandOptionType.String, required: true }, 14 | { name: 'prize', description: 'Set a prize to win', type: ApplicationCommandOptionType.String, required: true }, 15 | { name: 'winners', description: 'Enter the number of winners', type: ApplicationCommandOptionType.Number, required: true }, 16 | { name: 'channel', description: 'Specify the channel where to send the giveaway', type: ApplicationCommandOptionType.Channel, channel_types: [ChannelType.GuildText], required: false } 17 | ] 18 | }, 19 | { 20 | name: 'pause', 21 | description: '⏸️ Pauses the giveaway', 22 | type: ApplicationCommandOptionType.Subcommand, 23 | options: [ 24 | { name: 'message-id', description: 'Specify giveaway message id', type: ApplicationCommandOptionType.String, required: true } 25 | ] 26 | }, 27 | { 28 | name: 'unpause', 29 | description: '⏯️ Unpauses the giveaway', 30 | type: ApplicationCommandOptionType.Subcommand, 31 | options: [ 32 | { name: 'message-id', description: 'Specify giveaway message id', type: ApplicationCommandOptionType.String, required: true } 33 | ] 34 | }, 35 | { 36 | name: 'end', 37 | description: '⏹️ Ends the giveaway', 38 | type: ApplicationCommandOptionType.Subcommand, 39 | options: [ 40 | { name: 'message-id', description: 'Specify giveaway message id', type: ApplicationCommandOptionType.String, required: true } 41 | ] 42 | }, 43 | { 44 | name: 'reroll', 45 | description: '🔃 Selects a new giveaway winner', 46 | type: ApplicationCommandOptionType.Subcommand, 47 | options: [ 48 | { name: 'message-id', description: 'Specify giveaway message id', type: ApplicationCommandOptionType.String, required: true } 49 | ] 50 | }, 51 | { 52 | name: 'delete', 53 | description: '🚮 Deletes the giveaway', 54 | type: ApplicationCommandOptionType.Subcommand, 55 | options: [ 56 | { name: 'message-id', description: 'Specify giveaway message id', type: ApplicationCommandOptionType.String, required: true } 57 | ] 58 | }, 59 | ], 60 | giveawayManagerOnly: true, 61 | /** 62 | * 63 | * @param {ChatInputCommandInteraction} interaction 64 | * @param {Client} client 65 | */ 66 | async execute(interaction, client) { 67 | const sub = interaction.options.getSubcommand(); 68 | 69 | const errorEmbed = new EmbedBuilder().setColor('Red'); 70 | const successEmbed = new EmbedBuilder().setColor('Green'); 71 | 72 | if(sub === 'start') { 73 | const gchannel = interaction.options.getChannel('channel') || interaction.channel; 74 | const duration = interaction.options.getString('length'); 75 | const winnerCount = interaction.options.getNumber('winners'); 76 | const prize = interaction.options.getString('prize'); 77 | if(isNaN(ms(duration))) { 78 | errorEmbed.setDescription('❌ | Enter the correct giveaway length format! `1d, 1h, 1m, 1s`'); 79 | return interaction.reply({ embeds: [errorEmbed], ephemeral: true }); 80 | } 81 | 82 | return client.giveawaysManager.start(gchannel, { 83 | duration: ms(duration), 84 | winnerCount, 85 | prize, 86 | messages: client.config.messages 87 | }).then(async () => { 88 | if(client.config.giveawayManager.everyoneMention) { 89 | const msg = await gchannel.send({ content: '@everyone' }); 90 | msg.delete(); 91 | } 92 | successEmbed.setDescription(`✅ | Giveaway started in ${gchannel}!`) 93 | return interaction.reply({ embeds: [successEmbed], ephemeral: true }); 94 | }).catch((err) => { 95 | console.log(err); 96 | errorEmbed.setDescription(`❌ | Error \n\`${err}\``); 97 | return interaction.reply({ embeds: [errorEmbed], ephemeral: true }); 98 | }); 99 | } 100 | 101 | const messageid = interaction.options.getString('message-id'); 102 | const giveaway = client.giveawaysManager.giveaways.find((g) => g.guildId === interaction.guildId && g.messageId === messageid); 103 | if (!giveaway) { 104 | errorEmbed.setDescription(`❌ | Giveaway with ID ${messageid} was not found in the database!`); 105 | return interaction.reply({ embeds: [errorEmbed], ephemeral: true }); 106 | } 107 | 108 | if(sub === 'pause') { 109 | if(giveaway.isPaused) { 110 | errorEmbed.setDescription('❌ | This giveaway is already paused!') 111 | } 112 | await client.giveawaysManager.pause(interaction.options.getString('message-id'), { 113 | content: client.config.messages.paused, 114 | infiniteDurationText: client.config.messages.infiniteDurationText 115 | }).then(() => { 116 | successEmbed.setDescription('⏸️ | The giveaway has been paused!'); 117 | return interaction.reply({ embeds: [successEmbed], ephemeral: true }); 118 | }).catch((err) => { 119 | errorEmbed.setDescription(`❌ | Error \n\`${err}\``); 120 | return interaction.reply({ embeds: [errorEmbed], ephemeral: true }); 121 | }); 122 | } 123 | 124 | if(sub === 'unpause') { 125 | await client.giveawaysManager.unpause(interaction.options.getString('message-id')).then(() => { 126 | successEmbed.setDescription('▶️ | The giveaway has been paused!'); 127 | return interaction.reply({ embeds: [successEmbed], ephemeral: true }); 128 | }).catch((err) => { 129 | errorEmbed.setDescription(`❌ | Error \n\`${err}\``); 130 | return interaction.reply({ embeds: [errorEmbed], ephemeral: true }); 131 | }); 132 | } 133 | 134 | if(sub === 'end') { 135 | await client.giveawaysManager.end(interaction.options.getString('message-id')).then(() => { 136 | successEmbed.setDescription('⏹️ | The giveaway has been stopped!'); 137 | return interaction.reply({ embeds: [successEmbed], ephemeral: true }); 138 | }).catch((err) => { 139 | errorEmbed.setDescription(`❌ | Error \n\`${err}\``); 140 | return interaction.reply({ embeds: [errorEmbed], ephemeral: true }); 141 | }); 142 | } 143 | 144 | if(sub === 'reroll') { 145 | await client.giveawaysManager.reroll(interaction.options.getString('message-id'), { 146 | messages: { 147 | congrat: client.config.messages.congrat, 148 | error: client.config.messages.error 149 | } 150 | }).then(() => { 151 | successEmbed.setDescription('🎉 | The giveaway has a new winner!'); 152 | return interaction.reply({ embeds: [successEmbed], ephemeral: true }); 153 | }).catch((err) => { 154 | errorEmbed.setDescription(`❌ | Error \n\`${err}\``); 155 | return interaction.reply({ embeds: [errorEmbed], ephemeral: true }); 156 | }); 157 | } 158 | 159 | if(sub === 'delete') { 160 | await client.giveawaysManager.delete(interaction.options.getString('message-id')).then(() => { 161 | successEmbed.setDescription('🚮 | The giveaway has been deleted!'); 162 | return interaction.reply({ embeds: [successEmbed], ephemeral: true }); 163 | }).catch((err) => { 164 | errorEmbed.setDescription(`❌ | Error \n\`${err}\``); 165 | return interaction.reply({ embeds: [errorEmbed], ephemeral: true }); 166 | }); 167 | } 168 | } 169 | } -------------------------------------------------------------------------------- /src/Commands/Info/help.js: -------------------------------------------------------------------------------- 1 | const { Client, ChatInputCommandInteraction, EmbedBuilder } = require('discord.js'); 2 | 3 | module.exports = { 4 | name: 'help', 5 | description: '🗒️ Help menu', 6 | /** 7 | * 8 | * @param {ChatInputCommandInteraction} interaction 9 | * @param {Client} client 10 | */ 11 | execute(interaction, client) { 12 | const embed = new EmbedBuilder() 13 | .setColor('DarkRed') 14 | .setThumbnail('https://images.emojiterra.com/twitter/v13.1/512px/1f4cb.png') 15 | .setTitle('Help Menu') 16 | .setDescription(`> You can find all the commands here.\n> In total there are **\`8\`** commands.\nThe source code for this bot is available on [GitHub](https://github.com/BlobDeveloper/discord-giveaways-bot).`) 17 | .addFields([ 18 | { name: 'ℹ️ Info', value: '**[2]** `help`, `ping`' }, 19 | { name: '🎉 Giveaways', value: '**[6]** `giveaway start`, `giveaway pause`, `giveaway unpause`, `giveaway end`, `giveaway reroll`, `giveaway delete`'} 20 | ]); 21 | 22 | return interaction.reply({ embeds: [embed]}) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Commands/Info/ping.js: -------------------------------------------------------------------------------- 1 | const { Client, ChatInputCommandInteraction } = require('discord.js'); 2 | 3 | module.exports = { 4 | name: 'ping', 5 | description: '🏓 Pong!', 6 | /** 7 | * 8 | * @param {ChatInputCommandInteraction} interaction 9 | * @param {Client} client 10 | */ 11 | async execute(interaction, client) { 12 | await interaction.reply({ content: '🏓 Pong!' }); 13 | return interaction.editReply({ content: `🏓 Pong! Latency is **${Date.now() - interaction.createdTimestamp}**ms.`}); 14 | } 15 | } -------------------------------------------------------------------------------- /src/Events/Client/ready.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | module.exports = { 4 | name: 'ready', 5 | execute (client) { 6 | client.user.setActivity(client.config.app.playing); 7 | console.log(`[DISCORD]`.green + ` Client ${client.user.tag} is now online!`); 8 | 9 | mongoose.connect(client.config.app.mongodb, { 10 | useNewUrlParser: true, 11 | useUnifiedTopology: true, 12 | }).then(() => { 13 | console.log(`[MONGOOSE]`.green + ` Client has successfully connected to the database!`) 14 | }).catch((err) => { 15 | console.log(err) 16 | }); 17 | } 18 | } -------------------------------------------------------------------------------- /src/Events/Guild/interactionCreate.js: -------------------------------------------------------------------------------- 1 | const { Client, ChatInputCommandInteraction } = require("discord.js"); 2 | require('colors'); 3 | 4 | module.exports = { 5 | name: "interactionCreate", 6 | /** 7 | * 8 | * @param {ChatInputCommandInteraction} interaction 9 | * @param {Client} client 10 | */ 11 | async execute(interaction, client) { 12 | if(interaction.isCommand() || interaction.isContextMenu()) { 13 | const command = client.commands.get(interaction.commandName); 14 | if(!command) return interaction.reply({ content: '❌ | Error! Please contact Developers!', ephemeral: true }) && client.commands.delete(interaction.commandName); 15 | 16 | if (command.permissions) { 17 | if (!interaction.member.permissions.has(command.permissions)) { 18 | return interaction.reply({ content: `❌ | You need \`${command.permissions}\` permissions to execute this command!`, ephemeral: true }) 19 | } 20 | } 21 | 22 | if(command.giveawayManagerOnly) { 23 | const role = interaction.member.roles.cache.get(client.config.giveawayManager.giveawaysManagerRole); 24 | if(!role) return interaction.reply({ content: '❌ | You must have a giveaway manager role to run this command!', ephemeral: true }); 25 | } 26 | 27 | try { 28 | command.execute(interaction, client); 29 | } catch (e) { 30 | return console.log(`${e}`.red); 31 | } finally { 32 | console.log(`[LOG]`.yellow + ` Command ${interaction.commandName} has been executed by ${interaction.user.tag}`); 33 | } 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/GiveawaysEvents/Others/giveawayEnded.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require('discord.js'); 2 | 3 | module.exports = { 4 | name: 'giveawayEnded', 5 | execute(giveaway, winners) { 6 | winners.forEach((winner) => { 7 | return winner.send({ 8 | embeds: [ 9 | new EmbedBuilder() 10 | .setColor('Purple') 11 | .setTitle('🎁 Congratulations!') 12 | .setDescription(`Congratulations, you won the [Giveaway](https://discord.com/channels/${giveaway.guildId}/${giveaway.channelId}/${giveaway.messageId})!\nYour prize is: \`${giveaway.prize}\``) 13 | ] 14 | }).catch(() => {}); 15 | }); 16 | } 17 | } -------------------------------------------------------------------------------- /src/GiveawaysEvents/Others/giveawayRerolled.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'giveawayRerolled', 3 | execute(giveaway, winners) { 4 | winners.forEach((winner) => { 5 | return winner.send({ 6 | embeds: [ 7 | new EmbedBuilder() 8 | .setColor('Purple') 9 | .setTitle('🎁 Congratulations!') 10 | .setDescription(`Congratulations, you won the [Giveaway](https://discord.com/channels/${giveaway.guildId}/${giveaway.channelId}/${giveaway.messageId})!\nYour prize is: \`${giveaway.prize}\``) 11 | ] 12 | }).catch(() => {}); 13 | }); 14 | } 15 | } -------------------------------------------------------------------------------- /src/GiveawaysEvents/Reactions/endedGiveawayReactionAdded.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | 3 | module.exports = { 4 | name: 'endedGiveawayReactionAdded', 5 | execute(giveaway, member, reaction) { 6 | reaction.users.remove(member.user); 7 | return member.send({ 8 | embeds: [ 9 | new EmbedBuilder() 10 | .setColor('Purple') 11 | .setTitle('🤔 Mistake?') 12 | .setDescription(`Oops, apparently you entered an already ended [Giveaway](https://discord.com/channels/${giveaway.guildId}/${giveaway.channelId}/${giveaway.messageId})!\nProbably a mistake...`) 13 | ] 14 | }).catch(() => {}); 15 | } 16 | } -------------------------------------------------------------------------------- /src/GiveawaysEvents/Reactions/giveawayReactionAdded.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require('discord.js'); 2 | 3 | module.exports = { 4 | name: 'giveawayReactionAdded', 5 | execute(giveaway, member, reaction) { 6 | return member.send({ 7 | embeds: [ 8 | new EmbedBuilder() 9 | .setColor('Purple') 10 | .setTitle(`👏 Good job!`) 11 | .setDescription(`Great, you entered the [Giveaway](https://discord.com/channels/${giveaway.guildId}/${giveaway.channelId}/${giveaway.messageId})!\nGiveaway prize: \`${giveaway.prize}\`\nGood luck!`) 12 | ] 13 | }).catch(() => {}); 14 | } 15 | } -------------------------------------------------------------------------------- /src/GiveawaysEvents/Reactions/giveawayReactionRemoved.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js") 2 | 3 | module.exports = { 4 | name: 'giveawayReactionRemoved', 5 | execute(giveaway, member) { 6 | return member.send({ 7 | embeds: [ 8 | new EmbedBuilder() 9 | .setColor('Purple') 10 | .setTitle('🤔 Leave from the giveaway?') 11 | .setDescription(`I noticed you left the [Giveaway](https://discord.com/channels/${giveaway.guildId}/${giveaway.channelId}/${giveaway.messageId}).\nGiveaway prize: \`${giveaway.prize}\`.\nIs this a mistake? Join again!`) 12 | ] 13 | }) 14 | } 15 | } -------------------------------------------------------------------------------- /src/Schemas/giveawaysSchema.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | const giveawaySchema = new mongoose.Schema({ 4 | messageId: String, 5 | channelId: String, 6 | guildId: String, 7 | startAt: Number, 8 | endAt: Number, 9 | ended: Boolean, 10 | winnerCount: Number, 11 | prize: String, 12 | messages: { 13 | giveaway: String, 14 | giveawayEnded: String, 15 | inviteToParticipate: String, 16 | drawing: String, 17 | dropMessage: String, 18 | winMessage: mongoose.Mixed, 19 | embedFooter: mongoose.Mixed, 20 | noWinner: String, 21 | winners: String, 22 | endedAt: String, 23 | hostedBy: String 24 | }, 25 | thumbnail: String, 26 | hostedBy: String, 27 | winnerIds: { type: [String], default: undefined }, 28 | reaction: mongoose.Mixed, 29 | botsCanWin: Boolean, 30 | embedColor: mongoose.Mixed, 31 | embedColorEnd: mongoose.Mixed, 32 | exemptPermissions: { type: [], default: undefined }, 33 | exemptMembers: String, 34 | bonusEntries: String, 35 | extraData: mongoose.Mixed, 36 | lastChance: { 37 | enabled: Boolean, 38 | content: String, 39 | threshold: Number, 40 | embedColor: mongoose.Mixed 41 | }, 42 | pauseOptions: { 43 | isPaused: Boolean, 44 | content: String, 45 | unpauseAfter: Number, 46 | embedColor: mongoose.Mixed, 47 | durationAfterPause: Number, 48 | infiniteDurationText: String 49 | }, 50 | isDrop: Boolean, 51 | allowedMentions: { 52 | parse: { type: [String], default: undefined }, 53 | users: { type: [String], default: undefined }, 54 | roles: { type: [String], default: undefined } 55 | } 56 | }, { id: false }); 57 | 58 | const giveawayModel = mongoose.model('giveaways', giveawaySchema); 59 | 60 | module.exports = giveawayModel; -------------------------------------------------------------------------------- /src/Templates/commandTemplate.js: -------------------------------------------------------------------------------- 1 | const { Client, ChatInputCommandInteraction } = require('discord.js'); 2 | 3 | module.exports = { 4 | name: '', 5 | description: '', 6 | /** 7 | * 8 | * @param {ChatInputCommandInteraction} interaction 9 | * @param {Client} client 10 | */ 11 | execute(interaction, client) { 12 | 13 | } 14 | } -------------------------------------------------------------------------------- /src/Templates/eventTemplate.js: -------------------------------------------------------------------------------- 1 | const { Client } = require('discord.js'); 2 | 3 | module.exports = { 4 | name: '', 5 | /** 6 | * 7 | * @param {Client} client 8 | */ 9 | execute (client) { 10 | 11 | } 12 | } -------------------------------------------------------------------------------- /src/Util/commandHandler.js: -------------------------------------------------------------------------------- 1 | const { readdirSync } = require('fs'); 2 | require('colors'); 3 | 4 | module.exports = (client) => { 5 | CommandsArray = []; 6 | 7 | readdirSync('./src/Commands').forEach(async (dir) => { 8 | const slashcmnds = readdirSync(`./src/Commands/${dir}`).filter(file => file.endsWith('.js')); 9 | 10 | for (const file of slashcmnds) { 11 | const slashcmd = require(`${__dirname}/../Commands/${dir}/${file}`); 12 | 13 | if(slashcmd.name && slashcmd.description) { 14 | CommandsArray.push(slashcmd); 15 | client.commands.set(slashcmd.name, slashcmd); 16 | console.log(`[COMMANDS]`.magenta + ` Command ${file.split('.')[0]} loaded!`); 17 | delete require.cache[require.resolve(`${__dirname}/../Commands/${dir}/${file}`)]; 18 | } else { 19 | console.log(`[COMMANDS]`.red + ` Failed to load slash command: ${file.split('.')[0]}!`); 20 | continue; 21 | } 22 | } 23 | }); 24 | 25 | client.on('ready', () => { 26 | if(client.config.app.globalCommands) { 27 | client.application.commands.set(CommandsArray); 28 | } else { 29 | const guild = client.guilds.cache.get(client.config.app.slashGuild); 30 | if(!guild) return console.log(`[COMMANDS]`.red + ` The guild you specified in the config was not found.`); 31 | else guild.commands.set(CommandsArray); 32 | } 33 | }); 34 | } -------------------------------------------------------------------------------- /src/Util/eventsHandler.js: -------------------------------------------------------------------------------- 1 | const { readdirSync } = require('fs'); 2 | require('colors'); 3 | 4 | module.exports = (client) => { 5 | readdirSync('./src/Events/').forEach(async (dir) => { 6 | const events = readdirSync(`./src/Events/${dir}`).filter(file => file.endsWith('.js')); 7 | 8 | for(const file of events) { 9 | const event = require(`${__dirname}/../Events/${dir}/${file}`); 10 | if(event.name) { 11 | console.log(`[EVENTS]`.blue + ` Event ${file.split(".")[0]} loaded!`); 12 | 13 | client.on(event.name, (...args) => event.execute(...args, client)) 14 | delete require.cache[require.resolve(`${__dirname}/../Events/${dir}/${file}`)]; 15 | } else { 16 | console.log(`[EVENTS]`.red + ` Failed to load event: ${file.split('.')[0]}!`); 17 | continue; 18 | } 19 | } 20 | }); 21 | } -------------------------------------------------------------------------------- /src/Util/giveawaysEventsHandler.js: -------------------------------------------------------------------------------- 1 | const { readdirSync } = require('fs'); 2 | require('colors'); 3 | 4 | module.exports = (client) => { 5 | if(client.config.giveawayManager.privateMessageInformation) { 6 | readdirSync('./src/GiveawaysEvents/').forEach(async (dir) => { 7 | const events = readdirSync(`./src/GiveawaysEvents/${dir}`).filter(file => file.endsWith('.js')); 8 | 9 | for(const file of events) { 10 | const event = require(`${__dirname}/../GiveawaysEvents/${dir}/${file}`); 11 | if(event.name) { 12 | console.log(`[GIVEAWAYS EVENTS]`.cyan + ` Event ${file.split(".")[0]} loaded!`); 13 | 14 | client.giveawaysManager.on(event.name, (...args) => event.execute(...args, client)) 15 | delete require.cache[require.resolve(`${__dirname}/../GiveawaysEvents/${dir}/${file}`)]; 16 | } else { 17 | console.log(`[GIVEAWAYS EVENTS]`.red + ` Failed to load event: ${file.split('.')[0]}!`); 18 | continue; 19 | } 20 | } 21 | }); 22 | } else { 23 | return console.log(`[WARNING]`.yellow + ` Private Message Information is disabled!`); 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /src/Util/giveawaysManager.js: -------------------------------------------------------------------------------- 1 | const { GiveawaysManager } = require('discord-giveaways'); 2 | const giveawayModel = require('../Schemas/giveawaysSchema'); 3 | 4 | module.exports = (client) => { 5 | const GiveawayManagerWithOwnDatabase = class extends GiveawaysManager { 6 | async getAllGiveaways() { 7 | return await giveawayModel.find().lean().exec(); 8 | } 9 | 10 | async saveGiveaway(messageId, giveawayData) { 11 | await giveawayModel.create(giveawayData); 12 | return true; 13 | } 14 | 15 | async editGiveaway(messageId, giveawayData) { 16 | await giveawayModel.updateOne({ messageId }, giveawayData, { omitUndefined: true }).exec(); 17 | return true; 18 | } 19 | 20 | async deleteGiveaway(messageId) { 21 | await giveawayModel.deleteOne({ messageId }).exec(); 22 | return true; 23 | } 24 | }; 25 | 26 | const manager = new GiveawayManagerWithOwnDatabase(client, { 27 | default: { 28 | botsCanWin: false, 29 | embedColor: '#FF0000', 30 | embedColorEnd: '#F00000', 31 | reaction: client.config.giveawayManager.reaction 32 | } 33 | }); 34 | client.giveawaysManager = manager; 35 | } -------------------------------------------------------------------------------- /src/config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | app : { 3 | // Discord Bot Token from https://discord.com/developers/ 4 | token: 'XXX', 5 | // Discord Bot Status 6 | playing: 'giveaways 🎉', 7 | // Database URL from https://mongodb.com/ 8 | mongodb: 'XXX', 9 | // If you only want to have slash commands for one guild, leave false. 10 | globalCommands: false, 11 | // If you chose false above, put the guild id where you want to have slash commands. 12 | slashGuild: 'XXX' 13 | }, 14 | 15 | giveawayManager : { 16 | //Private Message Information. 17 | //If you set false, the bot will not send private message information to members who join the giveaway, for example. 18 | privateMessageInformation: true, 19 | // Role ID which will be able to create giveaways 20 | giveawaysManagerRole: 'XXX', 21 | // When a giveaway is created the bot pings everyone (true or false) 22 | everyoneMention: false, 23 | // You can choose a custom reaction 24 | reaction: '🎉' 25 | }, 26 | 27 | // You can leave it as it is here by default. 28 | // Don't change things in {} brackets like {winners}, ... 29 | messages: { 30 | giveaway: '🎉 **Giveaway**', 31 | giveawayEnded: '🎉 **Giveaway Ended**', 32 | title: 'Prize: {this.prize}', 33 | drawing: 'The giveaway ends in: {timestamp}', 34 | dropMessage: 'Be the first, and react to 🎉!', 35 | inviteToParticipate: 'React with 🎉 to enter the giveaway!', 36 | winMessage: 'Congratulations, {winners}! You won **{this.prize}**!', 37 | embedFooter: '{this.winnerCount} winner(s)', 38 | noWinner: 'Giveaway cancelled, no valid participations.', 39 | hostedBy: 'Hosted by: {this.hostedBy}', 40 | winners: 'Winner(s):', 41 | endedAt: 'Ended at', 42 | paused: '⚠️ **This giveaway is paused!**', 43 | infiniteDurationText: '`NEVER`', 44 | congrat: 'New winner(s): {winners}! Congratulations, your prize is **{this.prize}**!', 45 | error: 'Reroll cancelled, no valid participations.' 46 | } 47 | } -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | require('colors'); 2 | const { Client, GatewayIntentBits, Partials, Collection } = require('discord.js'); 3 | 4 | const client = new Client({ 5 | intents: Object.keys(GatewayIntentBits), 6 | partials: Object.keys(Partials), 7 | }); 8 | 9 | client.config = require('./config'); 10 | client.commands = new Collection(); 11 | 12 | ['commandHandler', 'eventsHandler', 'giveawaysManager', 'giveawaysEventsHandler'].forEach((x) => { 13 | require(`./Util/${x}`)(client); 14 | }); 15 | 16 | client.login(client.config.app.token); --------------------------------------------------------------------------------