├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── LICENSE ├── README.md ├── commands ├── info │ ├── help.js │ └── uptime.js └── mod │ └── setlogchannel.js ├── config.json ├── handlers └── command.js ├── index.js ├── logger.js ├── models └── log.js ├── package-lock.json └── package.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: # Replace with a single Patreon username 2 | open_collective: # Replace with a single Open Collective username 3 | ko_fi: yash094 4 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 5 | liberapay: # Replace with a single Liberapay username 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Attribution-NonCommercial-NoDerivatives 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 58 | International Public License 59 | 60 | By exercising the Licensed Rights (defined below), You accept and agree 61 | to be bound by the terms and conditions of this Creative Commons 62 | Attribution-NonCommercial-NoDerivatives 4.0 International Public 63 | License ("Public License"). To the extent this Public License may be 64 | interpreted as a contract, You are granted the Licensed Rights in 65 | consideration of Your acceptance of these terms and conditions, and the 66 | Licensor grants You such rights in consideration of benefits the 67 | Licensor receives from making the Licensed Material available under 68 | these terms and conditions. 69 | 70 | 71 | Section 1 -- Definitions. 72 | 73 | a. Adapted Material means material subject to Copyright and Similar 74 | Rights that is derived from or based upon the Licensed Material 75 | and in which the Licensed Material is translated, altered, 76 | arranged, transformed, or otherwise modified in a manner requiring 77 | permission under the Copyright and Similar Rights held by the 78 | Licensor. For purposes of this Public License, where the Licensed 79 | Material is a musical work, performance, or sound recording, 80 | Adapted Material is always produced where the Licensed Material is 81 | synched in timed relation with a moving image. 82 | 83 | b. Copyright and Similar Rights means copyright and/or similar rights 84 | closely related to copyright including, without limitation, 85 | performance, broadcast, sound recording, and Sui Generis Database 86 | Rights, without regard to how the rights are labeled or 87 | categorized. For purposes of this Public License, the rights 88 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 89 | Rights. 90 | 91 | c. Effective Technological Measures means those measures that, in the 92 | absence of proper authority, may not be circumvented under laws 93 | fulfilling obligations under Article 11 of the WIPO Copyright 94 | Treaty adopted on December 20, 1996, and/or similar international 95 | agreements. 96 | 97 | d. Exceptions and Limitations means fair use, fair dealing, and/or 98 | any other exception or limitation to Copyright and Similar Rights 99 | that applies to Your use of the Licensed Material. 100 | 101 | e. Licensed Material means the artistic or literary work, database, 102 | or other material to which the Licensor applied this Public 103 | License. 104 | 105 | f. Licensed Rights means the rights granted to You subject to the 106 | terms and conditions of this Public License, which are limited to 107 | all Copyright and Similar Rights that apply to Your use of the 108 | Licensed Material and that the Licensor has authority to license. 109 | 110 | g. Licensor means the individual(s) or entity(ies) granting rights 111 | under this Public License. 112 | 113 | h. NonCommercial means not primarily intended for or directed towards 114 | commercial advantage or monetary compensation. For purposes of 115 | this Public License, the exchange of the Licensed Material for 116 | other material subject to Copyright and Similar Rights by digital 117 | file-sharing or similar means is NonCommercial provided there is 118 | no payment of monetary compensation in connection with the 119 | exchange. 120 | 121 | i. Share means to provide material to the public by any means or 122 | process that requires permission under the Licensed Rights, such 123 | as reproduction, public display, public performance, distribution, 124 | dissemination, communication, or importation, and to make material 125 | available to the public including in ways that members of the 126 | public may access the material from a place and at a time 127 | individually chosen by them. 128 | 129 | j. Sui Generis Database Rights means rights other than copyright 130 | resulting from Directive 96/9/EC of the European Parliament and of 131 | the Council of 11 March 1996 on the legal protection of databases, 132 | as amended and/or succeeded, as well as other essentially 133 | equivalent rights anywhere in the world. 134 | 135 | k. You means the individual or entity exercising the Licensed Rights 136 | under this Public License. Your has a corresponding meaning. 137 | 138 | 139 | Section 2 -- Scope. 140 | 141 | a. License grant. 142 | 143 | 1. Subject to the terms and conditions of this Public License, 144 | the Licensor hereby grants You a worldwide, royalty-free, 145 | non-sublicensable, non-exclusive, irrevocable license to 146 | exercise the Licensed Rights in the Licensed Material to: 147 | 148 | a. reproduce and Share the Licensed Material, in whole or 149 | in part, for NonCommercial purposes only; and 150 | 151 | b. produce and reproduce, but not Share, Adapted Material 152 | for NonCommercial purposes only. 153 | 154 | 2. Exceptions and Limitations. For the avoidance of doubt, where 155 | Exceptions and Limitations apply to Your use, this Public 156 | License does not apply, and You do not need to comply with 157 | its terms and conditions. 158 | 159 | 3. Term. The term of this Public License is specified in Section 160 | 6(a). 161 | 162 | 4. Media and formats; technical modifications allowed. The 163 | Licensor authorizes You to exercise the Licensed Rights in 164 | all media and formats whether now known or hereafter created, 165 | and to make technical modifications necessary to do so. The 166 | Licensor waives and/or agrees not to assert any right or 167 | authority to forbid You from making technical modifications 168 | necessary to exercise the Licensed Rights, including 169 | technical modifications necessary to circumvent Effective 170 | Technological Measures. For purposes of this Public License, 171 | simply making modifications authorized by this Section 2(a) 172 | (4) never produces Adapted Material. 173 | 174 | 5. Downstream recipients. 175 | 176 | a. Offer from the Licensor -- Licensed Material. Every 177 | recipient of the Licensed Material automatically 178 | receives an offer from the Licensor to exercise the 179 | Licensed Rights under the terms and conditions of this 180 | Public License. 181 | 182 | b. No downstream restrictions. You may not offer or impose 183 | any additional or different terms or conditions on, or 184 | apply any Effective Technological Measures to, the 185 | Licensed Material if doing so restricts exercise of the 186 | Licensed Rights by any recipient of the Licensed 187 | Material. 188 | 189 | 6. No endorsement. Nothing in this Public License constitutes or 190 | may be construed as permission to assert or imply that You 191 | are, or that Your use of the Licensed Material is, connected 192 | with, or sponsored, endorsed, or granted official status by, 193 | the Licensor or others designated to receive attribution as 194 | provided in Section 3(a)(1)(A)(i). 195 | 196 | b. Other rights. 197 | 198 | 1. Moral rights, such as the right of integrity, are not 199 | licensed under this Public License, nor are publicity, 200 | privacy, and/or other similar personality rights; however, to 201 | the extent possible, the Licensor waives and/or agrees not to 202 | assert any such rights held by the Licensor to the limited 203 | extent necessary to allow You to exercise the Licensed 204 | Rights, but not otherwise. 205 | 206 | 2. Patent and trademark rights are not licensed under this 207 | Public License. 208 | 209 | 3. To the extent possible, the Licensor waives any right to 210 | collect royalties from You for the exercise of the Licensed 211 | Rights, whether directly or through a collecting society 212 | under any voluntary or waivable statutory or compulsory 213 | licensing scheme. In all other cases the Licensor expressly 214 | reserves any right to collect such royalties, including when 215 | the Licensed Material is used other than for NonCommercial 216 | purposes. 217 | 218 | 219 | Section 3 -- License Conditions. 220 | 221 | Your exercise of the Licensed Rights is expressly made subject to the 222 | following conditions. 223 | 224 | a. Attribution. 225 | 226 | 1. If You Share the Licensed Material, You must: 227 | 228 | a. retain the following if it is supplied by the Licensor 229 | with the Licensed Material: 230 | 231 | i. identification of the creator(s) of the Licensed 232 | Material and any others designated to receive 233 | attribution, in any reasonable manner requested by 234 | the Licensor (including by pseudonym if 235 | designated); 236 | 237 | ii. a copyright notice; 238 | 239 | iii. a notice that refers to this Public License; 240 | 241 | iv. a notice that refers to the disclaimer of 242 | warranties; 243 | 244 | v. a URI or hyperlink to the Licensed Material to the 245 | extent reasonably practicable; 246 | 247 | b. indicate if You modified the Licensed Material and 248 | retain an indication of any previous modifications; and 249 | 250 | c. indicate the Licensed Material is licensed under this 251 | Public License, and include the text of, or the URI or 252 | hyperlink to, this Public License. 253 | 254 | For the avoidance of doubt, You do not have permission under 255 | this Public License to Share Adapted Material. 256 | 257 | 2. You may satisfy the conditions in Section 3(a)(1) in any 258 | reasonable manner based on the medium, means, and context in 259 | which You Share the Licensed Material. For example, it may be 260 | reasonable to satisfy the conditions by providing a URI or 261 | hyperlink to a resource that includes the required 262 | information. 263 | 264 | 3. If requested by the Licensor, You must remove any of the 265 | information required by Section 3(a)(1)(A) to the extent 266 | reasonably practicable. 267 | 268 | 269 | Section 4 -- Sui Generis Database Rights. 270 | 271 | Where the Licensed Rights include Sui Generis Database Rights that 272 | apply to Your use of the Licensed Material: 273 | 274 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 275 | to extract, reuse, reproduce, and Share all or a substantial 276 | portion of the contents of the database for NonCommercial purposes 277 | only and provided You do not Share Adapted Material; 278 | 279 | b. if You include all or a substantial portion of the database 280 | contents in a database in which You have Sui Generis Database 281 | Rights, then the database in which You have Sui Generis Database 282 | Rights (but not its individual contents) is Adapted Material; and 283 | 284 | c. You must comply with the conditions in Section 3(a) if You Share 285 | all or a substantial portion of the contents of the database. 286 | 287 | For the avoidance of doubt, this Section 4 supplements and does not 288 | replace Your obligations under this Public License where the Licensed 289 | Rights include other Copyright and Similar Rights. 290 | 291 | 292 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 293 | 294 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 295 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 296 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 297 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 298 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 299 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 300 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 301 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 302 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 303 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 304 | 305 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 306 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 307 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 308 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 309 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 310 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 311 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 312 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 313 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 314 | 315 | c. The disclaimer of warranties and limitation of liability provided 316 | above shall be interpreted in a manner that, to the extent 317 | possible, most closely approximates an absolute disclaimer and 318 | waiver of all liability. 319 | 320 | 321 | Section 6 -- Term and Termination. 322 | 323 | a. This Public License applies for the term of the Copyright and 324 | Similar Rights licensed here. However, if You fail to comply with 325 | this Public License, then Your rights under this Public License 326 | terminate automatically. 327 | 328 | b. Where Your right to use the Licensed Material has terminated under 329 | Section 6(a), it reinstates: 330 | 331 | 1. automatically as of the date the violation is cured, provided 332 | it is cured within 30 days of Your discovery of the 333 | violation; or 334 | 335 | 2. upon express reinstatement by the Licensor. 336 | 337 | For the avoidance of doubt, this Section 6(b) does not affect any 338 | right the Licensor may have to seek remedies for Your violations 339 | of this Public License. 340 | 341 | c. For the avoidance of doubt, the Licensor may also offer the 342 | Licensed Material under separate terms or conditions or stop 343 | distributing the Licensed Material at any time; however, doing so 344 | will not terminate this Public License. 345 | 346 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 347 | License. 348 | 349 | 350 | Section 7 -- Other Terms and Conditions. 351 | 352 | a. The Licensor shall not be bound by any additional or different 353 | terms or conditions communicated by You unless expressly agreed. 354 | 355 | b. Any arrangements, understandings, or agreements regarding the 356 | Licensed Material not stated herein are separate from and 357 | independent of the terms and conditions of this Public License. 358 | 359 | 360 | Section 8 -- Interpretation. 361 | 362 | a. For the avoidance of doubt, this Public License does not, and 363 | shall not be interpreted to, reduce, limit, restrict, or impose 364 | conditions on any use of the Licensed Material that could lawfully 365 | be made without permission under this Public License. 366 | 367 | b. To the extent possible, if any provision of this Public License is 368 | deemed unenforceable, it shall be automatically reformed to the 369 | minimum extent necessary to make it enforceable. If the provision 370 | cannot be reformed, it shall be severed from this Public License 371 | without affecting the enforceability of the remaining terms and 372 | conditions. 373 | 374 | c. No term or condition of this Public License will be waived and no 375 | failure to comply consented to unless expressly agreed to by the 376 | Licensor. 377 | 378 | d. Nothing in this Public License constitutes or may be interpreted 379 | as a limitation upon, or waiver of, any privileges and immunities 380 | that apply to the Licensor or You, including from the legal 381 | processes of any jurisdiction or authority. 382 | 383 | ======================================================================= 384 | 385 | Creative Commons is not a party to its public 386 | licenses. Notwithstanding, Creative Commons may elect to apply one of 387 | its public licenses to material it publishes and in those instances 388 | will be considered the “Licensor.” The text of the Creative Commons 389 | public licenses is dedicated to the public domain under the CC0 Public 390 | Domain Dedication. Except for the limited purpose of indicating that 391 | material is shared under a Creative Commons public license or as 392 | otherwise permitted by the Creative Commons policies published at 393 | creativecommons.org/policies, Creative Commons does not authorize the 394 | use of the trademark "Creative Commons" or any other trademark or logo 395 | of Creative Commons without its prior written consent including, 396 | without limitation, in connection with any unauthorized modifications 397 | to any of its public licenses or any other arrangements, 398 | understandings, or agreements concerning use of licensed material. For 399 | the avoidance of doubt, this paragraph does not form part of the 400 | public licenses. 401 | 402 | Creative Commons may be contacted at creativecommons.org. 403 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Discord-audit-log-webhook 2 | 3 | ## MONGODB SETUP 4 | 5 | [MongoDB LINK](https://www.mongodb.com/) 6 | * Create a free cluster get you connection url and post it in config.json 7 | * Mongo db [documentation](https://github.com/shinchanOP/discord-audit-log-webhook/wiki/HOW-TO-USE-MONGODB) on how to get mongo url for your bot. 8 | 9 | ## Installation | How to use the Bot 10 | 11 | **1.** Install [node.js v12+](https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode) or higher 12 | 13 | **2.** Download this repo and unzip it | or git clone it 14 | 15 | **3.** Install all of the packages with **`npm install`** | the important packages are **`npm install discord.js colors mongoose ascii-table`** 16 | 17 | **4.** Fill in the parameters, RIGHT in `./config.json` 18 | 19 | **5.** start the bot with **`node index.js`** 20 | 21 | #### **NOTE:** 22 | 23 | *If you are having errors/problems with starting delete the package.json file and do, before you install the packages `npm init`* 24 | 25 | *MAKE SURE THAT THE BOT HAS ADMIN PERMISSIONS* 26 | -------------------------------------------------------------------------------- /commands/info/help.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require("discord.js"); 2 | 3 | module.exports = { 4 | name: "help", 5 | run: async (client, message, args) => { 6 | const helpembed = new MessageEmbed() 7 | .setTitle("HELP COMMANDS") 8 | .setDescription(" **setlogchannel**: To set log channel \n```Usage: L!setmodchannel #channel```\n**Uptime**: To get bots run time \n```Usage: L!uptime```") 9 | .setColor("GREEN") 10 | message.channel.send(helpembed) 11 | 12 | 13 | 14 | 15 | }} -------------------------------------------------------------------------------- /commands/info/uptime.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require("discord.js"); 2 | 3 | module.exports = { 4 | name: "uptime", 5 | run: async (client, message, args) => { 6 | let days = Math.floor(client.uptime / 86400000); 7 | let hours = Math.floor(client.uptime / 3600000) % 24; 8 | let minutes = Math.floor(client.uptime / 60000) % 60; 9 | let seconds = Math.floor(client.uptime / 1000) % 60; 10 | 11 | const embed = new MessageEmbed() 12 | .setTitle("Uptime") 13 | .setColor("GREEN") 14 | .setDescription( 15 | `${days} days ${hours} hours ${minutes} minutes ${seconds} seconds` 16 | ) 17 | .setThumbnail(client.user.displayAvatarURL()) 18 | .setFooter(message.guild.name, message.guild.iconURL()) 19 | .setAuthor(client.user.username, client.user.displayAvatarURL()); 20 | message.channel.send(embed); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /commands/mod/setlogchannel.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const Guild = require("../../models/log");//require our log model 3 | const mongoose = require("mongoose"); 4 | 5 | module.exports = { 6 | name: "setlogchannel", 7 | run: async (client, message, args) => { 8 | message.delete(); 9 | 10 | if (!message.member.hasPermission("MANAGE_GUILD")) 11 | return message.channel 12 | .send("You do not have permission to use this command.") 13 | .then(m => m.delete({ timeout: 5000 }));// if the user does not have perms 14 | 15 | const channel = await message.mentions.channels.first(); 16 | const guild1 = message.guild; 17 | let webhookid; 18 | let webhooktoken; 19 | await channel 20 | .createWebhook(guild1.name, { 21 | avatar: guild1.iconURL({ format: "png" }) 22 | }) 23 | .then(webhook => { 24 | webhookid = webhook.id; 25 | webhooktoken = webhook.token; 26 | }); 27 | 28 | if (!channel) 29 | return message.channel 30 | .send( 31 | "I cannot find that channel. Please mention a channel within this server." 32 | )// if the user do not mention a channel 33 | .then(m => m.delete({ timeout: 5000 })); 34 | 35 | await Guild.findOne(//will find data from database 36 | { 37 | guildID: message.guild.id 38 | }, 39 | async (err, guild) => { 40 | if (err) console.error(err); 41 | if (!guild) {// what the bot should do if there is no data found for the server 42 | const newGuild = new Guild({ 43 | _id: mongoose.Types.ObjectId(), 44 | guildID: message.guild.id, 45 | guildName: message.guild.name, 46 | logChannelID: channel.id, 47 | webhookid: webhookid, 48 | webhooktoken: webhooktoken 49 | }); 50 | 51 | await newGuild 52 | .save() //save the data to database(mongodb) 53 | .then(result => console.log(result)) 54 | .catch(err => console.error(err)); 55 | 56 | return message.channel.send( 57 | `The log channel has been set to ${channel}` 58 | ); 59 | } else { 60 | guild 61 | .updateOne({ //if data is found then update it with new one 62 | logChannelID: channel.id, 63 | webhooktoken: webhooktoken, 64 | webhookid: webhookid 65 | }) 66 | .catch(err => console.error(err)); 67 | 68 | return message.channel.send( 69 | `The log channel has been updated to ${channel}` 70 | ); 71 | } 72 | } 73 | ); 74 | } 75 | }; 76 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "TOKEN GOES HERE", 3 | "prefix": "!", 4 | "mongourl": "MONGO_URL_GOES_HERE" 5 | } 6 | -------------------------------------------------------------------------------- /handlers/command.js: -------------------------------------------------------------------------------- 1 | const { readdirSync } = require("fs"); 2 | 3 | const ascii = require("ascii-table"); 4 | 5 | 6 | let table = new ascii("Commands"); 7 | table.setHeading("Command", "Load status"); 8 | 9 | module.exports = client => { 10 | readdirSync("./commands/").forEach(dir => { 11 | 12 | const commands = readdirSync(`./commands/${dir}/`).filter(file => 13 | file.endsWith(".js") 14 | ); 15 | for (let file of commands) { 16 | let pull = require(`../commands/${dir}/${file}`); 17 | 18 | if (pull.name) { 19 | client.commands.set(pull.name, pull); 20 | table.addRow(file, "✅"); 21 | } else { 22 | table.addRow( 23 | file, 24 | `❌ -> missing a help.name, or help.name is not a string.` 25 | ); 26 | continue; 27 | } 28 | if (pull.aliases && Array.isArray(pull.aliases)) 29 | pull.aliases.forEach(alias => client.aliases.set(alias, pull.name)); 30 | } 31 | }); 32 | 33 | console.log(table.toString()); 34 | }; 35 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const colors = require("colors") 3 | const mongoose = require("mongoose"); 4 | const client = new Discord.Client({ 5 | presence: { 6 | status: "dnd", 7 | activity: { 8 | name: "Logger Tutorial", 9 | type: "STREAMING", 10 | url: "https://twitch.tv/#" 11 | } 12 | } 13 | }); 14 | client.config = require("./config.json"); 15 | 16 | client.login(client.config.token); 17 | 18 | client.on("ready", async ()=>{ 19 | console.log(`${client.user.tag} is now Online! Prefix: ${client.config.prefix}`.bgGreen); 20 | await mongoose.connect( 21 | client.config.mongourl, 22 | { 23 | useNewUrlParser: true, 24 | useUnifiedTopology: true, 25 | useFindAndModify: false, 26 | useCreateIndex: true 27 | } 28 | ); 29 | }); 30 | mongoose.connection.on("connected", () => { 31 | console.log("Mongoose has successfully connected!"); 32 | }); 33 | // send msg if successfull connection to mongodb 34 | mongoose.connection.on("err", err => { 35 | console.error(`Mongoose connection error: \n${err.stack}`); 36 | }); 37 | // send msg if error on connection 38 | mongoose.connection.on("disconnected", () => { 39 | console.warn("Mongoose connection lost"); 40 | }); 41 | //send msg if connection lost to mongodb 42 | 43 | require("./logger")(client); 44 | //const logger = require("./logger"); 45 | //logger(client) 46 | 47 | client.commands = new Discord.Collection(); 48 | client.aliases = new Discord.Collection(); 49 | ["command"].forEach(handler => { 50 | require(`./handlers/${handler}`)(client) 51 | }) 52 | client.on("message", async message => { 53 | if(message.author.bot) return; 54 | if(!message.guild) return; 55 | let prefix = client.config.prefix; 56 | if(!message.content.startsWith(client.config.prefix)) return; 57 | if (!message.member) message.member = await message.guild.fetchMember(message); 58 | const args = message.content.slice(prefix.length).trim().split(/ +/g); 59 | const cmd = args.shift().toLowerCase(); 60 | if (cmd.length === 0) return; 61 | let command = client.commands.get(cmd); 62 | if (!command) command = client.commands.get(client.aliases.get(cmd)); 63 | if (command) 64 | command.run(client, message, args); 65 | 66 | 67 | }) -------------------------------------------------------------------------------- /logger.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const fs = require("fs"); 3 | const Guild = require("./models/log"); 4 | const mongoose = require("mongoose"); 5 | 6 | module.exports = c => { 7 | console.log("Loaded Logger Module"); 8 | try { 9 | c.on("channelCreate", function(channel) { 10 | send_log( 11 | c, 12 | channel.guild, 13 | "GREEN", 14 | "Channel CREATED", 15 | `ChannelNAME: \`${channel.name}\`\nChannelID: \`${channel.id}\`\nChannelTYPE: \`${channel.type}\`` 16 | ); 17 | }); 18 | c.on("channelDelete", function(channel) { 19 | send_log( 20 | c, 21 | channel.guild, 22 | "RED", 23 | "Channel DELETED", 24 | `ChannelNAME: \`${channel.name}\`\nChannelID: \`${channel.id}\`\nChannelTYPE: \`${channel.type}\`` 25 | ); 26 | }); 27 | c.on("channelPinsUpdate", function(channel, time) { 28 | send_log( 29 | c, 30 | channel.guild, 31 | "YELLOW", 32 | "Channel PINS UPDATE", 33 | `ChannelNAME: \`${channel.name}\`\nChannelID: \`${channel.id}\`\nPinned at \`${time}\``, 34 | "https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/samsung/265/pushpin_1f4cc.png" 35 | ); 36 | }); 37 | c.on("channelUpdate", function(oldChannel, newChannel) { 38 | let newCat = newChannel.parent ? newChannel.parent.name : "NO PARENT"; 39 | let guildChannel = newChannel.guild; 40 | if (!guildChannel || !guildChannel.available) return; 41 | 42 | let types = { 43 | text: "Text Channel", 44 | voice: "Voice Channel", 45 | null: "No Type", 46 | news: "News Channel", 47 | store: "Store Channel", 48 | category: "Category" 49 | }; 50 | 51 | if (oldChannel.name != newChannel.name) { 52 | send_log( 53 | c, 54 | oldChannel.guild, 55 | "YELLOW", 56 | "Channel UPDATED - NAME", 57 | `ChannelNAME: \`${oldChannel.name}\`\nChannelID: \`${oldChannel.id}\`\n\n` + 58 | `ChannelNAME: \`${newChannel.name}\`\nChannelID: \`${newChannel.id}\`` 59 | ); 60 | } else if (oldChannel.type != newChannel.type) { 61 | send_log( 62 | c, 63 | oldChannel.guild, 64 | "YELLOW", 65 | "Channel UPDATED - TYPE", 66 | `ChannelNAME: \`${oldChannel.name}\`\nChannelID: \`${ 67 | oldChannel.id 68 | }\`\nChannelTYPE: \`${types[oldChannel.type]}\`\n\n` + 69 | `ChannelNAME: \`${newChannel.name}\`\nChannelID: \`${ 70 | newChannel.id 71 | }\`\nChannelTYPE: \`${types[newChannel.type]}\`` 72 | ); 73 | } else if (oldChannel.topic != newChannel.topic) { 74 | send_log( 75 | c, 76 | oldChannel.guild, 77 | "YELLOW", 78 | "Channel UPDATED - TOPIC", 79 | `ChannelNAME: \`${oldChannel.name}\`\nChannelID: \`${oldChannel.id}\`\nChannelTOPIC: \`${oldChannel.topic}\`\n\n` + 80 | `ChannelNAME: \`${newChannel.name}\`\nChannelID: \`${newChannel.id}\`\nChannelTOPIC: \`${newChannel.topic}\`` 81 | ); 82 | } 83 | }); 84 | c.on("emojiCreate", function(emoji) { 85 | send_log( 86 | c, 87 | emoji.guild, 88 | "GREEN", 89 | "EMOJI CREATED", 90 | `EMOJI: ${emoji}\nEMOJINAME: ${emoji.name}\nEMOJIID: ${emoji.id}\nEMOJIURL: ${emoji.url}` 91 | ); 92 | }); 93 | 94 | c.on("emojiDelete", function(emoji) { 95 | send_log( 96 | c, 97 | emoji.guild, 98 | "RED", 99 | "EMOJI DELETED", 100 | `EMOJI: ${emoji}\nEMOJINAME: ${emoji.name}\nEMOJIID: ${emoji.id}\nEMOJIURL: ${emoji.url}` 101 | ); 102 | }); 103 | 104 | c.on("emojiUpdate", function(oldEmoji, newEmoji) { 105 | if (oldEmoji.name !== newEmoji.name) { 106 | send_log( 107 | c, 108 | oldEmoji.guild, 109 | "ORANGE", 110 | "EMOJI NAME CHANGED", 111 | `__Emoji: ${newEmoji}__ \n\n**Before:** \`${oldEmoji.name}\`\n**After:** \`${newEmoji.name}\`\n**Emoji ID:** \`${newEmoji.id}\`` 112 | ); 113 | } 114 | }); 115 | 116 | c.on("guildBanAdd", function(guild, user) { 117 | send_log( 118 | c, 119 | guild, 120 | "RED", 121 | "USER BANNED", 122 | `User: ${user} (\`${user.id}\`)\n\`${user.tag}\``, 123 | user.user.displayAvatarURL({ dynamic: true }) 124 | ); 125 | }); 126 | 127 | c.on("guildBanRemove", function(guild, user) { 128 | send_log( 129 | c, 130 | guild, 131 | "YELLOW", 132 | "USER UNBANNED", 133 | `User: ${user} (\`${user.id}\`)\n\`${user.tag}\``, 134 | user.user.displayAvatarURL({ dynamic: true }) 135 | ); 136 | }); 137 | 138 | c.on("guildMemberAdd", function(member) { 139 | send_log( 140 | member.guild, 141 | c, 142 | "GREEN", 143 | "MEMBER JOINED", 144 | `Member: ${member.user} (\`${member.user.id}\`)\n\`${member.user.tag}\``, 145 | member.user.displayAvatarURL({ dynamic: true }) 146 | ); 147 | }); 148 | 149 | c.on("guildMemberRemove", function(member) { 150 | send_log( 151 | c, 152 | member.guild, 153 | "RED", 154 | "MEMBER LEFT", 155 | `Member: ${member.user} (\`${member.user.id}\`)\n\`${member.user.tag}\``, 156 | member.user.displayAvatarURL({ dynamic: true }) 157 | ); 158 | }); 159 | 160 | c.on("guildMembersChunk", function(members, guild) { 161 | send_log( 162 | guild, 163 | c, 164 | "RED", 165 | "MEMBER CHUNK / RAID - " + members.length + " Members", 166 | members.map( 167 | (user, index) => `${index}) - ${user} - ${user.tag} - \`${user.id}\`` 168 | ) 169 | ); 170 | }); 171 | 172 | c.on("guildMemberUpdate", function(oldMember, newMember) { 173 | let options = {}; 174 | 175 | if (options[newMember.guild.id]) { 176 | options = options[newMember.guild.id]; 177 | } 178 | 179 | // Add default empty list 180 | if (typeof options.excludedroles === "undefined") 181 | options.excludedroles = new Array([]); 182 | if (typeof options.trackroles === "undefined") options.trackroles = true; 183 | const oldMemberRoles = oldMember.roles.cache.keyArray(); 184 | const newMemberRoles = newMember.roles.cache.keyArray(); 185 | const oldRoles = oldMemberRoles 186 | .filter(x => !options.excludedroles.includes(x)) 187 | .filter(x => !newMemberRoles.includes(x)); 188 | const newRoles = newMemberRoles 189 | .filter(x => !options.excludedroles.includes(x)) 190 | .filter(x => !oldMemberRoles.includes(x)); 191 | const rolechanged = newRoles.length || oldRoles.length; 192 | 193 | if (rolechanged) { 194 | let roleadded = ""; 195 | if (newRoles.length > 0) { 196 | for (let i = 0; i < newRoles.length; i++) { 197 | if (i > 0) roleadded += ", "; 198 | roleadded += `<@&${newRoles[i]}>`; 199 | } 200 | } 201 | let roleremoved = ""; 202 | if (oldRoles.length > 0) { 203 | for (let i = 0; i < oldRoles.length; i++) { 204 | if (i > 0) roleremoved += ", "; 205 | roleremoved += `<@&${oldRoles[i]}>`; 206 | } 207 | } 208 | let text = `${roleremoved ? `❌ ROLE REMOVED: \n${roleremoved}` : ""}${ 209 | roleadded ? `✅ ROLE ADDED:\n${roleadded}` : "" 210 | }`; 211 | send_log( 212 | c, 213 | oldMember.guild, 214 | `${roleadded ? "GREEN" : "RED"}`, 215 | "Member ROLES Changed", 216 | `Member: ${newMember.user}\nUser: \`${oldMember.user.tag}\`\n\n${text}` 217 | ); 218 | } 219 | }); 220 | 221 | c.on("messageDelete", function(message) { 222 | if (message.author.bot) return; 223 | 224 | if (message.channel.type !== "text") return; 225 | 226 | send_log( 227 | c, 228 | message.guild, 229 | "ORANGE", 230 | "Message Deleted", 231 | ` 232 | **Author : ** <@${message.author.id}> - *${message.author.tag}* 233 | **Date : ** ${message.createdAt} 234 | **Channel : ** <#${message.channel.id}> - *${message.channel.name}* 235 | **Deleted Message : ** 236 | \`\`\` 237 | ${message.content.replace(/`/g, "'")} 238 | \`\`\` 239 | **Attachment URL : ** 240 | ${message.attachments.map(x => x.proxyURL)} 241 | ` 242 | ); 243 | }); 244 | 245 | c.on("messageDeleteBulk", function(messages) { 246 | send_log( 247 | c, 248 | messages.guild, 249 | "RED", 250 | messages.length + " Message Deleted BULK", 251 | `${messages.length} Messages delete in: ${messages.channel}` 252 | ); 253 | }); 254 | 255 | c.on("messageUpdate", function(oldMessage, newMessage) { 256 | if (oldMessage.author.bot) return; 257 | 258 | if (oldMessage.channel.type !== "text") return; 259 | if (newMessage.channel.type !== "text") return; 260 | 261 | if (oldMessage.content === newMessage.content) return; 262 | send_log( 263 | c, 264 | oldMessage.guild, 265 | "YELLOW", 266 | "Message UPDATED", 267 | ` 268 | **Author : ** <@${newMessage.member.user.id}> - *${newMessage.member.user.tag}* 269 | **Date : ** ${newMessage.createdAt} 270 | **Channel : ** <#${newMessage.channel.id}> - *${newMessage.channel.name}* 271 | **Orignal Message : ** 272 | \`\`\` 273 | ${oldMessage.content.replace(/`/g, "'")} 274 | \`\`\` 275 | **Updated Message : ** 276 | \`\`\` 277 | ${newMessage.content.replace(/`/g, "'")} 278 | \`\`\`` 279 | ); 280 | }); 281 | 282 | c.on("roleCreate", function(role) { 283 | send_log( 284 | c, 285 | role.guild, 286 | "GREEN", 287 | "ROLE CREATED"`ROLE: ${role}\nROLENAME: ${role.name}\nROLEID: ${role.id}\nHEXCOLOR: ${role.hexColor}\nPOSITION: ${role.position}` 288 | ); 289 | }); 290 | 291 | c.on("roleDelete", function(role) { 292 | send_log( 293 | c, 294 | role.guild, 295 | "RED", 296 | "ROLE DELETED"`ROLE: ${role}\nROLENAME: ${role.name}\nROLEID: ${role.id}\nHEXCOLOR: ${role.hexColor}\nPOSITION: ${role.position}` 297 | ); 298 | }); 299 | 300 | c.on("roleUpdate", function(oldRole, newRole) { 301 | let perms = { 302 | "1": "CREATE_INSTANT_INVITE", 303 | "2": "KICK_MEMBERS", 304 | "4": "BAN_MEMBERS", 305 | "8": "ADMINISTRATOR", 306 | "16": "MANAGE_CHANNELS", 307 | "32": "MANAGE_GUILD", 308 | "64": "ADD_REACTIONS", 309 | "128": "VIEW_AUDIT_LOG", 310 | "256": "PRIORITY_SPEAKER", 311 | "1024": "VIEW_CHANNEL", 312 | "1024": "READ_MESSAGES", 313 | "2048": "SEND_MESSAGES", 314 | "4096": "SEND_TTS_MESSAGES", 315 | "8192": "MANAGE_MESSAGES", 316 | "16384": "EMBED_LINKS", 317 | "32768": "ATTACH_FILES", 318 | "65536": "READ_MESSAGE_HISTORY", 319 | "131072": "MENTION_EVERYONE", 320 | "262144": "EXTERNAL_EMOJIS", 321 | "262144": "USE_EXTERNAL_EMOJIS", 322 | "1048576": "CONNECT", 323 | "2097152": "SPEAK", 324 | "4194304": "MUTE_MEMBERS", 325 | "8388608": "DEAFEN_MEMBERS", 326 | "16777216": "MOVE_MEMBERS", 327 | "33554432": "USE_VAD", 328 | "67108864": "CHANGE_NICKNAME", 329 | "134217728": "MANAGE_NICKNAMES", 330 | "268435456": "MANAGE_ROLES", 331 | "268435456": "MANAGE_ROLES_OR_PERMISSIONS", 332 | "536870912": "MANAGE_WEBHOOKS", 333 | "1073741824 ": "MANAGE_EMOJIS", 334 | CREATE_INSTANT_INVITE: "CREATE_INSTANT_INVITE", 335 | KICK_MEMBERS: "KICK_MEMBERS", 336 | BAN_MEMBERS: "BAN_MEMBERS", 337 | ADMINISTRATOR: "ADMINISTRATOR", 338 | MANAGE_CHANNELS: "MANAGE_CHANNELS", 339 | MANAGE_GUILD: "MANAGE_GUILD", 340 | ADD_REACTIONS: "ADD_REACTIONS", 341 | VIEW_AUDIT_LOG: "VIEW_AUDIT_LOG", 342 | PRIORITY_SPEAKER: "PRIORITY_SPEAKER", 343 | VIEW_CHANNEL: "VIEW_CHANNEL", 344 | READ_MESSAGES: "READ_MESSAGES", 345 | SEND_MESSAGES: "SEND_MESSAGES", 346 | SEND_TTS_MESSAGES: "SEND_TTS_MESSAGES", 347 | MANAGE_MESSAGES: "MANAGE_MESSAGES", 348 | EMBED_LINKS: "EMBED_LINKS", 349 | ATTACH_FILES: "ATTACH_FILES", 350 | READ_MESSAGE_HISTORY: "READ_MESSAGE_HISTORY", 351 | MENTION_EVERYONE: "MENTION_EVERYONE", 352 | EXTERNAL_EMOJIS: "EXTERNAL_EMOJIS", 353 | USE_EXTERNAL_EMOJIS: "USE_EXTERNAL_EMOJIS", 354 | CONNECT: "CONNECT", 355 | SPEAK: "SPEAK", 356 | MUTE_MEMBERS: "MUTE_MEMBERS", 357 | DEAFEN_MEMBERS: "DEAFEN_MEMBERS", 358 | MOVE_MEMBERS: "MOVE_MEMBERS", 359 | USE_VAD: "USE_VAD", 360 | CHANGE_NICKNAME: "CHANGE_NICKNAME", 361 | MANAGE_NICKNAMES: "MANAGE_NICKNAMES", 362 | MANAGE_ROLES: "MANAGE_ROLES", 363 | MANAGE_ROLES_OR_PERMISSIONS: "MANAGE_ROLES_OR_PERMISSIONS", 364 | MANAGE_WEBHOOKS: "MANAGE_WEBHOOKS", 365 | MANAGE_EMOJIS: "MANAGE_EMOJIS" 366 | }; 367 | if (oldRole.name !== newRole.name) { 368 | send_log( 369 | c, 370 | oldRole.guild, 371 | "ORANGE", 372 | "ROLE NAME CHANGED", 373 | `__ROLE: ${oldRole}__ \n\n**Before:** \`${oldRole.name}\` 374 | **After:** \`${newRole.name}\` 375 | **Role ID:** \`${newRole.id}\` 376 | ` 377 | ); 378 | } else if (oldRole.color !== newRole.color) { 379 | send_log( 380 | c, 381 | oldRole.guild, 382 | "ORANGE", 383 | "ROLE COLOR CHANGED", 384 | `__ROLE: ${newRole}__ \n\n**Before:** \`${oldRole.color.toString( 385 | 16 386 | )}\` 387 | **After:** \`${newRole.color.toString(16)}\` 388 | **ROLE ID:** \`${newRole.id}\`` 389 | ); 390 | } else { 391 | send_log( 392 | c, 393 | oldRole.guild, 394 | "RED", 395 | "ROLE PERMISSIONS CHANGED", 396 | `__ROLE: ${newRole}__ \n 397 | **THE PERMISSIONS CHANGED PLEASE CHECK!!!** 398 | OLD PERMISSIONS: ${ 399 | /*perms[String(oldRole.permissions.bitfield)]*/ oldRole.permissions 400 | .bitfield 401 | } 402 | NEW PERMISSIONS: ${ 403 | /*perms[String(newRole.permissions.bitfield)]*/ newRole.permissions 404 | .bitfield 405 | } 406 | **Role ID:** \`${newRole.id}\`` 407 | ); 408 | } 409 | }); 410 | 411 | c.on("userUpdate", function(oldUser, newUser) { 412 | if (oldUser.username !== newUser.username) { 413 | send_log( 414 | newUser.guild, 415 | c, 416 | "BLACK", 417 | "Member Username Changed", 418 | `Member: ${newUser}\nOld Username: \`${oldUser.username}\`\nNew Username: \`${newUser.username}\` ` 419 | ); 420 | } 421 | }); 422 | } catch (e) { 423 | console.log(String(e.stack).yellow); 424 | } 425 | }; 426 | 427 | async function send_log(c, guild, color, title, description, thumb) { 428 | try { 429 | //CREATE THE EMBED 430 | const LogEmbed = new Discord.MessageEmbed() 431 | .setColor(color ? color : "BLACK") 432 | .setDescription(description ? description.substr(0, 2048) : "\u200b") 433 | .setTitle(title ? title.substr(0, 256) : "\u200b") 434 | .setTimestamp() 435 | .setThumbnail(thumb ? thumb : guild.iconURL({ format: "png" })) 436 | .setFooter( 437 | guild.name + " | powered by: milrato.eu & Modified by ShinchanOP", 438 | guild.iconURL({ format: "png" }) 439 | ); 440 | //GET THE CHANNEL 441 | const guilddb = await Guild.findOne( 442 | { 443 | guildID: guild.id 444 | }, 445 | (err, guild) => { 446 | if (err) console.error(err); 447 | } 448 | ); 449 | if (!guilddb) return; 450 | const ch = guilddb.logChannelID; 451 | const logger = await c.channels.fetch(ch); 452 | if (!logger) throw new SyntaxError("CHANNEL NOT FOUND"); 453 | 454 | try { 455 | const hook = new Discord.WebhookClient( 456 | guilddb.webhookid, 457 | guilddb.webhooktoken 458 | ); 459 | hook.send({ 460 | username: guild.name, 461 | avatarURL: guild.iconURL({ format: "png" }), 462 | embeds: [LogEmbed] 463 | }); 464 | } catch { 465 | return; 466 | } 467 | } catch (e) { 468 | console.log(e); 469 | } 470 | } 471 | -------------------------------------------------------------------------------- /models/log.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | const logSchema = mongoose.Schema({ 4 | _id: mongoose.Schema.Types.ObjectId, 5 | guildID: String, 6 | guildName: String, 7 | logChannelID: String, 8 | webhookid: String, 9 | webhooktoken: String 10 | }); 11 | 12 | module.exports = mongoose.model("Log", logSchema, "log"); 13 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial_test_bot", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "ascii-table": { 8 | "version": "0.0.9", 9 | "resolved": "https://registry.npmjs.org/ascii-table/-/ascii-table-0.0.9.tgz", 10 | "integrity": "sha1-BqZgTWpV1L9BqaR9mHLXp42jHnM=" 11 | }, 12 | "colors": { 13 | "version": "1.4.0", 14 | "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", 15 | "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" 16 | }, 17 | "discord.js": { 18 | "version": "12.5.1", 19 | "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.5.1.tgz", 20 | "integrity": "sha512-VwZkVaUAIOB9mKdca0I5MefPMTQJTNg0qdgi1huF3iwsFwJ0L5s/Y69AQe+iPmjuV6j9rtKoG0Ta0n9vgEIL6w==", 21 | "requires": { 22 | "@discordjs/collection": "^0.1.6", 23 | "@discordjs/form-data": "^3.0.1", 24 | "abort-controller": "^3.0.0", 25 | "node-fetch": "^2.6.1", 26 | "prism-media": "^1.2.2", 27 | "setimmediate": "^1.0.5", 28 | "tweetnacl": "^1.0.3", 29 | "ws": "^7.3.1" 30 | }, 31 | "dependencies": { 32 | "@discordjs/collection": { 33 | "version": "0.1.6", 34 | "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.6.tgz", 35 | "integrity": "sha512-utRNxnd9kSS2qhyivo9lMlt5qgAUasH2gb7BEOn6p0efFh24gjGomHzWKMAPn2hEReOPQZCJaRKoURwRotKucQ==" 36 | }, 37 | "@discordjs/form-data": { 38 | "version": "3.0.1", 39 | "resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz", 40 | "integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==", 41 | "requires": { 42 | "asynckit": "^0.4.0", 43 | "combined-stream": "^1.0.8", 44 | "mime-types": "^2.1.12" 45 | } 46 | }, 47 | "abort-controller": { 48 | "version": "3.0.0", 49 | "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", 50 | "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", 51 | "requires": { 52 | "event-target-shim": "^5.0.0" 53 | } 54 | }, 55 | "asynckit": { 56 | "version": "0.4.0", 57 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 58 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" 59 | }, 60 | "combined-stream": { 61 | "version": "1.0.8", 62 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 63 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 64 | "requires": { 65 | "delayed-stream": "~1.0.0" 66 | } 67 | }, 68 | "delayed-stream": { 69 | "version": "1.0.0", 70 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 71 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" 72 | }, 73 | "event-target-shim": { 74 | "version": "5.0.1", 75 | "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", 76 | "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" 77 | }, 78 | "mime-db": { 79 | "version": "1.46.0", 80 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", 81 | "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==" 82 | }, 83 | "mime-types": { 84 | "version": "2.1.29", 85 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", 86 | "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", 87 | "requires": { 88 | "mime-db": "1.46.0" 89 | } 90 | }, 91 | "node-fetch": { 92 | "version": "2.6.1", 93 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", 94 | "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" 95 | }, 96 | "prism-media": { 97 | "version": "1.2.7", 98 | "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.2.7.tgz", 99 | "integrity": "sha512-thS1z3L6BDmf724sqLC73bHGjSYArFTYHa7cqInyS3EdDNTHKgDCXy7l+IhRvlnX7aFNiUb8jJcC+R8ezxwgMA==" 100 | }, 101 | "setimmediate": { 102 | "version": "1.0.5", 103 | "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", 104 | "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" 105 | }, 106 | "tweetnacl": { 107 | "version": "1.0.3", 108 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", 109 | "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" 110 | }, 111 | "ws": { 112 | "version": "7.4.3", 113 | "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.3.tgz", 114 | "integrity": "sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA==" 115 | } 116 | } 117 | }, 118 | "mongoose": { 119 | "version": "5.11.17", 120 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.11.17.tgz", 121 | "integrity": "sha512-qggwwv+oTsjvlto9fhq17l2Mojl5Gn8GN7NxnaLjsZbjT4O5ONtKtGtymHZ23viGrlHn6rNFMJEnEql2G6tyrg==", 122 | "requires": { 123 | "@types/mongodb": "^3.5.27", 124 | "bson": "^1.1.4", 125 | "kareem": "2.3.2", 126 | "mongodb": "3.6.4", 127 | "mongoose-legacy-pluralize": "1.0.2", 128 | "mpath": "0.8.3", 129 | "mquery": "3.2.4", 130 | "ms": "2.1.2", 131 | "regexp-clone": "1.0.0", 132 | "safe-buffer": "5.2.1", 133 | "sift": "7.0.1", 134 | "sliced": "1.0.1" 135 | }, 136 | "dependencies": { 137 | "@types/bson": { 138 | "version": "4.0.3", 139 | "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.3.tgz", 140 | "integrity": "sha512-mVRvYnTOZJz3ccpxhr3wgxVmSeiYinW+zlzQz3SXWaJmD1DuL05Jeq7nKw3SnbKmbleW5qrLG5vdyWe/A9sXhw==", 141 | "requires": { 142 | "@types/node": "*" 143 | } 144 | }, 145 | "@types/mongodb": { 146 | "version": "3.6.8", 147 | "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.8.tgz", 148 | "integrity": "sha512-8qNbL5/GFrljXc/QijcuQcUMYZ1iWNcqnJ6tneROwbfU0LsAjQ9bmq3aHi5lWXM4cyBPd2F/n9INAk/pZZttHw==", 149 | "requires": { 150 | "@types/bson": "*", 151 | "@types/node": "*" 152 | } 153 | }, 154 | "@types/node": { 155 | "version": "14.14.31", 156 | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.31.tgz", 157 | "integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==" 158 | }, 159 | "bl": { 160 | "version": "2.2.1", 161 | "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", 162 | "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", 163 | "requires": { 164 | "readable-stream": "^2.3.5", 165 | "safe-buffer": "^5.1.1" 166 | } 167 | }, 168 | "bluebird": { 169 | "version": "3.5.1", 170 | "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", 171 | "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" 172 | }, 173 | "bson": { 174 | "version": "1.1.5", 175 | "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.5.tgz", 176 | "integrity": "sha512-kDuEzldR21lHciPQAIulLs1LZlCXdLziXI6Mb/TDkwXhb//UORJNPXgcRs2CuO4H0DcMkpfT3/ySsP3unoZjBg==" 177 | }, 178 | "core-util-is": { 179 | "version": "1.0.2", 180 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 181 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 182 | }, 183 | "debug": { 184 | "version": "3.1.0", 185 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 186 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 187 | "requires": { 188 | "ms": "2.0.0" 189 | }, 190 | "dependencies": { 191 | "ms": { 192 | "version": "2.0.0", 193 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 194 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 195 | } 196 | } 197 | }, 198 | "denque": { 199 | "version": "1.5.0", 200 | "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz", 201 | "integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==" 202 | }, 203 | "inherits": { 204 | "version": "2.0.4", 205 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 206 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 207 | }, 208 | "isarray": { 209 | "version": "1.0.0", 210 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 211 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 212 | }, 213 | "kareem": { 214 | "version": "2.3.2", 215 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz", 216 | "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ==" 217 | }, 218 | "memory-pager": { 219 | "version": "1.5.0", 220 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", 221 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", 222 | "optional": true 223 | }, 224 | "mongodb": { 225 | "version": "3.6.4", 226 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.4.tgz", 227 | "integrity": "sha512-Y+Ki9iXE9jI+n9bVtbTOOdK0B95d6wVGSucwtBkvQ+HIvVdTCfpVRp01FDC24uhC/Q2WXQ8Lpq3/zwtB5Op9Qw==", 228 | "requires": { 229 | "bl": "^2.2.1", 230 | "bson": "^1.1.4", 231 | "denque": "^1.4.1", 232 | "require_optional": "^1.0.1", 233 | "safe-buffer": "^5.1.2", 234 | "saslprep": "^1.0.0" 235 | } 236 | }, 237 | "mongoose-legacy-pluralize": { 238 | "version": "1.0.2", 239 | "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", 240 | "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" 241 | }, 242 | "mpath": { 243 | "version": "0.8.3", 244 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.3.tgz", 245 | "integrity": "sha512-eb9rRvhDltXVNL6Fxd2zM9D4vKBxjVVQNLNijlj7uoXUy19zNDsIif5zR+pWmPCWNKwAtqyo4JveQm4nfD5+eA==" 246 | }, 247 | "mquery": { 248 | "version": "3.2.4", 249 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.4.tgz", 250 | "integrity": "sha512-uOLpp7iRX0BV1Uu6YpsqJ5b42LwYnmu0WeF/f8qgD/On3g0XDaQM6pfn0m6UxO6SM8DioZ9Bk6xxbWIGHm2zHg==", 251 | "requires": { 252 | "bluebird": "3.5.1", 253 | "debug": "3.1.0", 254 | "regexp-clone": "^1.0.0", 255 | "safe-buffer": "5.1.2", 256 | "sliced": "1.0.1" 257 | }, 258 | "dependencies": { 259 | "safe-buffer": { 260 | "version": "5.1.2", 261 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 262 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 263 | } 264 | } 265 | }, 266 | "ms": { 267 | "version": "2.1.2", 268 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 269 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 270 | }, 271 | "process-nextick-args": { 272 | "version": "2.0.1", 273 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 274 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" 275 | }, 276 | "readable-stream": { 277 | "version": "2.3.7", 278 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", 279 | "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", 280 | "requires": { 281 | "core-util-is": "~1.0.0", 282 | "inherits": "~2.0.3", 283 | "isarray": "~1.0.0", 284 | "process-nextick-args": "~2.0.0", 285 | "safe-buffer": "~5.1.1", 286 | "string_decoder": "~1.1.1", 287 | "util-deprecate": "~1.0.1" 288 | }, 289 | "dependencies": { 290 | "safe-buffer": { 291 | "version": "5.1.2", 292 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 293 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 294 | } 295 | } 296 | }, 297 | "regexp-clone": { 298 | "version": "1.0.0", 299 | "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", 300 | "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" 301 | }, 302 | "require_optional": { 303 | "version": "1.0.1", 304 | "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", 305 | "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", 306 | "requires": { 307 | "resolve-from": "^2.0.0", 308 | "semver": "^5.1.0" 309 | } 310 | }, 311 | "resolve-from": { 312 | "version": "2.0.0", 313 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", 314 | "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" 315 | }, 316 | "safe-buffer": { 317 | "version": "5.2.1", 318 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 319 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" 320 | }, 321 | "saslprep": { 322 | "version": "1.0.3", 323 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", 324 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", 325 | "optional": true, 326 | "requires": { 327 | "sparse-bitfield": "^3.0.3" 328 | } 329 | }, 330 | "semver": { 331 | "version": "5.7.1", 332 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 333 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" 334 | }, 335 | "sift": { 336 | "version": "7.0.1", 337 | "resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz", 338 | "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==" 339 | }, 340 | "sliced": { 341 | "version": "1.0.1", 342 | "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", 343 | "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" 344 | }, 345 | "sparse-bitfield": { 346 | "version": "3.0.3", 347 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", 348 | "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", 349 | "optional": true, 350 | "requires": { 351 | "memory-pager": "^1.0.2" 352 | } 353 | }, 354 | "string_decoder": { 355 | "version": "1.1.1", 356 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 357 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 358 | "requires": { 359 | "safe-buffer": "~5.1.0" 360 | }, 361 | "dependencies": { 362 | "safe-buffer": { 363 | "version": "5.1.2", 364 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 365 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 366 | } 367 | } 368 | }, 369 | "util-deprecate": { 370 | "version": "1.0.2", 371 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 372 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 373 | } 374 | } 375 | } 376 | } 377 | } 378 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial_test_bot", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "dependencies": { 6 | "colors": "^1.4.0", 7 | "ascii-table": "^0.0.9", 8 | "mongoose": "^5.9.15", 9 | "discord.js": "^12.5.1" 10 | }, 11 | "engines": { 12 | "node": "12.x" 13 | }, 14 | "devDependencies": {}, 15 | "scripts": { 16 | "test": "echo \"Error: no test specified\" && exit 1", 17 | "start": "node index.js" 18 | }, 19 | "author": "", 20 | "license": "ISC", 21 | "description": "" 22 | } 23 | --------------------------------------------------------------------------------