├── .env ├── .github ├── FUNDING.yml └── workflows │ └── codeql.yml ├── .replit ├── CHANGELOG.md ├── LICENSE ├── README.md ├── json.sqlite ├── package-lock.json ├── package.json └── src ├── bot ├── commands │ ├── add.js │ ├── close.js │ ├── help.js │ ├── open.js │ ├── ping.js │ ├── prefix.js │ ├── remove.js │ ├── rename.js │ └── setup.js └── events │ ├── clickButton.js │ ├── message.js │ └── ready.js ├── config └── bot.js └── index.js /.env: -------------------------------------------------------------------------------- 1 | TOKEN= 2 | PREFIX= 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: gaurishhs 2 | ko_fi: gaurishhs 3 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ "main" ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ "main" ] 20 | schedule: 21 | - cron: '28 0 * * 2' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'javascript' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 37 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v3 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v2 46 | with: 47 | languages: ${{ matrix.language }} 48 | # If you wish to specify custom queries, you can do so here or in a config file. 49 | # By default, queries listed here will override any specified in a config file. 50 | # Prefix the list here with "+" to use these queries and those in the config file. 51 | 52 | # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 53 | # queries: security-extended,security-and-quality 54 | 55 | 56 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 57 | # If this step fails, then you should remove it and run the build manually (see below) 58 | - name: Autobuild 59 | uses: github/codeql-action/autobuild@v2 60 | 61 | # ℹ️ Command-line programs to run using the OS shell. 62 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun 63 | 64 | # If the Autobuild fails above, remove it and uncomment the following three lines. 65 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. 66 | 67 | # - run: | 68 | # echo "Run, Build Application using script" 69 | # ./location_of_script_within_repo/buildscript.sh 70 | 71 | - name: Perform CodeQL Analysis 72 | uses: github/codeql-action/analyze@v2 73 | -------------------------------------------------------------------------------- /.replit: -------------------------------------------------------------------------------- 1 | language = "nodejs" 2 | run = "npm start" -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | Based on KeepAChangelog. 4 | Generated by **Documatic.** 5 | 6 | ## Unreleased 7 | 8 | ### Changed 9 | 10 | * Readme.md 11 | 12 | ## 1.0.0 - 2021-07-12 13 | 14 | ### Added 15 | 16 | * A user to a ticket feature 17 | * close a ticket feature 18 | * help command feature 19 | * open a ticket feature 20 | * ping command 21 | * prefix command per Guild 22 | * remove person from ticket feature 23 | * rename ticket feature 24 | * setup ticket feature 25 | * application config 26 | * Package.json 27 | * Fork/remix buttons 28 | 29 | ### Changed 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 apidev234 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ButtonTickets 2 | A Discord Tickets Bot With Buttons Just Like Ticket Tool! 3 | - If you like this project, Please star the repository, Really helps me a lot + gives me motivation to code more such things. 4 | 5 | > Update: Thanks for the support, I do not plan to update this as i'm working on other tons of projects. 6 | 7 | # Features 8 | - Setup [ Reaction Tickets ] 9 | - Open 10 | - Close 11 | - Add 12 | - Remove 13 | - Rename 14 | - Close 15 | - Reopen 16 | - Per Server Prefix 17 | - Ping Command 18 | 19 | ## Self-Hosting 20 | - You're Free To Host This Bot Till You Give Credits 21 | 22 | [![Deploy on Repl.it](https://repl.it/badge/github/ShinchanPlayZ/AdvancedWelcomer)](https://replit.com/github/apidev234/ButtonTickets) 23 | [![Remix on Glitch](https://cdn.glitch.com/2703baf2-b643-4da7-ab91-7ee2a2d00b5b%2Fremix-button.svg)](https://glitch.com/edit/#!/import/github/apidev234/ButtonTickets) 24 | ## How To Host 25 | - Install dependencies 26 | - Add credentials in .env 27 | - Once Dependencies Are Installed Run `npm start` To Start The Bot 28 | 29 | # License 30 | > This Project is Licensed Under MIT License 31 | > Read [Here](https://github.com/apidev234/ButtonTickets/blob/main/LICENSE) For More Information 32 | - Don't Be a Dumbo Give Credits 33 | -------------------------------------------------------------------------------- /json.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaurishhs/ButtonTickets/24687057b4325549c401e9f412f852ee03f41cc3/json.sqlite -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ButtonTickets", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@discordjs/collection": { 8 | "version": "0.1.6", 9 | "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.6.tgz", 10 | "integrity": "sha512-utRNxnd9kSS2qhyivo9lMlt5qgAUasH2gb7BEOn6p0efFh24gjGomHzWKMAPn2hEReOPQZCJaRKoURwRotKucQ==" 11 | }, 12 | "@discordjs/form-data": { 13 | "version": "3.0.1", 14 | "resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz", 15 | "integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==", 16 | "requires": { 17 | "asynckit": "^0.4.0", 18 | "combined-stream": "^1.0.8", 19 | "mime-types": "^2.1.12" 20 | } 21 | }, 22 | "abort-controller": { 23 | "version": "3.0.0", 24 | "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", 25 | "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", 26 | "requires": { 27 | "event-target-shim": "^5.0.0" 28 | } 29 | }, 30 | "accepts": { 31 | "version": "1.3.7", 32 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", 33 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", 34 | "requires": { 35 | "mime-types": "~2.1.24", 36 | "negotiator": "0.6.2" 37 | } 38 | }, 39 | "ansi-regex": { 40 | "version": "2.1.1", 41 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 42 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" 43 | }, 44 | "ansi-styles": { 45 | "version": "4.3.0", 46 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 47 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 48 | "requires": { 49 | "color-convert": "^2.0.1" 50 | } 51 | }, 52 | "aproba": { 53 | "version": "1.2.0", 54 | "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", 55 | "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" 56 | }, 57 | "are-we-there-yet": { 58 | "version": "1.1.5", 59 | "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", 60 | "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", 61 | "requires": { 62 | "delegates": "^1.0.0", 63 | "readable-stream": "^2.0.6" 64 | } 65 | }, 66 | "array-flatten": { 67 | "version": "1.1.1", 68 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 69 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 70 | }, 71 | "asynckit": { 72 | "version": "0.4.0", 73 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 74 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" 75 | }, 76 | "base64-js": { 77 | "version": "1.5.1", 78 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 79 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" 80 | }, 81 | "better-sqlite3": { 82 | "version": "7.4.1", 83 | "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-7.4.1.tgz", 84 | "integrity": "sha512-sk1kW3PsWE7W7G9qbi5TQxCROlQVR8YWlp4srbyrwN5DrLeamKfrm3JExwOiNSAYyJv8cw5/2HOfvF/ipZj4qg==", 85 | "requires": { 86 | "bindings": "^1.5.0", 87 | "prebuild-install": "^6.0.1", 88 | "tar": "^6.1.0" 89 | } 90 | }, 91 | "bindings": { 92 | "version": "1.5.0", 93 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", 94 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", 95 | "requires": { 96 | "file-uri-to-path": "1.0.0" 97 | } 98 | }, 99 | "bl": { 100 | "version": "4.1.0", 101 | "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", 102 | "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", 103 | "requires": { 104 | "buffer": "^5.5.0", 105 | "inherits": "^2.0.4", 106 | "readable-stream": "^3.4.0" 107 | }, 108 | "dependencies": { 109 | "inherits": { 110 | "version": "2.0.4", 111 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 112 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 113 | }, 114 | "readable-stream": { 115 | "version": "3.6.0", 116 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 117 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 118 | "requires": { 119 | "inherits": "^2.0.3", 120 | "string_decoder": "^1.1.1", 121 | "util-deprecate": "^1.0.1" 122 | } 123 | } 124 | } 125 | }, 126 | "body-parser": { 127 | "version": "1.19.0", 128 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", 129 | "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", 130 | "requires": { 131 | "bytes": "3.1.0", 132 | "content-type": "~1.0.4", 133 | "debug": "2.6.9", 134 | "depd": "~1.1.2", 135 | "http-errors": "1.7.2", 136 | "iconv-lite": "0.4.24", 137 | "on-finished": "~2.3.0", 138 | "qs": "6.7.0", 139 | "raw-body": "2.4.0", 140 | "type-is": "~1.6.17" 141 | } 142 | }, 143 | "buffer": { 144 | "version": "5.7.1", 145 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", 146 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", 147 | "requires": { 148 | "base64-js": "^1.3.1", 149 | "ieee754": "^1.1.13" 150 | } 151 | }, 152 | "bytes": { 153 | "version": "3.1.0", 154 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", 155 | "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" 156 | }, 157 | "chalk": { 158 | "version": "4.1.1", 159 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", 160 | "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", 161 | "requires": { 162 | "ansi-styles": "^4.1.0", 163 | "supports-color": "^7.1.0" 164 | } 165 | }, 166 | "chownr": { 167 | "version": "1.1.4", 168 | "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", 169 | "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" 170 | }, 171 | "code-point-at": { 172 | "version": "1.1.0", 173 | "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", 174 | "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" 175 | }, 176 | "color-convert": { 177 | "version": "2.0.1", 178 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 179 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 180 | "requires": { 181 | "color-name": "~1.1.4" 182 | } 183 | }, 184 | "color-name": { 185 | "version": "1.1.4", 186 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 187 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 188 | }, 189 | "combined-stream": { 190 | "version": "1.0.8", 191 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 192 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 193 | "requires": { 194 | "delayed-stream": "~1.0.0" 195 | } 196 | }, 197 | "console-control-strings": { 198 | "version": "1.1.0", 199 | "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", 200 | "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" 201 | }, 202 | "content-disposition": { 203 | "version": "0.5.3", 204 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", 205 | "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", 206 | "requires": { 207 | "safe-buffer": "5.1.2" 208 | } 209 | }, 210 | "content-type": { 211 | "version": "1.0.4", 212 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 213 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" 214 | }, 215 | "cookie": { 216 | "version": "0.4.0", 217 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", 218 | "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" 219 | }, 220 | "cookie-signature": { 221 | "version": "1.0.6", 222 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 223 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 224 | }, 225 | "core-util-is": { 226 | "version": "1.0.2", 227 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 228 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 229 | }, 230 | "debug": { 231 | "version": "2.6.9", 232 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 233 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 234 | "requires": { 235 | "ms": "2.0.0" 236 | } 237 | }, 238 | "decompress-response": { 239 | "version": "4.2.1", 240 | "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", 241 | "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", 242 | "requires": { 243 | "mimic-response": "^2.0.0" 244 | } 245 | }, 246 | "deep-extend": { 247 | "version": "0.6.0", 248 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", 249 | "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" 250 | }, 251 | "delayed-stream": { 252 | "version": "1.0.0", 253 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 254 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" 255 | }, 256 | "delegates": { 257 | "version": "1.0.0", 258 | "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", 259 | "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" 260 | }, 261 | "depd": { 262 | "version": "1.1.2", 263 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 264 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" 265 | }, 266 | "destroy": { 267 | "version": "1.0.4", 268 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 269 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 270 | }, 271 | "detect-libc": { 272 | "version": "1.0.3", 273 | "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", 274 | "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" 275 | }, 276 | "discord-buttons": { 277 | "version": "4.0.0", 278 | "resolved": "https://registry.npmjs.org/discord-buttons/-/discord-buttons-4.0.0.tgz", 279 | "integrity": "sha512-E/eQX4Ktj7nKwNDsTfCezBNCu73FtPWJfQcpKohfl0jct/ucMUO+7uhL2MhGsZr4SCfojk7OzccAznuntB564w==" 280 | }, 281 | "discord.js": { 282 | "version": "12.5.3", 283 | "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.5.3.tgz", 284 | "integrity": "sha512-D3nkOa/pCkNyn6jLZnAiJApw2N9XrIsXUAdThf01i7yrEuqUmDGc7/CexVWwEcgbQR97XQ+mcnqJpmJ/92B4Aw==", 285 | "requires": { 286 | "@discordjs/collection": "^0.1.6", 287 | "@discordjs/form-data": "^3.0.1", 288 | "abort-controller": "^3.0.0", 289 | "node-fetch": "^2.6.1", 290 | "prism-media": "^1.2.9", 291 | "setimmediate": "^1.0.5", 292 | "tweetnacl": "^1.0.3", 293 | "ws": "^7.4.4" 294 | } 295 | }, 296 | "dotenv": { 297 | "version": "10.0.0", 298 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", 299 | "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==" 300 | }, 301 | "ee-first": { 302 | "version": "1.1.1", 303 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 304 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" 305 | }, 306 | "encodeurl": { 307 | "version": "1.0.2", 308 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 309 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" 310 | }, 311 | "end-of-stream": { 312 | "version": "1.4.4", 313 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 314 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 315 | "requires": { 316 | "once": "^1.4.0" 317 | } 318 | }, 319 | "escape-html": { 320 | "version": "1.0.3", 321 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 322 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 323 | }, 324 | "etag": { 325 | "version": "1.8.1", 326 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 327 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" 328 | }, 329 | "event-target-shim": { 330 | "version": "5.0.1", 331 | "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", 332 | "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" 333 | }, 334 | "expand-template": { 335 | "version": "2.0.3", 336 | "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", 337 | "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" 338 | }, 339 | "express": { 340 | "version": "4.17.1", 341 | "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", 342 | "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", 343 | "requires": { 344 | "accepts": "~1.3.7", 345 | "array-flatten": "1.1.1", 346 | "body-parser": "1.19.0", 347 | "content-disposition": "0.5.3", 348 | "content-type": "~1.0.4", 349 | "cookie": "0.4.0", 350 | "cookie-signature": "1.0.6", 351 | "debug": "2.6.9", 352 | "depd": "~1.1.2", 353 | "encodeurl": "~1.0.2", 354 | "escape-html": "~1.0.3", 355 | "etag": "~1.8.1", 356 | "finalhandler": "~1.1.2", 357 | "fresh": "0.5.2", 358 | "merge-descriptors": "1.0.1", 359 | "methods": "~1.1.2", 360 | "on-finished": "~2.3.0", 361 | "parseurl": "~1.3.3", 362 | "path-to-regexp": "0.1.7", 363 | "proxy-addr": "~2.0.5", 364 | "qs": "6.7.0", 365 | "range-parser": "~1.2.1", 366 | "safe-buffer": "5.1.2", 367 | "send": "0.17.1", 368 | "serve-static": "1.14.1", 369 | "setprototypeof": "1.1.1", 370 | "statuses": "~1.5.0", 371 | "type-is": "~1.6.18", 372 | "utils-merge": "1.0.1", 373 | "vary": "~1.1.2" 374 | } 375 | }, 376 | "figlet": { 377 | "version": "1.5.0", 378 | "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.5.0.tgz", 379 | "integrity": "sha512-ZQJM4aifMpz6H19AW1VqvZ7l4pOE9p7i/3LyxgO2kp+PO/VcDYNqIHEMtkccqIhTXMKci4kjueJr/iCQEaT/Ww==" 380 | }, 381 | "file-uri-to-path": { 382 | "version": "1.0.0", 383 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", 384 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" 385 | }, 386 | "finalhandler": { 387 | "version": "1.1.2", 388 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", 389 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", 390 | "requires": { 391 | "debug": "2.6.9", 392 | "encodeurl": "~1.0.2", 393 | "escape-html": "~1.0.3", 394 | "on-finished": "~2.3.0", 395 | "parseurl": "~1.3.3", 396 | "statuses": "~1.5.0", 397 | "unpipe": "~1.0.0" 398 | } 399 | }, 400 | "forwarded": { 401 | "version": "0.2.0", 402 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 403 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" 404 | }, 405 | "fresh": { 406 | "version": "0.5.2", 407 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 408 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" 409 | }, 410 | "fs": { 411 | "version": "0.0.1-security", 412 | "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", 413 | "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" 414 | }, 415 | "fs-constants": { 416 | "version": "1.0.0", 417 | "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", 418 | "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" 419 | }, 420 | "fs-minipass": { 421 | "version": "2.1.0", 422 | "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", 423 | "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", 424 | "requires": { 425 | "minipass": "^3.0.0" 426 | } 427 | }, 428 | "gauge": { 429 | "version": "2.7.4", 430 | "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", 431 | "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", 432 | "requires": { 433 | "aproba": "^1.0.3", 434 | "console-control-strings": "^1.0.0", 435 | "has-unicode": "^2.0.0", 436 | "object-assign": "^4.1.0", 437 | "signal-exit": "^3.0.0", 438 | "string-width": "^1.0.1", 439 | "strip-ansi": "^3.0.1", 440 | "wide-align": "^1.1.0" 441 | } 442 | }, 443 | "github-from-package": { 444 | "version": "0.0.0", 445 | "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", 446 | "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" 447 | }, 448 | "has-flag": { 449 | "version": "4.0.0", 450 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 451 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" 452 | }, 453 | "has-unicode": { 454 | "version": "2.0.1", 455 | "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", 456 | "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" 457 | }, 458 | "http-errors": { 459 | "version": "1.7.2", 460 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", 461 | "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", 462 | "requires": { 463 | "depd": "~1.1.2", 464 | "inherits": "2.0.3", 465 | "setprototypeof": "1.1.1", 466 | "statuses": ">= 1.5.0 < 2", 467 | "toidentifier": "1.0.0" 468 | } 469 | }, 470 | "iconv-lite": { 471 | "version": "0.4.24", 472 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 473 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 474 | "requires": { 475 | "safer-buffer": ">= 2.1.2 < 3" 476 | } 477 | }, 478 | "ieee754": { 479 | "version": "1.2.1", 480 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 481 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" 482 | }, 483 | "inherits": { 484 | "version": "2.0.3", 485 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 486 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 487 | }, 488 | "ini": { 489 | "version": "1.3.8", 490 | "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", 491 | "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" 492 | }, 493 | "ipaddr.js": { 494 | "version": "1.9.1", 495 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 496 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" 497 | }, 498 | "is-fullwidth-code-point": { 499 | "version": "1.0.0", 500 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", 501 | "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", 502 | "requires": { 503 | "number-is-nan": "^1.0.0" 504 | } 505 | }, 506 | "isarray": { 507 | "version": "1.0.0", 508 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 509 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 510 | }, 511 | "lodash": { 512 | "version": "4.17.21", 513 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 514 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" 515 | }, 516 | "media-typer": { 517 | "version": "0.3.0", 518 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 519 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" 520 | }, 521 | "merge-descriptors": { 522 | "version": "1.0.1", 523 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 524 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" 525 | }, 526 | "methods": { 527 | "version": "1.1.2", 528 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 529 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" 530 | }, 531 | "mime": { 532 | "version": "1.6.0", 533 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 534 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 535 | }, 536 | "mime-db": { 537 | "version": "1.48.0", 538 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", 539 | "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==" 540 | }, 541 | "mime-types": { 542 | "version": "2.1.31", 543 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", 544 | "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", 545 | "requires": { 546 | "mime-db": "1.48.0" 547 | } 548 | }, 549 | "mimic-response": { 550 | "version": "2.1.0", 551 | "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", 552 | "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==" 553 | }, 554 | "minimist": { 555 | "version": "1.2.5", 556 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 557 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" 558 | }, 559 | "minipass": { 560 | "version": "3.1.3", 561 | "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", 562 | "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", 563 | "requires": { 564 | "yallist": "^4.0.0" 565 | } 566 | }, 567 | "minizlib": { 568 | "version": "2.1.2", 569 | "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", 570 | "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", 571 | "requires": { 572 | "minipass": "^3.0.0", 573 | "yallist": "^4.0.0" 574 | } 575 | }, 576 | "mkdirp": { 577 | "version": "1.0.4", 578 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", 579 | "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" 580 | }, 581 | "mkdirp-classic": { 582 | "version": "0.5.3", 583 | "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", 584 | "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" 585 | }, 586 | "ms": { 587 | "version": "2.0.0", 588 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 589 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 590 | }, 591 | "napi-build-utils": { 592 | "version": "1.0.2", 593 | "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", 594 | "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" 595 | }, 596 | "negotiator": { 597 | "version": "0.6.2", 598 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", 599 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" 600 | }, 601 | "node-abi": { 602 | "version": "2.30.0", 603 | "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.0.tgz", 604 | "integrity": "sha512-g6bZh3YCKQRdwuO/tSZZYJAw622SjsRfJ2X0Iy4sSOHZ34/sPPdVBn8fev2tj7njzLwuqPw9uMtGsGkO5kIQvg==", 605 | "requires": { 606 | "semver": "^5.4.1" 607 | } 608 | }, 609 | "node-fetch": { 610 | "version": "2.6.1", 611 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", 612 | "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" 613 | }, 614 | "npmlog": { 615 | "version": "4.1.2", 616 | "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", 617 | "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", 618 | "requires": { 619 | "are-we-there-yet": "~1.1.2", 620 | "console-control-strings": "~1.1.0", 621 | "gauge": "~2.7.3", 622 | "set-blocking": "~2.0.0" 623 | } 624 | }, 625 | "number-is-nan": { 626 | "version": "1.0.1", 627 | "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", 628 | "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" 629 | }, 630 | "object-assign": { 631 | "version": "4.1.1", 632 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 633 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 634 | }, 635 | "on-finished": { 636 | "version": "2.3.0", 637 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 638 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 639 | "requires": { 640 | "ee-first": "1.1.1" 641 | } 642 | }, 643 | "once": { 644 | "version": "1.4.0", 645 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 646 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 647 | "requires": { 648 | "wrappy": "1" 649 | } 650 | }, 651 | "parseurl": { 652 | "version": "1.3.3", 653 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 654 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 655 | }, 656 | "path-to-regexp": { 657 | "version": "0.1.7", 658 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 659 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" 660 | }, 661 | "prebuild-install": { 662 | "version": "6.1.3", 663 | "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.3.tgz", 664 | "integrity": "sha512-iqqSR84tNYQUQHRXalSKdIaM8Ov1QxOVuBNWI7+BzZWv6Ih9k75wOnH1rGQ9WWTaaLkTpxWKIciOF0KyfM74+Q==", 665 | "requires": { 666 | "detect-libc": "^1.0.3", 667 | "expand-template": "^2.0.3", 668 | "github-from-package": "0.0.0", 669 | "minimist": "^1.2.3", 670 | "mkdirp-classic": "^0.5.3", 671 | "napi-build-utils": "^1.0.1", 672 | "node-abi": "^2.21.0", 673 | "npmlog": "^4.0.1", 674 | "pump": "^3.0.0", 675 | "rc": "^1.2.7", 676 | "simple-get": "^3.0.3", 677 | "tar-fs": "^2.0.0", 678 | "tunnel-agent": "^0.6.0" 679 | } 680 | }, 681 | "prism-media": { 682 | "version": "1.3.1", 683 | "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.3.1.tgz", 684 | "integrity": "sha512-nyYAa3KB4qteJIqdguKmwxTJgy55xxUtkJ3uRnOvO5jO+frci+9zpRXw6QZVcfDeva3S654fU9+26P2OSTzjHw==" 685 | }, 686 | "process-nextick-args": { 687 | "version": "2.0.1", 688 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 689 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" 690 | }, 691 | "proxy-addr": { 692 | "version": "2.0.7", 693 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 694 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 695 | "requires": { 696 | "forwarded": "0.2.0", 697 | "ipaddr.js": "1.9.1" 698 | } 699 | }, 700 | "pump": { 701 | "version": "3.0.0", 702 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", 703 | "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", 704 | "requires": { 705 | "end-of-stream": "^1.1.0", 706 | "once": "^1.3.1" 707 | } 708 | }, 709 | "qs": { 710 | "version": "6.7.0", 711 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", 712 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" 713 | }, 714 | "quick.db": { 715 | "version": "7.1.3", 716 | "resolved": "https://registry.npmjs.org/quick.db/-/quick.db-7.1.3.tgz", 717 | "integrity": "sha512-0S1fVb9OAZGhkI4ZIc5Oe4yWMwhz20xSsziwd6+yGWKKMsPt+XOfj/gD5CesGxd2WdqBkZFBiP8ZqWDu55HLHA==", 718 | "requires": { 719 | "better-sqlite3": "^7.1.1", 720 | "lodash": "^4.17.20" 721 | } 722 | }, 723 | "range-parser": { 724 | "version": "1.2.1", 725 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 726 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" 727 | }, 728 | "raw-body": { 729 | "version": "2.4.0", 730 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", 731 | "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", 732 | "requires": { 733 | "bytes": "3.1.0", 734 | "http-errors": "1.7.2", 735 | "iconv-lite": "0.4.24", 736 | "unpipe": "1.0.0" 737 | } 738 | }, 739 | "rc": { 740 | "version": "1.2.8", 741 | "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", 742 | "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", 743 | "requires": { 744 | "deep-extend": "^0.6.0", 745 | "ini": "~1.3.0", 746 | "minimist": "^1.2.0", 747 | "strip-json-comments": "~2.0.1" 748 | } 749 | }, 750 | "readable-stream": { 751 | "version": "2.3.7", 752 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", 753 | "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", 754 | "requires": { 755 | "core-util-is": "~1.0.0", 756 | "inherits": "~2.0.3", 757 | "isarray": "~1.0.0", 758 | "process-nextick-args": "~2.0.0", 759 | "safe-buffer": "~5.1.1", 760 | "string_decoder": "~1.1.1", 761 | "util-deprecate": "~1.0.1" 762 | } 763 | }, 764 | "safe-buffer": { 765 | "version": "5.1.2", 766 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 767 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 768 | }, 769 | "safer-buffer": { 770 | "version": "2.1.2", 771 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 772 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 773 | }, 774 | "semver": { 775 | "version": "5.7.1", 776 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 777 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" 778 | }, 779 | "send": { 780 | "version": "0.17.1", 781 | "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", 782 | "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", 783 | "requires": { 784 | "debug": "2.6.9", 785 | "depd": "~1.1.2", 786 | "destroy": "~1.0.4", 787 | "encodeurl": "~1.0.2", 788 | "escape-html": "~1.0.3", 789 | "etag": "~1.8.1", 790 | "fresh": "0.5.2", 791 | "http-errors": "~1.7.2", 792 | "mime": "1.6.0", 793 | "ms": "2.1.1", 794 | "on-finished": "~2.3.0", 795 | "range-parser": "~1.2.1", 796 | "statuses": "~1.5.0" 797 | }, 798 | "dependencies": { 799 | "ms": { 800 | "version": "2.1.1", 801 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 802 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 803 | } 804 | } 805 | }, 806 | "serve-static": { 807 | "version": "1.14.1", 808 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", 809 | "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", 810 | "requires": { 811 | "encodeurl": "~1.0.2", 812 | "escape-html": "~1.0.3", 813 | "parseurl": "~1.3.3", 814 | "send": "0.17.1" 815 | } 816 | }, 817 | "set-blocking": { 818 | "version": "2.0.0", 819 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 820 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" 821 | }, 822 | "setimmediate": { 823 | "version": "1.0.5", 824 | "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", 825 | "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" 826 | }, 827 | "setprototypeof": { 828 | "version": "1.1.1", 829 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", 830 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" 831 | }, 832 | "signal-exit": { 833 | "version": "3.0.3", 834 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", 835 | "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" 836 | }, 837 | "simple-concat": { 838 | "version": "1.0.1", 839 | "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", 840 | "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" 841 | }, 842 | "simple-get": { 843 | "version": "3.1.0", 844 | "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", 845 | "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", 846 | "requires": { 847 | "decompress-response": "^4.2.0", 848 | "once": "^1.3.1", 849 | "simple-concat": "^1.0.0" 850 | } 851 | }, 852 | "statuses": { 853 | "version": "1.5.0", 854 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 855 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" 856 | }, 857 | "string-width": { 858 | "version": "1.0.2", 859 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", 860 | "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", 861 | "requires": { 862 | "code-point-at": "^1.0.0", 863 | "is-fullwidth-code-point": "^1.0.0", 864 | "strip-ansi": "^3.0.0" 865 | } 866 | }, 867 | "string_decoder": { 868 | "version": "1.1.1", 869 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 870 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 871 | "requires": { 872 | "safe-buffer": "~5.1.0" 873 | } 874 | }, 875 | "strip-ansi": { 876 | "version": "3.0.1", 877 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 878 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", 879 | "requires": { 880 | "ansi-regex": "^2.0.0" 881 | } 882 | }, 883 | "strip-json-comments": { 884 | "version": "2.0.1", 885 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 886 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" 887 | }, 888 | "supports-color": { 889 | "version": "7.2.0", 890 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 891 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 892 | "requires": { 893 | "has-flag": "^4.0.0" 894 | } 895 | }, 896 | "tar": { 897 | "version": "6.1.0", 898 | "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz", 899 | "integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==", 900 | "requires": { 901 | "chownr": "^2.0.0", 902 | "fs-minipass": "^2.0.0", 903 | "minipass": "^3.0.0", 904 | "minizlib": "^2.1.1", 905 | "mkdirp": "^1.0.3", 906 | "yallist": "^4.0.0" 907 | }, 908 | "dependencies": { 909 | "chownr": { 910 | "version": "2.0.0", 911 | "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", 912 | "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" 913 | } 914 | } 915 | }, 916 | "tar-fs": { 917 | "version": "2.1.1", 918 | "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", 919 | "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", 920 | "requires": { 921 | "chownr": "^1.1.1", 922 | "mkdirp-classic": "^0.5.2", 923 | "pump": "^3.0.0", 924 | "tar-stream": "^2.1.4" 925 | } 926 | }, 927 | "tar-stream": { 928 | "version": "2.2.0", 929 | "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", 930 | "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", 931 | "requires": { 932 | "bl": "^4.0.3", 933 | "end-of-stream": "^1.4.1", 934 | "fs-constants": "^1.0.0", 935 | "inherits": "^2.0.3", 936 | "readable-stream": "^3.1.1" 937 | }, 938 | "dependencies": { 939 | "readable-stream": { 940 | "version": "3.6.0", 941 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 942 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 943 | "requires": { 944 | "inherits": "^2.0.3", 945 | "string_decoder": "^1.1.1", 946 | "util-deprecate": "^1.0.1" 947 | } 948 | } 949 | } 950 | }, 951 | "toidentifier": { 952 | "version": "1.0.0", 953 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", 954 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" 955 | }, 956 | "tunnel-agent": { 957 | "version": "0.6.0", 958 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 959 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", 960 | "requires": { 961 | "safe-buffer": "^5.0.1" 962 | } 963 | }, 964 | "tweetnacl": { 965 | "version": "1.0.3", 966 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", 967 | "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" 968 | }, 969 | "type-is": { 970 | "version": "1.6.18", 971 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 972 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 973 | "requires": { 974 | "media-typer": "0.3.0", 975 | "mime-types": "~2.1.24" 976 | } 977 | }, 978 | "unpipe": { 979 | "version": "1.0.0", 980 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 981 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" 982 | }, 983 | "util-deprecate": { 984 | "version": "1.0.2", 985 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 986 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 987 | }, 988 | "utils-merge": { 989 | "version": "1.0.1", 990 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 991 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" 992 | }, 993 | "vary": { 994 | "version": "1.1.2", 995 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 996 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" 997 | }, 998 | "wide-align": { 999 | "version": "1.1.3", 1000 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", 1001 | "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", 1002 | "requires": { 1003 | "string-width": "^1.0.2 || 2" 1004 | } 1005 | }, 1006 | "wrappy": { 1007 | "version": "1.0.2", 1008 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1009 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 1010 | }, 1011 | "ws": { 1012 | "version": "7.5.3", 1013 | "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", 1014 | "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==" 1015 | }, 1016 | "yallist": { 1017 | "version": "4.0.0", 1018 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 1019 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" 1020 | } 1021 | } 1022 | } 1023 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ButtonTickets", 3 | "version": "1.0.0", 4 | "description": "Discord Tickets Bot With Buttons", 5 | "main": "./src/index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "node ./src/index.js" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/DevelopersSupportAR/8Ticket.git" 13 | }, 14 | "keywords": [ 15 | "button-tickets" 16 | ], 17 | "author": "apidev234", 18 | "license": "MIT", 19 | "bugs": { 20 | "url": "https://github.com/apidev234/ButtonTickets/issues" 21 | }, 22 | "homepage": "https://github.com/apidev234/ButtonTickets", 23 | "dependencies": { 24 | "chalk": "^4.1.1", 25 | "discord-buttons": "^4.0.0", 26 | "discord.js": "^12.5.3", 27 | "dotenv": "^10.0.0", 28 | "express": "^4.17.1", 29 | "figlet": "^1.5.0", 30 | "fs": "0.0.1-security", 31 | "quick.db": "^7.1.3" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/bot/commands/add.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "add", 3 | cooldown: 6, 4 | aliases: ['get-in'], 5 | 6 | run: async function(client, message, args) { 7 | if (!message.channel.name.includes("ticket-")) { 8 | message.channel.send({ 9 | embed: { 10 | title: `**❌ | Error**`, 11 | description: `This is not a ticket channel`, 12 | color: 0xFF0000 13 | } 14 | }).then(async function(msg) { 15 | setTimeout(() => { 16 | msg.delete().catch(err => { return }) 17 | }, 1000 * 7); 18 | }) 19 | return 20 | } 21 | if (!message.member.hasPermission('MANAGE_CHANNELS')) { 22 | message.channel.send({ 23 | embed: { 24 | title: `**❌ | Error**`, 25 | description: `you need same permissions to use this command`, 26 | color: 0xFF0000 27 | } 28 | }).then(async function(msg) { 29 | setTimeout(() => { 30 | msg.delete().catch(err => { return }) 31 | }, 1000 * 7); 32 | }) 33 | return 34 | } 35 | var member = message.mentions.members.first() || 36 | message.guild.members.cache.find(u => u.id == args[0]) || 37 | message.guild.members.cache.find(u => u.user.username == args[0]) || 38 | message.guild.members.cache.find(u => u.nickname == args[0]) || 39 | message.guild.roles.cache.find(r => r.id == args[0]) || 40 | message.guild.roles.cache.find(r => r.name == args[0]) || 41 | message.mentions.roles.first(); 42 | if (!args[0]) { 43 | message.channel.send({ 44 | embed: { 45 | title: `**❌ | Error**`, 46 | description: `you have to specify the role/member you wont to make him join's the ticket!`, 47 | color: 0xFF0000 48 | } 49 | }).then(async function(msg) { 50 | setTimeout(() => { 51 | msg.delete().catch(err => { return }) 52 | }, 1000 * 7); 53 | }) 54 | return 55 | } 56 | var txt; 57 | var mem = member.name; 58 | if (!mem || mem == null || mem == undefined) { 59 | txt = '<@!' + member.id + '>' 60 | } else { 61 | txt = '<@&' + member.id + '> role' 62 | } 63 | message.channel.overwritePermissions([{ 64 | id: require('quick.db').fetch(`TicketControl_${message.channel.id}`), 65 | allow: ['SEND_MESSAGES', 'VIEW_CHANNEL'] 66 | }, { 67 | id: member.id, 68 | allow: ['SEND_MESSAGES', 'VIEW_CHANNEL', 'READ_MESSAGE_HISTORY'] 69 | }, { 70 | id: require('quick.db').fetch(`TicketAdminRole_${message.guild.id}`), 71 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"] 72 | }, { 73 | id: message.guild.roles.everyone, 74 | deny: ["VIEW_CHANNEL"] 75 | }]).then(() => { 76 | message.channel.send({ 77 | embed: { 78 | title: '✅ | Done', 79 | description: `${txt} has been added to this ticket`, 80 | color: 0x00D700 81 | } 82 | }).then(async function(msg) { 83 | setTimeout(() => { 84 | msg.delete().catch(err => { return }) 85 | }, 1000 * 7); 86 | }) 87 | }) 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/bot/commands/close.js: -------------------------------------------------------------------------------- 1 | const { MessageButton, MessageActionRow } = require('discord-buttons'); 2 | 3 | module.exports = { 4 | name: "close", 5 | cooldown: 5, 6 | aliases: ["end"], 7 | 8 | run: async function(client, message, args) { 9 | try { 10 | if (!message.channel.name.includes("ticket-")) { 11 | message.channel.send({ 12 | embed: { 13 | title: `**❌ | Error**`, 14 | description: `This is not a ticket channel`, 15 | color: 0xFF0000 16 | } 17 | }).then(async function(msg) { 18 | setTimeout(() => { 19 | msg.delete().catch(err => { return }) 20 | }, 1000 * 7); 21 | }) 22 | return 23 | } 24 | let btn = new MessageButton() 25 | .setStyle("green") 26 | .setEmoji("✅") 27 | .setID("closeTicketTrue"); 28 | let btn2 = new MessageButton() 29 | .setStyle("grey") 30 | .setEmoji("⛔") 31 | .setID("closeTicketFalse"); 32 | let row = new MessageActionRow() 33 | .addComponent(btn) 34 | .addComponent(btn2); 35 | message.channel.send({ 36 | embed: { 37 | title: `**⚠️ | Confirmation**`, 38 | description: `Are you sure about closing this ticket?`, 39 | color: 0xFFF200 40 | }, 41 | component: row 42 | }).then(async function(msg) { 43 | setTimeout(() => { 44 | msg.delete().catch(err => { return }) 45 | }, 1000 * 7); 46 | require('quick.db').set(`DeleteMessage_${message.channel.id}`, msg.id) 47 | }) 48 | } catch (err) { 49 | return; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/bot/commands/help.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "help", 3 | cooldown: 5, 4 | aliases: ["commands"], 5 | 6 | run: async function(client, message, args) { 7 | try { 8 | message.channel.send({ 9 | embed: { 10 | title: 'Bot Commands', 11 | description: ` 12 | help 13 | setup 14 | open 15 | add 16 | remove 17 | rename 18 | prefix 19 | ping 20 | ` 21 | } 22 | }) 23 | } catch (err) { 24 | return; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/bot/commands/open.js: -------------------------------------------------------------------------------- 1 | const { MessageButton, MessageActionRow } = require('discord-buttons'); 2 | 3 | module.exports = { 4 | name: "close", 5 | cooldown: 5, 6 | aliases: ["end"], 7 | 8 | run: async function(client, message, args) { 9 | try { 10 | var prefix = await require('quick.db').fetch(`prefix_${message.guild.id}`); 11 | if (prefix == null) prefix = require('../../config/bot').prefix; 12 | var nameer = `ticket-${message.author.username}` 13 | var checkTickets = message.guild.channels.cache.find(c => c.name == nameer.split(' ').join('-').toLocaleLowerCase()) 14 | if (checkTickets) { 15 | message.channel.send({ 16 | embed: { 17 | color: 0xFF0000, 18 | title: `**❌ | Error**`, 19 | description: `You already have a ticket open before` 20 | } 21 | }).then(async function(m) { 22 | setTimeout(() => { 23 | m.delete() 24 | }, 1000 * 7); 25 | }) 26 | return 27 | } 28 | var check = require('quick.db').fetch(`TicketAdminRole_${message.guild.id}`); 29 | if (check == null || !check) { 30 | message.channel.send({ 31 | embed: { 32 | color: 0xFF0000, 33 | title: `**❌ | Error**`, 34 | description: `You have to setup the ticket system with this command: \`${prefix}setup\`` 35 | } 36 | }).then(async function(m) { 37 | setTimeout(() => { 38 | m.delete() 39 | }, 1000 * 7); 40 | }) 41 | return 42 | } 43 | let btn = new MessageButton() 44 | .setStyle("green") 45 | .setEmoji("✅") 46 | .setID("createTicketTrue"); 47 | let btn2 = new MessageButton() 48 | .setStyle("grey") 49 | .setEmoji("⛔") 50 | .setID("createTicketFalse"); 51 | let row = new MessageActionRow() 52 | .addComponent(btn) 53 | .addComponent(btn2); 54 | message.channel.send({ 55 | embed: { 56 | title: `**⚠️ | Confirmation**`, 57 | description: `Are you sure about create a new ticket?`, 58 | color: 0xFFF200 59 | }, 60 | component: row 61 | }).then(async function(msg) { 62 | message.react('💌') 63 | setTimeout(() => { 64 | msg.delete().catch(err => { return }) 65 | }, 1000 * 7); 66 | require('quick.db').set(`DeleteOpen_${message.channel.id}`, msg.id) 67 | }) 68 | } catch (err) { 69 | return; 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/bot/commands/ping.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require("discord.js"); 2 | 3 | module.exports = { 4 | name: "ping", 5 | cooldown: 7, 6 | aliases: ["ping"], 7 | run: async(client, message) => { 8 | try { 9 | var states = "🟢 Excellent"; 10 | var states2 = "🟢 Excellent"; 11 | var msg = `${Date.now() - message.createdTimestamp}`; 12 | var api = `${Math.round(client.ws.ping)}`; 13 | if (Number(msg) > 70) states = "🟢 Good"; 14 | if (Number(msg) > 170) states = "🟡 Not Bad"; 15 | if (Number(msg) > 350) states = "🔴 Soo Bad"; 16 | if (Number(api) > 70) states2 = "🟢 Good"; 17 | if (Number(api) > 170) states2 = "🟡 Not Bad"; 18 | if (Number(api) > 350) states2 = "🔴 Soo Bad"; 19 | if (message.author.bot) return; 20 | message.channel.send( 21 | new MessageEmbed() 22 | .setColor("#2F3136") 23 | .setAuthor(message.author.username, message.author.avatarURL()) 24 | .addField("**Time Taken:**", msg + " ms 📶 | " + states, true) 25 | .addField("**WebSocket:**", api + " ms 📶 | " + states2, true) 26 | .setTimestamp() 27 | .setFooter(`Request By ${message.author.tag}`) 28 | ); 29 | } catch (err) { 30 | return; 31 | } 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /src/bot/commands/prefix.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "prefix", 3 | cooldown: 5, 4 | aliases: ["set-prefix"], 5 | 6 | run: async function(client, message, args) { 7 | try { 8 | if (!message.member.hasPermission('ADMINISTRATOR')) { 9 | message.channel.send({ 10 | embed: { 11 | title: `**❌ | Error**`, 12 | description: `you need same permissions to use this command`, 13 | color: 0xFF0000 14 | } 15 | }).then(async function(msg) { 16 | setTimeout(() => { 17 | msg.delete().catch(err => { return }) 18 | }, 1000 * 7); 19 | }) 20 | return 21 | } 22 | var prefix = await require('quick.db').fetch(`prefix_${message.guild.id}`); 23 | if (prefix == null) prefix = require('../../config/bot').prefix; 24 | var newPrefix = args.join(' ') 25 | if (!newPrefix) { 26 | require('quick.db').set(`prefix_${message.guild.id}`, require('../../config/bot').prefix); 27 | message.channel.send({ 28 | embed: { 29 | description: `The bot prefix has rested to **${require('../../config/bot').prefix}**`, 30 | color: 0x00D700 31 | } 32 | }).then(async function(msg) { 33 | setTimeout(() => { 34 | msg.delete().catch(err => { return }) 35 | }, 1000 * 7); 36 | }) 37 | } else if (newPrefix) { 38 | if (newPrefix.length > 7) { 39 | message.channel.send({ 40 | embed: { 41 | color: 0xFF0000, 42 | title: `**❌ | Error**`, 43 | description: `This prefix is to long` 44 | } 45 | }).then(async function(msg) { 46 | setTimeout(() => { 47 | msg.delete().catch(err => { return }) 48 | }, 1000 * 7); 49 | }) 50 | return 51 | } 52 | require('quick.db').set(`prefix_${message.guild.id}`, newPrefix); 53 | message.channel.send({ 54 | embed: { 55 | description: `The bot prefix has changed to **${newPrefix}**`, 56 | color: 0x00D700 57 | } 58 | }) 59 | } 60 | } catch (err) { 61 | return; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/bot/commands/remove.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "remove", 3 | cooldown: 6, 4 | aliases: ['get-out'], 5 | 6 | run: async function(client, message, args) { 7 | if (!message.channel.name.includes("ticket-")) { 8 | message.channel.send({ 9 | embed: { 10 | title: `**❌ | Error**`, 11 | description: `This is not a ticket channel`, 12 | color: 0xFF0000 13 | } 14 | }).then(async function(msg) { 15 | setTimeout(() => { 16 | msg.delete().catch(err => { return }) 17 | }, 1000 * 7); 18 | }) 19 | return 20 | } 21 | if (!message.member.hasPermission('MANAGE_CHANNELS')) { 22 | message.channel.send({ 23 | embed: { 24 | title: `**❌ | Error**`, 25 | description: `you need same permissions to use this command`, 26 | color: 0xFF0000 27 | } 28 | }).then(async function(msg) { 29 | setTimeout(() => { 30 | msg.delete().catch(err => { return }) 31 | }, 1000 * 7); 32 | }) 33 | return 34 | } 35 | message.channel.overwritePermissions([{ 36 | id: require('quick.db').fetch(`TicketControl_${message.channel.id}`), 37 | allow: ['SEND_MESSAGES', 'VIEW_CHANNEL'] 38 | }, { 39 | id: require('quick.db').fetch(`TicketAdminRole_${message.guild.id}`), 40 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"] 41 | }, { 42 | id: message.guild.roles.everyone, 43 | deny: ["VIEW_CHANNEL"] 44 | }]).then(() => { 45 | message.channel.send({ 46 | embed: { 47 | title: '✅ | Done', 48 | description: `the ticket permission has been rested to default`, 49 | color: 0x00D700 50 | } 51 | }).then(async function(msg) { 52 | setTimeout(() => { 53 | msg.delete().catch(err => { return }) 54 | }, 1000 * 7); 55 | }) 56 | }) 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/bot/commands/rename.js: -------------------------------------------------------------------------------- 1 | const { MessageButton, MessageActionRow } = require('discord-buttons'); 2 | 3 | module.exports = { 4 | name: "rename", 5 | cooldown: 5, 6 | aliases: ["change-name"], 7 | 8 | run: async function(client, message, args) { 9 | try { 10 | var renameMessage = args.join(' '); 11 | if (!message.channel.name.includes("ticket-")) { 12 | message.channel.send({ 13 | embed: { 14 | title: `**❌ | Error**`, 15 | description: `This is not a ticket channel`, 16 | color: 0xFF0000 17 | } 18 | }).then(async function(msg) { 19 | setTimeout(() => { 20 | msg.delete().catch(err => { return }) 21 | }, 1000 * 7); 22 | }) 23 | return 24 | } 25 | if (!message.member.hasPermission('MANAGE_CHANNELS')) { 26 | message.channel.send({ 27 | embed: { 28 | title: `**❌ | Error**`, 29 | description: `you need same permissions to use this command`, 30 | color: 0xFF0000 31 | } 32 | }).then(async function(msg) { 33 | setTimeout(() => { 34 | msg.delete().catch(err => { return }) 35 | }, 1000 * 7); 36 | }) 37 | return 38 | } 39 | if (!renameMessage) { 40 | message.channel.send({ 41 | embed: { 42 | title: `**❌ | Error**`, 43 | description: `you need same permissions to use this command`, 44 | color: 0xFF0000 45 | } 46 | }).then(async function(msg) { 47 | setTimeout(() => { 48 | msg.delete().catch(err => { return }) 49 | }, 1000 * 7); 50 | }) 51 | return 52 | } 53 | let btn = new MessageButton() 54 | .setStyle("green") 55 | .setEmoji("✅") 56 | .setID("renameTicketTrue"); 57 | let btn2 = new MessageButton() 58 | .setStyle("grey") 59 | .setEmoji("⛔") 60 | .setID("renameTicketFalse"); 61 | let row = new MessageActionRow() 62 | .addComponent(btn) 63 | .addComponent(btn2); 64 | message.channel.send({ 65 | embed: { 66 | title: `**⚠️ | Confirmation**`, 67 | description: `Are you sure about rename this ticket?`, 68 | color: 0xFFF200 69 | }, 70 | component: row 71 | }).then(async function(msg) { 72 | setTimeout(() => { 73 | msg.delete().catch(err => { return }) 74 | }, 1000 * 7); 75 | require('quick.db').set(`RenameTicket_${message.channel.id}`, renameMessage) 76 | require('quick.db').set(`DeleteRenameMessage_${message.channel.id}`, msg.id) 77 | }) 78 | } catch (err) { 79 | return; 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/bot/commands/setup.js: -------------------------------------------------------------------------------- 1 | const { MessageButton, MessageActionRow } = require('discord-buttons'); 2 | 3 | module.exports = { 4 | name: "setup", 5 | cooldown: 5, 6 | aliases: ["create"], 7 | 8 | run: async function(client, message, args) { 9 | try { 10 | var prefix = await require('quick.db').fetch(`prefix_${message.guild.id}`); 11 | if (prefix == null) prefix = require('../../config/bot').prefix; 12 | var ticketChannel = message.mentions.channels.first() || client.channels.cache.get(args[0]) || message.guild.channels.cache.find(c => c.name == args[0]) || message.channel; 13 | var adminRole = message.mentions.roles.first() || message.guild.roles.cache.find(r => r.id == args[1]) || message.guild.roles.cache.find(r => r.name == args[1]); 14 | var title = message.content.split(' ').slice(3).join(' ') || 'Ticket Bot'; 15 | if (!adminRole) { 16 | message.channel.send({ 17 | embed: { 18 | title: `❌ | Wrong use`, 19 | description: `⚠ | correct use: ${prefix}setup `, 20 | color: 0xFF0000 21 | } 22 | }).then(async function(msg) { 23 | setTimeout(() => { 24 | msg.delete().catch(err => { return }) 25 | }, 1000 * 7); 26 | }) 27 | return 28 | } 29 | message.react('✅'); 30 | let btn = new MessageButton() 31 | .setStyle("blurple") 32 | .setEmoji("✅") 33 | .setID("createTicket") 34 | let row = new MessageActionRow() 35 | .addComponent(btn); 36 | ticketChannel.send({ 37 | embed: { 38 | color: 0xFFED00, 39 | description: 'React with "✅" to create a ticket', 40 | title: title 41 | }, 42 | component: row 43 | }).then(async function() { 44 | require('quick.db').set(`TicketAdminRole_${message.guild.id}`, adminRole.id); 45 | }) 46 | } catch (err) { 47 | return; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/bot/events/clickButton.js: -------------------------------------------------------------------------------- 1 | const { MessageButton, MessageActionRow } = require('discord-buttons'); 2 | 3 | module.exports = async function(client, button) { 4 | try { 5 | await button.reply.defer(); 6 | if (button.id == 'createTicket') { 7 | var nameer = `ticket-${button.clicker.user.username}` 8 | var checkTickets = button.guild.channels.cache.find(c => c.name == nameer.split(' ').join('-').toLocaleLowerCase()); 9 | if (checkTickets) { 10 | button.channel.send({ 11 | embed: { 12 | color: 0xFF0000, 13 | title: `**❌ | Error**`, 14 | description: `You already have a ticket open before` 15 | } 16 | }).then(async function(m) { 17 | setTimeout(() => { 18 | m.delete(); 19 | }, 1000 * 7); 20 | }); 21 | return 22 | } 23 | button.guild.channels.create(`ticket-${button.clicker.user.username}`, { 24 | permissionOverwrites: [{ 25 | id: button.clicker.user.id, 26 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"] 27 | }, 28 | { 29 | id: require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`), 30 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"] 31 | }, { 32 | id: button.guild.roles.everyone, 33 | deny: ["VIEW_CHANNEL"] 34 | } 35 | ], 36 | type: 'text' 37 | }).then(async function(channel) { 38 | require('quick.db').set(`TicketControl_${channel.id}`, button.clicker.user.id); 39 | let btn = new MessageButton() 40 | .setStyle("grey") 41 | .setEmoji("🔒") 42 | .setID("configTicket"); 43 | let row = new MessageActionRow() 44 | .addComponent(btn); 45 | channel.send(`<@${button.clicker.user.id}>`, { 46 | embed: { 47 | description: `Please wait for a **ADMIN** response!! 48 | Press **"🔒"** to close this ticket`, 49 | color: 0x2F3136 50 | }, 51 | component: row 52 | }); 53 | }); 54 | } else if (button.id == 'configTicket') { 55 | if (!button.channel.name.includes("ticket-")) { 56 | return; 57 | } 58 | var member = require('quick.db').fetch(`TicketControl_${button.channel.id}`); 59 | button.channel.overwritePermissions([{ 60 | id: member, 61 | deny: ['SEND_MESSAGES'], 62 | allow: ['VIEW_CHANNEL'] 63 | }, 64 | { 65 | id: require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`), 66 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"] 67 | }, { 68 | id: button.guild.roles.everyone, 69 | deny: ["VIEW_CHANNEL"] 70 | } 71 | ]); 72 | button.channel.send({ 73 | embed: { 74 | description: `Ticket has been Closed By <@!${button.clicker.user.id}>`, 75 | color: 0xFFE700 76 | } 77 | }).then(async function(m) { 78 | setTimeout(() => { 79 | m.delete(); 80 | }, 1000 * 5); 81 | }); 82 | let btn = new MessageButton() 83 | .setStyle("grey") 84 | .setEmoji("🔓") 85 | .setID("reopenTicket"); 86 | let btn2 = new MessageButton() 87 | .setStyle("grey") 88 | .setEmoji("⛔") 89 | .setID("deleteTicket"); 90 | let row = new MessageActionRow() 91 | .addComponent(btn2) 92 | .addComponent(btn); 93 | button.channel.send({ 94 | embed: { 95 | description: 'Press **"⛔"** to delete the ticket\nPress **"🔓"** to reopen the ticket', 96 | color: 0xFF0000 97 | }, 98 | component: row 99 | }).then(async function(m) { 100 | setTimeout(() => { 101 | m.delete(); 102 | }, 1000 * 25); 103 | }); 104 | } else if (button.id == "deleteTicket") { 105 | require('quick.db').delete(`TicketControl_${button.channel.id}`); 106 | button.channel.send({ 107 | embed: { 108 | description: 'Ticket will be deleted in a few seconds', 109 | color: 0xFF0000 110 | } 111 | }); 112 | async function DelChannel() { 113 | setTimeout(() => { 114 | button.channel.delete(); 115 | }, 1000 * 4.3); 116 | } 117 | await DelChannel() 118 | } else if (button.id == "reopenTicket") { 119 | button.channel.send({ 120 | embed: { 121 | description: `Ticket has been reopened By <@!${button.clicker.user.id}>`, 122 | color: 0xFFE700 123 | } 124 | }).then(async function(m) { 125 | setTimeout(() => { 126 | m.delete(); 127 | }, 1000 * 5); 128 | }) 129 | var member = require('quick.db').fetch(`TicketControl_${button.channel.id}`); 130 | button.channel.overwritePermissions([{ 131 | id: member, 132 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"] 133 | }, 134 | { 135 | id: require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`), 136 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"] 137 | }, { 138 | id: button.guild.roles.everyone, 139 | deny: ["VIEW_CHANNEL"] 140 | } 141 | ]); 142 | } else if (button.id == 'closeTicketTrue') { 143 | require('quick.db').delete(`TicketControl_${button.channel.id}`); 144 | button.channel.send({ 145 | embed: { 146 | description: 'Ticket will be deleted in a few seconds', 147 | color: 0xFF0000 148 | } 149 | }); 150 | async function DelChannel() { 151 | setTimeout(() => { 152 | button.channel.delete(); 153 | }, 1000 * 4.3); 154 | } 155 | await DelChannel() 156 | } else if (button.id == 'closeTicketFalse') { 157 | var msg = require('quick.db').fetch(`DeleteMessage_${button.channel.id}`); 158 | button.channel.messages.fetch(msg).then(message => message.delete()).catch(err => { return }); 159 | require('quick.db').delete(`DeleteMessage_${button.channel.id}`); 160 | } else if (button.id == 'createTicketFalse') { 161 | var msg = require('quick.db').fetch(`DeleteOpen_${button.channel.id}`); 162 | button.channel.messages.fetch(msg).then(message => message.delete()).catch(err => { return }); 163 | require('quick.db').delete(`DeleteOpen_${button.channel.id}`); 164 | } else if (button.id == 'createTicketTrue') { 165 | var msg = require('quick.db').fetch(`DeleteOpen_${button.channel.id}`); 166 | button.channel.messages.fetch(msg).then(message => message.delete()).catch(err => { return }); 167 | require('quick.db').delete(`DeleteOpen_${button.channel.id}`); 168 | button.guild.channels.create(`ticket-${button.clicker.user.username}`, { 169 | permissionOverwrites: [{ 170 | id: button.clicker.user.id, 171 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"] 172 | }, 173 | { 174 | id: require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`), 175 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"] 176 | }, { 177 | id: button.guild.roles.everyone, 178 | deny: ["VIEW_CHANNEL"] 179 | } 180 | ], 181 | type: 'text' 182 | }).then(async function(channel) { 183 | require('quick.db').set(`TicketControl_${channel.id}`, button.clicker.user.id); 184 | let btn = new MessageButton() 185 | .setStyle("grey") 186 | .setEmoji("🔒") 187 | .setID("configTicket"); 188 | let row = new MessageActionRow() 189 | .addComponent(btn); 190 | channel.send(`<@${button.clicker.user.id}>`, { 191 | embed: { 192 | description: `Please wait for a **ADMIN** response!! 193 | Press **"🔒"** to close this ticket`, 194 | color: 0x2F3136 195 | }, 196 | component: row 197 | }); 198 | }); 199 | } else if (button.id == 'renameTicketFalse') { 200 | var msg = require('quick.db').fetch(`DeleteRenameMessage_${button.channel.id}`); 201 | button.channel.messages.fetch(msg).then(message => message.delete()).catch(err => { return }); 202 | require('quick.db').delete(`DeleteRenameMessage_${button.channel.id}`); 203 | } else if (button.id == 'renameTicketTrue') { 204 | var msg = require('quick.db').fetch(`DeleteRenameMessage_${button.channel.id}`); 205 | button.channel.messages.fetch(msg).then(message => message.delete()).catch(err => { return }); 206 | button.channel.setName('ticket-' + require('quick.db').fetch(`RenameTicket_${button.channel.id}`)); 207 | button.channel.send({ 208 | embed: { 209 | title: '✅', 210 | description: `this ticket name has been renamed to \`${require('quick.db').fetch(`RenameTicket_${button.channel.id}`)}\``, 211 | color: 0x00D700 212 | } 213 | }) 214 | require('quick.db').delete(`DeleteRenameMessage_${button.channel.id}`); 215 | } 216 | } catch (err) { 217 | console.log(err) 218 | } 219 | } 220 | -------------------------------------------------------------------------------- /src/bot/events/message.js: -------------------------------------------------------------------------------- 1 | const db = require("quick.db"); 2 | const { Collection, MessageEmbed } = require("discord.js"); 3 | const cooldowns = new Map(); 4 | 5 | module.exports = async(client, message) => { 6 | var prefix = await db.fetch(`prefix_${message.guild.id}`); 7 | if (prefix == null) prefix = require('../../config/bot').prefix; 8 | if (message.channel.type == "dm") return; 9 | if (message.author.bot) return; 10 | if (message.content.indexOf(prefix) !== 0) return; 11 | const args = message.content 12 | .slice(prefix.length) 13 | .trim() 14 | .split(/ +/g); 15 | const user = 16 | message.mentions.users.first() || 17 | client.users.cache.get(message.content.split(" ")[1]); 18 | const cmd = args.shift().toLowerCase(); 19 | const command = 20 | client.commands.get(cmd) || 21 | client.commands.find(a => a.aliases && a.aliases.includes(cmd)); 22 | if (!command) return; 23 | if (!cooldowns.has(command.name)) { 24 | const coll = new Collection(); 25 | cooldowns.set(command.name, coll); 26 | } 27 | const current_time = Date.now(); 28 | const time_stamps = cooldowns.get(command.name); 29 | const cooldown_amount = command.cooldown * 1000; 30 | if (time_stamps.has(message.author.id)) { 31 | const expiration_time = 32 | time_stamps.get(message.author.id) + cooldown_amount; 33 | if (current_time < expiration_time) { 34 | const time_left = (expiration_time - current_time) / 1000; 35 | return message.channel.send( 36 | new MessageEmbed() 37 | .setColor("RED") 38 | .setDescription( 39 | `**You Are In Cooldown Please Wait \`${time_left.toFixed( 40 | 1 41 | )}\` To Use \`${command.name}\` Again**` 42 | ) 43 | ); 44 | } 45 | } 46 | time_stamps.set(message.author.id, current_time); 47 | setTimeout(() => time_stamps.delete(message.author.id), cooldown_amount); 48 | 49 | try { 50 | command.run(client, message, args, user); 51 | } catch (err) { 52 | console.log(err); 53 | message.channel.send(":x: | Something went wrong ```js" + err + "```"); 54 | } 55 | }; 56 | -------------------------------------------------------------------------------- /src/bot/events/ready.js: -------------------------------------------------------------------------------- 1 | const chalk = require('chalk'); 2 | const figlet = require("figlet"); 3 | 4 | module.exports = async function(client) { 5 | console.log(chalk.yellow.bold(figlet.textSync("ApiDev234"))); 6 | await console.log(chalk.red.bold(client.user.tag) + chalk.blue.bold(" Is Ready")); 7 | 8 | await client.user.setActivity(require('../../config/bot').prefix + "help || Made By Shinchan#2196"); // Don't Remove Credits Might Get You in Danger 9 | await client.user.setStatus("idle"); 10 | } 11 | -------------------------------------------------------------------------------- /src/config/bot.js: -------------------------------------------------------------------------------- 1 | require('dotenv').config(); 2 | 3 | module.exports = { 4 | token: process.env.TOKEN, 5 | prefix: process.env.PREFIX 6 | } 7 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | const { Client, Collection } = require("discord.js"); 2 | const client = new Client(); 3 | require('discord-buttons')(client); 4 | const chalk = require("chalk"); 5 | const fs = require("fs"); 6 | 7 | client.commands = new Collection(); 8 | 9 | fs.readdir(__dirname + "/bot/events/", (err, files) => { 10 | if (err) return console.error(err); 11 | files.forEach(file => { 12 | if (!file.endsWith(".js")) return; 13 | let event = require(__dirname + "/bot/events/" + file); 14 | let eventName = file.split(".")[0]; 15 | console.log( 16 | chalk.blue.bold("Loading event ") + chalk.magenta.bold(`"${eventName}"`) 17 | ); 18 | client.on(eventName, event.bind(null, client)); 19 | }); 20 | }); 21 | 22 | fs.readdir(__dirname + "/bot/commands/", (err, files) => { 23 | if (err) return console.error(err); 24 | files.forEach(file => { 25 | if (!file.endsWith(".js")) return; 26 | let props = require(__dirname + "/bot/commands/" + file); 27 | let commandName = file.split(".")[0]; 28 | console.log( 29 | chalk.blue.bold("Loading command ") + chalk.red.bold(`"${commandName}"`) 30 | ); 31 | client.commands.set(commandName, props); 32 | }); 33 | }); 34 | 35 | client.login(require("./config/bot").token).catch(err => console.log(chalk.red.bold(err))) 36 | --------------------------------------------------------------------------------