├── LICENSE
├── README.md
├── emoji.json
├── 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
│ └── transcript.js
└── events
│ ├── clickButton.js
│ ├── message.js
│ └── ready.js
├── config
└── bot.js
└── index.js
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 captain motchy
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 | 
2 |
3 |
4 |
5 |

6 | [](https://discord.gg/9ZrzNkzeN4)
7 | [](https://dsc.gg/dst74)
8 | [](https://paypal.me/mrmotchy)
9 |
10 |
11 |
12 | # Features
13 | * **Watch my YT video & host your [bot 24/7](https://dsc.gg/dst74)**
14 | - Setup
15 | - Open
16 | - Close
17 | - Add
18 | - Remove
19 | - Rename
20 | - Close
21 | - Reopen
22 | - Per Server Prefix
23 | - Ping Command
24 |
25 | # 💎 Preview
26 | ## This it what the bot looks like...
27 | 
28 |
29 | 
30 |
31 | # 🔩 Installation
32 | ## Create [TOKEN](https://discord.com/developers/)
33 | ```
34 | $ under bot_token
35 | ```
36 |
37 | ## Create [prefix]()
38 | ```
39 | $ server prefixes could be -; +; !; ?;...
40 | ```
41 |
42 | # 💻 Code example
43 | This is a simple example of code using this package.
44 |
45 | ```js
46 | id: require('quick.db').fetch(`TicketAdminRole_${message.guild.id}`),
47 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
48 | }, {
49 | id: message.guild.roles.everyone,
50 | deny: ["VIEW_CHANNEL"]
51 | }]).then(() => {
52 | message.channel.send({
53 | embed: {
54 | title: '✅ | Done',
55 | description: `${txt} has been added to this ticket`,
56 | color: 0x00D700
57 | }
58 | }).then(async function(msg) {
59 | setTimeout(() => {
60 | msg.delete().catch(err => { return })
61 | }, 1000 * 7);
62 | ```
63 | &
64 | ```js
65 | const embed2 = new Discord.MessageEmbed()
66 | .setTitle(`Premium Ticket Commands`)
67 | .setThumbnail(message.guild.iconURL({ dynamic: true }))
68 | .setDescription(`**__Here Are My Commands:__**\n\`setup,\` \`transcript,\` \`rename,\` \`remove,\` \`ping,\` \`open,\` \`close\``)
69 | .setColor(`#0x2F3136`)
70 | ```
71 |
72 |
73 |
74 |
75 |
76 | ## Installation
77 |
78 |
79 | ### Click [here](https://www.youtube.com/channel/UCmkPzf-eAJsiuCh-5kz4Abw) to watch my YouTube video !
80 | 
81 |
82 |
83 | ### Click [here](https://dsc.gg/dst74) to join my discord server !
84 | [](https://dsc.gg/dst74)
85 |
86 |
--------------------------------------------------------------------------------
/emoji.json:
--------------------------------------------------------------------------------
1 | {
2 | "sucess": "",
3 | "check": "<:check:870019748585414686>",
4 | "error": "<:fail:892941761171841064>",
5 | "loading": "",
6 | "afk": "<:afk:881367635617517659>",
7 | "info": "<:info:876255965249437717>",
8 | "warn": "<:hydroxwarn:887743411925442570>",
9 | "user": "<:hydroxUsers:887743738816913428>",
10 | "ping": "",
11 | "muted": "",
12 | "question": "<:hydroxquestion:887742009387941908>",
13 | "userkick": "",
14 | "userban": "",
15 | "fun": "<:hydroxfun:887762610970325024>",
16 | "Settings": "<:hydroxSettings:887762219784355860>",
17 | "settings": "<:hydroxsetting:887763023744344064>",
18 | "channellock": "<:hydroxnsfwchannel:887744340854722561>",
19 | "nsfw": "<:hydroxnsfw:887777514699784203>",
20 | "category": "<:hydroxcategory:887761870398824458>",
21 | "mod": "<:hydroxmoderation:887762030436696085>",
22 | "giveaway": "",
23 | "gift": "",
24 | "security": "<:hydroxSecurity:887762712040464395>",
25 | "done": "<:hydroxcheak:888019076050468864>",
26 | "dot": "<:hydroxdot:888039412632543263>",
27 | "discordlogo": "",
28 | "links": "<:hydroxlinks:888051779286233108>",
29 | "mods": "<:automod:882186532960763927>",
30 | "king": "",
31 | "servers": "<:hydroxserver:888096217882583070>",
32 | "uptime": "<:hydroxuptime:887762790041923645>",
33 | "tree": "<:hydroxtree:887762392824549386>",
34 | "admin": "<:hydroxadmin:888097762690883615>",
35 | "music": "",
36 | "utility": "<:hydroxutility:888019776146919484>",
37 | "developer": "<:hydroxdeveloper:888099570532376606>",
38 | "leave": "<:hydroxleaves:888113202607558676>",
39 | "lol": "<:hydroxrofllmao:888698504506134569>",
40 | "member": "<:hydroxUsers:887743738816913428>",
41 | "owner": "",
42 | "channel": "<:hydroxchannel:888721988363886633>",
43 | "micro": "<:hydroxdiscduckmicroshit:888721052811821058>",
44 | "djs": "<:hydroxdiscordjs:888722748766040084>",
45 | "node.js": "<:hydroxnodejs:888346483802390609>",
46 | "cpu": "<:hydroxcpu:888019611084271616>",
47 | "ram": "<:hydroxram:888723685349937173>",
48 | "join": "",
49 | "members": "<:hydroxMember_Joins:888349949153136640>"
50 | }
--------------------------------------------------------------------------------
/json.sqlite:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrmotchy/ticket-bot/33f480a346129b6dad87b7491772ba1bc3f2d2ed/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 | const MessageButton = require('discord-buttons');
2 | const Discord = require('discord.js');
3 | const client = new Discord.Client();
4 | const disbut = require("discord-buttons");
5 |
6 | const { MessageMenuOption, MessageMenu } = require("discord-buttons");
7 |
8 | module.exports = {
9 | name: "help",
10 | cooldown: 5,
11 | aliases: ["commands", "auda"],
12 |
13 | run: async (bot, message, args) => { //async
14 | //--------------------------------------S T A R T--------------------------------------//
15 |
16 | message.react('887650847327158343');
17 |
18 |
19 | const embed = new Discord.MessageEmbed()
20 | .setTitle(`Tickets Premium`)
21 | .setThumbnail(message.guild.iconURL({ dynamic: true }))
22 | .setDescription(`_**Click On the Select Menu Below to __Swap__ help Pages**_\n🏠 - Home Page\n🎟️ - Premium Commands ( tickets )\n❔ - Premium Features\n📔 - About Me`)
23 | .setColor(`#0x2F3136`)
24 |
25 | const embed2 = new Discord.MessageEmbed()
26 | .setTitle(`Premium Ticket Commands`)
27 | .setThumbnail(message.guild.iconURL({ dynamic: true }))
28 | .setDescription(`**__Here Are My Commands:__**\n\`setup,\` \`transcript,\` \`rename,\` \`remove,\` \`ping,\` \`open,\` \`close\``)
29 | .setColor(`#0x2F3136`)
30 |
31 | const embed3 = new Discord.MessageEmbed()
32 | .setTitle(`My Premium Features`)
33 | .setThumbnail(message.guild.iconURL({ dynamic: true }))
34 | .setDescription(`**Hello, Im Tickets __PREMIUM__! You May Ask, What is diffent from me than the regular Multi-ticket system**? Well i have, Better emojis, Better buttons, And Lots of More Features!`)
35 | .setColor(`#0x2F3136`)
36 |
37 | // Last embed
38 | const embed4 = new Discord.MessageEmbed()
39 | .setTitle(`About Me`)
40 | .setThumbnail(message.guild.iconURL({ dynamic: true }))
41 | .setDescription(`**I was Made by, \`captain motchy#9180\`!\n\nJoin my support [server](https://dsc.gg/dst74)**`)
42 | .setColor(`#0x2F3136`)
43 |
44 | //-----------------------------OPTIONS----------------------
45 | //examples .setLabel('Put What You Want to put')
46 | //.setValue('')
47 | //.setDescription('put what u wantnto put')
48 |
49 | let option1 = new MessageMenuOption()
50 | .setLabel('Home Page')
51 | .setValue('option1')
52 | .setEmoji("🏠")
53 | .setDescription('View All Commands')
54 |
55 | let option2 = new MessageMenuOption()
56 | .setLabel('Commands')
57 | .setValue('option2')
58 | .setEmoji("🎫")
59 | .setDescription('View Premium Ticket Commands')
60 |
61 | let option3 = new MessageMenuOption()
62 | .setLabel('Features')
63 | .setValue('option3')
64 | .setEmoji("❓")
65 | .setDescription('View My Premium Features')
66 |
67 | let option4 = new MessageMenuOption()
68 | .setLabel('About Me')
69 | .setValue('option4')
70 | .setEmoji("📔")
71 | .setDescription('View My About')
72 |
73 |
74 | let select = new MessageMenu()
75 | .setID('selector')
76 | .setPlaceholder('Ticket Bot Menu')
77 | .setMaxValues(1)
78 | .setMinValues(1)
79 | .addOptions(option1, option2, option3, option4)
80 |
81 | const Sendmenu = await message.channel.send(embed, select);
82 |
83 | let collector = Sendmenu.createMenuCollector(b => b, { time : 60000 });
84 |
85 | collector.on("collect" , (b) => {
86 |
87 | if(b.clicker.user.id !== message.author.id)
88 | return b.reply.send(`❌ **Only <@${message.author.id}> Is Allowed To React!**\n**Tip**: \`To Use This Command, Type the help command\``, true)
89 |
90 |
91 | if(b.values[0] == "option1") {
92 | Sendmenu.edit(embed, select)
93 | }
94 |
95 | if(b.values[0] == "option2") {
96 | Sendmenu.edit(embed2, select)
97 | }
98 |
99 | if(b.values[0] == "option3") {
100 | Sendmenu.edit(embed3, select)
101 | }
102 |
103 | if(b.values[0] == "option4") {
104 | Sendmenu.edit(embed4, select)
105 | }
106 | b.reply.defer();
107 |
108 |
109 |
110 | })
111 |
112 | collector.on("end", (b) => {
113 | Sendmenu.edit(new Discord.MessageEmbed()
114 | .setColor("RED")
115 | .setThumbnail(message.guild.iconURL({ dynamic: true }))
116 | .setDescription("This help menu is expired! Please retype the \`Help Command\`")
117 | .setFooter("Powered by CoderFredi"))
118 | })
119 |
120 | }
121 | }
--------------------------------------------------------------------------------
/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.react('887650847327158343');
21 | message.channel.send(
22 | new MessageEmbed()
23 | .setColor("#2F3136")
24 | .setAuthor(message.author.username, message.author.avatarURL())
25 | .addField("**Time Taken:**", msg + " ms 📶 | " + states, true)
26 | .addField("**WebSocket:**", api + " ms 📶 | " + states2, true)
27 | .setTimestamp()
28 | .setFooter(`Request By ${message.author.tag}`)
29 | );
30 | } catch (err) {
31 | return;
32 | }
33 | }
34 | };
35 |
--------------------------------------------------------------------------------
/src/bot/commands/prefix.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: "t-prefix",
3 | cooldown: 5,
4 | aliases: ["T-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: "close",
5 | cooldown: 5,
6 | aliases: ["end"],
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 | const Discord = require('discord.js');
3 |
4 | module.exports = {
5 | name: "setup",
6 | cooldown: 5,
7 | aliases: ["create"],
8 |
9 | run: async function(client, message, args) {
10 | if (!message.member.hasPermission("ADMINISTRATOR")) {
11 | return message.channel.send(
12 | "You should have admin perms to use this command!"
13 | );
14 | }
15 | try {
16 | var prefix = await require('quick.db').fetch(`prefix_${message.guild.id}`);
17 | if (prefix == null) prefix = require('../../config/bot').prefix;
18 | var ticketChannel = message.mentions.channels.first() || client.channels.cache.get(args[0]) || message.guild.channels.cache.find(c => c.name == args[0]) || message.channel;
19 | 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]);
20 | var title = message.content.split(' ').slice(3).join(' ') || '**A staff member of District74 will be with you soon**\n\n__**Here You Can Open A Support, Other And Even A Claim Ticket!**__\n`Click The Button Category Below Based On Your Needs`';
21 | if (!adminRole) {
22 | message.channel.send({
23 | embed: {
24 | title: `❌ | Wrong use`,
25 | description: `⚠ | correct use: ${prefix}setup `,
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.react('887650847327158343');
36 | message.channel.send(`Success!`);
37 | let btn = new MessageButton()
38 | .setStyle("red")
39 | .setLabel("Support")
40 | .setEmoji('850829758912528435')
41 | .setID("createTicket")
42 | let btn2 = new MessageButton()
43 | .setStyle("blurple")
44 | .setLabel("Other")
45 | .setEmoji('888350726877769728')
46 | .setID("otherTicket")
47 | let btn3 = new MessageButton()
48 | .setStyle("green")
49 | .setLabel("Claim")
50 | .setID("claimTicket")
51 | let row = new MessageActionRow()
52 | .addComponent(btn)
53 | .addComponent(btn2)
54 | .addComponent(btn3)
55 |
56 |
57 | const panel = new Discord.MessageEmbed()
58 | .setTitle(`Open a Ticket`)
59 | .setDescription(`${title}`)
60 | .setThumbnail(message.guild.iconURL({ dynamic: true }))
61 | .setColor(`#0x2F3136`)
62 | ticketChannel.send(panel, row)
63 | .then(async function() {
64 | require('quick.db').set(`TicketAdminRole_${message.guild.id}`, adminRole.id);
65 | })
66 | } catch (err) {
67 | return;
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/src/bot/commands/transcript.js:
--------------------------------------------------------------------------------
1 | const sourcebin = require('sourcebin_js');
2 | const { MessageEmbed } = require('discord.js');
3 |
4 | module.exports = {
5 | name: 'transcript',
6 | category: 'Ticket',
7 | description: 'Trascripts a specified ticket.',
8 | aliases: [],
9 | usage: 'transcript',
10 | userperms: [],
11 | botperms: [],
12 | run: async (client, message, args) => {
13 | const channel = message.mentions.channels.first() || message.guild.channels.cache.get(args[0]) || message.channel;
14 | if (channel.name.includes('ticket-')) {
15 | if (message.member.hasPermission('ADMINISTRATOR') || channel.name === `ticket-${message.author.id}`) {
16 | channel.messages.fetch().then(async (messages) => {
17 | const output = messages.array().reverse().map(m => `${new Date(m.createdAt).toLocaleString('en-US')} - ${m.author.tag}: ${m.attachments.size > 0 ? m.attachments.first().proxyURL : m.content}`).join('\n');
18 |
19 | let response;
20 | try {
21 | response = await sourcebin.create([
22 | {
23 | name: ' ',
24 | content: output,
25 | languageId: 'text',
26 | },
27 | ], {
28 | title: `Chat transcript for ${channel.name}`,
29 | description: ' ',
30 | });
31 | }
32 | catch(e) {
33 | return message.channel.send('An error occurred, please try again!');
34 | }
35 | message.react('887650847327158343');
36 | const embed = new MessageEmbed()
37 | .setDescription(`[\`📄 View\`](${response.url})`)
38 | .setColor('GREEN');
39 | message.reply('the transcript is complete. Please click the link below to view the transcript', embed);
40 | });
41 | }
42 | }
43 | else {
44 | return message.reply(
45 | 'you cannot use this command here. Please use this command in a open ticket.',
46 | );
47 | }
48 | },
49 | };
--------------------------------------------------------------------------------
/src/bot/events/clickButton.js:
--------------------------------------------------------------------------------
1 | const { MessageButton, MessageActionRow } = require('discord-buttons');
2 | const sourcebin = require('sourcebin_js');
3 | const Discord = require ('discord.js')
4 | const disbut = require("discord-buttons");
5 |
6 | module.exports = async function(client, button) {
7 | try {
8 | await button.reply.defer();
9 | if (button.id == 'createTicket') {
10 | var adminRole = require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`)
11 | var nameer = `ticket-${button.clicker.user.username}`
12 | var checkTickets = button.guild.channels.cache.find(c => c.name == nameer.split(' ').join('-').toLocaleLowerCase());
13 | if (checkTickets) {
14 | button.channel.send({
15 | embed: {
16 | color: 0xFF0000,
17 | title: `**❌ | Error**`,
18 | description: `You already have a ticket open before`
19 | }
20 | }).then(async function(m) {
21 | setTimeout(() => {
22 | m.delete();
23 | }, 1000 * 7);
24 | });
25 | return
26 | }
27 |
28 | button.guild.channels.create(`ticket-${button.clicker.user.username}`, {
29 | permissionOverwrites: [{
30 | id: button.clicker.user.id,
31 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
32 | },
33 | {
34 | id: require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`),
35 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
36 | }, {
37 | id: button.guild.roles.everyone,
38 | deny: ["VIEW_CHANNEL"]
39 | }
40 | ],
41 | type: 'text'
42 | }).then(async function(channel) {
43 | require('quick.db').set(`TicketControl_${channel.id}`, button.clicker.user.id);
44 | let btn = new MessageButton()
45 | .setStyle("grey")
46 | .setEmoji("🔒")
47 |
48 | .setLabel("")
49 | .setID("configTicket");
50 | let btn2 = new MessageButton()
51 | .setStyle("green")
52 | .setEmoji("💵")
53 |
54 | .setLabel("")
55 | .setID("claimTicketin");
56 | let btn3 = new MessageButton()
57 | .setStyle("blurple")
58 | .setEmoji("888350726877769728")
59 |
60 | .setLabel("")
61 | .setID("otherTicketin");
62 | let btn4 = new MessageButton()
63 | .setStyle("red")
64 | .setEmoji("📌")
65 |
66 | .setLabel("")
67 | .setID("pin");
68 | let btn5 = new MessageButton()
69 | .setStyle("blurple")
70 | .setEmoji("📝")
71 |
72 | .setLabel("")
73 | .setID("trans");
74 | let row = new MessageActionRow()
75 | .addComponent(btn)
76 | .addComponent(btn2)
77 | .addComponent(btn3)
78 | .addComponent(btn4)
79 | .addComponent(btn5)
80 | channel.send(`<@${button.clicker.user.id}> :arrow_forward: <@&${adminRole}> :arrow_backward:`, {
81 | embed: {
82 | description: `Please wait for an Admin to respond!!\n\n__**Please Tell Us What You Need Help On!**__\n\n** 📌 Ticket Category: Support**\n
83 | Press **🔒** to close this ticket`,
84 | color: 0x2F3136
85 | },
86 |
87 | component: row
88 | }).then(msg => {
89 | msg.pin();
90 | });
91 | });
92 | } else if (button.id == 'otherTicket') {
93 | var adminRole = require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`)
94 | var nameer = `ticket-${button.clicker.user.username}`
95 | var checkTickets = button.guild.channels.cache.find(c => c.name == nameer.split(' ').join('-').toLocaleLowerCase());
96 | if (checkTickets) {
97 | button.channel.send({
98 | embed: {
99 | color: 0xFF0000,
100 | title: `**❌ | Error**`,
101 | description: `You already have a ticket open before`
102 | }
103 | }).then(async function(m) {
104 | setTimeout(() => {
105 | m.delete();
106 | }, 1000 * 7);
107 | });
108 | return
109 | }
110 |
111 | button.guild.channels.create(`ticket-${button.clicker.user.username}`, {
112 | permissionOverwrites: [{
113 | id: button.clicker.user.id,
114 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
115 | },
116 | {
117 | id: require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`),
118 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
119 | }, {
120 | id: button.guild.roles.everyone,
121 | deny: ["VIEW_CHANNEL"]
122 | }
123 | ],
124 | type: 'text'
125 | }).then(async function(channel) {
126 | require('quick.db').set(`TicketControl_${channel.id}`, button.clicker.user.id);
127 | let btn = new MessageButton()
128 | .setStyle("grey")
129 | .setEmoji("🔒")
130 |
131 | .setLabel("")
132 | .setID("configTicket");
133 | let btn2 = new MessageButton()
134 | .setStyle("green")
135 | .setEmoji("💵")
136 |
137 | .setLabel("")
138 | .setID("claimTicketin");
139 | let btn3 = new MessageButton()
140 | .setStyle("blurple")
141 | .setEmoji("888350726877769728")
142 |
143 | .setLabel("")
144 | .setID("otherTicketin2");
145 | let btn4 = new MessageButton()
146 | .setStyle("red")
147 | .setEmoji("📌")
148 |
149 | .setLabel("")
150 | .setID("pin");
151 | let btn5 = new MessageButton()
152 | .setStyle("blurple")
153 | .setEmoji("📝")
154 |
155 | .setLabel("")
156 | .setID("trans");
157 | let row = new MessageActionRow()
158 | .addComponent(btn)
159 | .addComponent(btn2)
160 | .addComponent(btn3)
161 | .addComponent(btn4)
162 | .addComponent(btn5)
163 | channel.send(`<@${button.clicker.user.id}> <:hydroxdot:888039412632543263> <:hydroxarrow:888018627880714241> <@&${adminRole}> <:hydroxarrow_left:888351028787961866>`, {
164 | embed: {
165 | description: `Please wait for an Admin to respond!!\n\n__**Please Tell Us What You Need Help On!**__\n\n**<:hydroxreply:887741912180727849>Ticket Category: Other**\n
166 | Press **🔒** to close this ticket`,
167 | color: 0x2F3136
168 | },
169 | component: row
170 | }).then(msg => {
171 | msg.pin();
172 | });
173 | });
174 | } else if (button.id == 'claimTicket') {
175 | var adminRole = require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`)
176 | var nameer = `ticket-${button.clicker.user.username}`
177 | var checkTickets = button.guild.channels.cache.find(c => c.name == nameer.split(' ').join('-').toLocaleLowerCase());
178 | if (checkTickets) {
179 | button.channel.send({
180 | embed: {
181 | color: 0xFF0000,
182 | title: `**❌ | Error**`,
183 | description: `You already have a ticket open before`
184 | }
185 | }).then(async function(m) {
186 | setTimeout(() => {
187 | m.delete();
188 | }, 1000 * 7);
189 | });
190 | return
191 | }
192 |
193 | button.guild.channels.create(`ticket-${button.clicker.user.username}`, {
194 | permissionOverwrites: [{
195 | id: button.clicker.user.id,
196 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
197 | },
198 | {
199 | id: require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`),
200 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
201 | }, {
202 | id: button.guild.roles.everyone,
203 | deny: ["VIEW_CHANNEL"]
204 | }
205 | ],
206 | type: 'text'
207 | }).then(async function(channel) {
208 | require('quick.db').set(`TicketControl_${channel.id}`, button.clicker.user.id);
209 | let btn = new MessageButton()
210 | .setStyle("grey")
211 | .setEmoji("🔒")
212 |
213 | .setLabel("")
214 | .setID("configTicket");
215 | let btn2 = new MessageButton()
216 | .setStyle("green")
217 | .setEmoji("💵")
218 |
219 | .setLabel("")
220 | .setID("claimTicketin2");
221 | let btn3 = new MessageButton()
222 | .setStyle("blurple")
223 | .setEmoji("888350726877769728")
224 |
225 | .setLabel("")
226 | .setID("otherTicketin");
227 | let btn4 = new MessageButton()
228 | .setStyle("red")
229 | .setEmoji("📌")
230 |
231 | .setLabel("")
232 | .setID("pin");
233 | let btn5 = new MessageButton()
234 | .setStyle("blurple")
235 | .setEmoji("📝")
236 |
237 | .setLabel("")
238 | .setID("trans");
239 | let row = new MessageActionRow()
240 | .addComponent(btn)
241 | .addComponent(btn2)
242 | .addComponent(btn3)
243 | .addComponent(btn4)
244 | .addComponent(btn5)
245 |
246 | channel.send(`<@${button.clicker.user.id}> <:hydroxdot:888039412632543263> <:hydroxarrow:888018627880714241> <@&${adminRole}> <:hydroxarrow_left:888351028787961866>`, {
247 | embed: {
248 | description: `Please wait for an Admin to respond!!\n\n__**Please Tell Us What You Need Help On!**__\n\n**<:hydroxreply:887741912180727849>Ticket Category: Claim**\n
249 | Press **🔒** to close this ticket`,
250 | color: 0x2F3136
251 | },
252 |
253 |
254 | component: row
255 | }).then(msg => {
256 | msg.pin();
257 | });
258 |
259 | });
260 | } else if (button.id == 'configTicket') {
261 | if (!button.channel.name.includes("ticket-")) {
262 | return;
263 | }
264 | var member = require('quick.db').fetch(`TicketControl_${button.channel.id}`);
265 | button.channel.overwritePermissions([{
266 | id: member,
267 | deny: ['SEND_MESSAGES'],
268 | allow: ['VIEW_CHANNEL']
269 | },
270 | {
271 | id: require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`),
272 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
273 | }, {
274 | id: button.guild.roles.everyone,
275 | deny: ["VIEW_CHANNEL"]
276 | }
277 | ]);
278 | button.channel.send({
279 | embed: {
280 | description: `Ticket has been Closed By **__${button.clicker.user.tag}__**`,
281 | color: 0xFFE700
282 | }
283 | }).then(async function(m) {
284 | setTimeout(() => {
285 | m.delete();
286 | }, 1000 * 5);
287 | });
288 | let btn = new MessageButton()
289 | .setStyle("red")
290 | .setEmoji("887650892852125746")
291 | .setLabel("Cancel")
292 | .setID("reopenTicket");
293 | let btn2 = new MessageButton()
294 | .setLabel('Close')
295 | .setStyle('green')
296 | .setID('pin-close')
297 | .setEmoji('887650847327158343')
298 | let row = new MessageActionRow()
299 | .addComponent(btn2)
300 | .addComponent(btn);
301 | button.channel.send(`<@${button.clicker.id}>`, {
302 | embed: {
303 | description: '```Are You Sure You Wish To Close This Ticket?\nPress The button below based on what you want!```',
304 | color: 0xFFE700
305 | },
306 | component: row
307 | })
308 |
309 | } else if (button.id == "trans") {
310 | button.channel.messages.fetch().then(async (messages) => {
311 | const output = messages.array().reverse().map(m => `${new Date(m.createdAt).toLocaleString('en-US')} - ${m.author.tag}: ${m.attachments.size > 0 ? m.attachments.first().proxyURL : m.content}`).join('\n');
312 |
313 | let response;
314 | try {
315 | response = await sourcebin.create([
316 | {
317 | name: ' ',
318 | content: output,
319 | languageId: 'text',
320 | },
321 | ], {
322 | title: `Chat transcript for ${button.channel.name}`,
323 | description: ' ',
324 | });
325 | }
326 | catch(e) {
327 | return button.channel.send('An error occurred, please try again!');
328 | }
329 |
330 | const embed = new Discord.MessageEmbed()
331 | .setDescription(`[\`\`\`📄 View Transcript Of ${button.channel.name}\`\`\`](${response.url})`)
332 | .setColor('GREEN');
333 | button.channel.send(`<@${button.clicker.id}>`, embed);
334 | });
335 | } else if (button.id == "reopenTicket") {
336 | button.channel.send({
337 | embed: {
338 | description: `\`\`\`I have cancled The Ticket Deletion!\nDone By ${button.clicker.user.tag}\`\`\``,
339 | color: 0xFFE700
340 | }
341 | })
342 | var member = require('quick.db').fetch(`TicketControl_${button.channel.id}`);
343 | button.channel.overwritePermissions([{
344 | id: member,
345 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
346 | },
347 | {
348 | id: require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`),
349 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
350 | }, {
351 | id: button.guild.roles.everyone,
352 | deny: ["VIEW_CHANNEL"]
353 | }
354 | ]);
355 | } else if (button.id == "pin-close") {
356 | require('quick.db').delete(`TicketControl_${button.channel.id}`);
357 | button.message.reply({
358 | embed: {
359 | description: `\`\`\`Ticket Will Be Deleted!\n\nAction By: ${button.clicker.user.tag}\`\`\``,
360 | color: 0xFF0000
361 | }
362 | });
363 | setTimeout(() => {
364 | button.channel.delete();
365 | }, 1000 * 4.3);
366 | } else if (button.id == 'closeTicketTrue') {
367 | require('quick.db').delete(`TicketControl_${button.channel.id}`);
368 | button.channel.send({
369 | embed: {
370 | description: 'Ticket will be deleted in a few seconds',
371 | color: 0xFF0000
372 | }
373 | });
374 | setTimeout(() => {
375 | button.channel.delete();
376 | }, 1000 * 4.3);
377 | } else if (button.id == 'closeTicketFalse') {
378 | var msg = require('quick.db').fetch(`DeleteMessage_${button.channel.id}`);
379 |
380 | button.channel.messages.fetch(msg).then(message => message.delete()).catch(err => { return });
381 | require('quick.db').delete(`DeleteMessage_${button.channel.id}`);
382 | } else if (button.id == 'createTicketFalse') {
383 | var msg = require('quick.db').fetch(`DeleteOpen_${button.channel.id}`);
384 | button.channel.messages.fetch(msg).then(message => message.delete()).catch(err => { return });
385 | require('quick.db').delete(`DeleteOpen_${button.channel.id}`);
386 | } else if (button.id == 'createTicketTrue') {
387 | var msg = require('quick.db').fetch(`DeleteOpen_${button.channel.id}`);
388 | button.channel.messages.fetch(msg).then(message => message.delete()).catch(err => { return });
389 | require('quick.db').delete(`DeleteOpen_${button.channel.id}`);
390 | button.guild.channels.create(`ticket-${button.clicker.user.username}`, {
391 | permissionOverwrites: [{
392 | id: button.clicker.user.id,
393 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
394 | },
395 | {
396 | id: require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`),
397 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
398 | }, {
399 | id: button.guild.roles.everyone,
400 | deny: ["VIEW_CHANNEL"]
401 | }
402 | ],
403 | type: 'text'
404 | }).then(async function(channel) {
405 | require('quick.db').set(`TicketControl_${channel.id}`, button.clicker.user.id);
406 | let btn = new MessageButton()
407 | .setStyle("grey")
408 | .setEmoji("🔒")
409 | .setID("configTicket");
410 | let row = new MessageActionRow()
411 | .addComponent(btn);
412 | channel.send(`<@${button.clicker.user.id}>`, {
413 | embed: {
414 | description: `Please wait for a **ADMIN** response!!
415 | Press **"🔒"** to close this ticket`,
416 | color: 0x2F3136
417 | },
418 | component: row
419 | });
420 | });
421 | } else if (button.id == 'claimTicketin') {
422 | if (!button.channel.name.includes("ticket-")) {
423 | return;
424 | }
425 | var member = require('quick.db').fetch(`TicketControl_${button.channel.id}`);
426 | button.channel.overwritePermissions([{
427 | id: member,
428 | allow: ['VIEW_CHANNEL', 'SEND_MESSAGES']
429 | },
430 | {
431 | id: require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`),
432 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
433 | }, {
434 | id: button.guild.roles.everyone,
435 | deny: ["VIEW_CHANNEL"]
436 | }
437 | ]);
438 | button.message.edit({
439 | embed: {
440 |
441 | description: `Please wait for an Admin to respond!!\n\n__**Please Tell Us What You Wish to claim!**__\n\n**<:hydroxreply:887741912180727849>Ticket Category: Claim**\nEdited by: __**${button.clicker.user.tag}**__\n
442 | Press **🔒** to close this ticket`,
443 | color: 0x2F3136
444 | }
445 | })
446 | } else if (button.id == 'claimTicketin2') {
447 | if (!button.channel.name.includes("ticket-")) {
448 | return;
449 | }
450 | var member = require('quick.db').fetch(`TicketControl_${button.channel.id}`);
451 | button.channel.overwritePermissions([{
452 | id: member,
453 | allow: ['VIEW_CHANNEL', 'SEND_MESSAGES']
454 | },
455 | {
456 | id: require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`),
457 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
458 | }, {
459 | id: button.guild.roles.everyone,
460 | deny: ["VIEW_CHANNEL"]
461 | }
462 | ]);
463 | button.message.edit({
464 | embed: {
465 | description: `Please wait for an Admin to respond!!\n\n__**Please Tell Us What You Wish To Claim!**__\n\n**<:hydroxreply:887741912180727849>Ticket Category: Claim**\nReverted by: __**${button.clicker.user.tag}**__\n
466 | Press **🔒** to close this ticket`,
467 | color: 0x2F3136
468 | }
469 | })
470 | } else if (button.id == 'otherTicketin') {
471 | if (!button.channel.name.includes("ticket-")) {
472 | return;
473 | }
474 | var member = require('quick.db').fetch(`TicketControl_${button.channel.id}`);
475 | button.channel.overwritePermissions([{
476 | id: member,
477 | allow: ['VIEW_CHANNEL', 'SEND_MESSAGES']
478 | },
479 | {
480 | id: require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`),
481 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
482 | }, {
483 | id: button.guild.roles.everyone,
484 | deny: ["VIEW_CHANNEL"]
485 | }
486 | ]);
487 | button.message.edit({
488 | embed: {
489 | description: `Please wait for an Admin to respond!!\n\n__**Please Tell Us What You Need Help On!**__\n\n**<:hydroxreply:887741912180727849>Ticket Category: Other**\nEdited by: __**${button.clicker.user.tag}**__\n
490 | Press **🔒** to close this ticket`,
491 | color: 0x2F3136
492 | }
493 | })
494 | } else if (button.id == 'otherTicketin2') {
495 | if (!button.channel.name.includes("ticket-")) {
496 | return;
497 | }
498 | var member = require('quick.db').fetch(`TicketControl_${button.channel.id}`);
499 | button.channel.overwritePermissions([{
500 | id: member,
501 | allow: ['VIEW_CHANNEL', 'SEND_MESSAGES']
502 | },
503 | {
504 | id: require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`),
505 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
506 | }, {
507 | id: button.guild.roles.everyone,
508 | deny: ["VIEW_CHANNEL"]
509 | }
510 | ]);
511 | button.message.edit({
512 | embed: {
513 | description: `Please wait for an Admin to respond!!\n\n__**Please Tell Us What You Need!**__\n\n**<:hydroxreply:887741912180727849>Ticket Category: Other**\nReverted by: __**${button.clicker.user.tag}**__\n
514 | Press **🔒** to close this ticket`,
515 | color: 0x2F3136
516 | }
517 | })
518 | } else if (button.id == 'pin') {
519 | if (!button.channel.name.includes("ticket-")) {
520 | return;
521 | }
522 | var member = require('quick.db').fetch(`TicketControl_${button.channel.id}`);
523 | button.channel.overwritePermissions([{
524 | id: member,
525 | allow: ['VIEW_CHANNEL', 'SEND_MESSAGES']
526 | },
527 | {
528 | id: require('quick.db').fetch(`TicketAdminRole_${button.guild.id}`),
529 | allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
530 | }, {
531 | id: button.guild.roles.everyone,
532 | deny: ["VIEW_CHANNEL"]
533 | }
534 | ]);
535 | button.channel.setName(`📌-pinned-ticket`)
536 | let btn = new MessageButton()
537 | .setStyle("grey")
538 | .setEmoji("🗑️")
539 |
540 | .setLabel("Force Close")
541 | .setID("pin-close");
542 | let row = new MessageActionRow()
543 | .addComponent(btn);
544 | button.channel.send({
545 | embed: {
546 | description: `\`\`\`I Have Pinned This Ticket!\nPinned by: ${button.clicker.user.tag}\nPress **🗑️** to force close this pinned ticket.\`\`\``,
547 | color: 0x2F3136
548 | },
549 | component: row
550 |
551 | })
552 | } else if (button.id == 'renameTicketFalse') {
553 | var msg = require('quick.db').fetch(`DeleteRenameMessage_${button.channel.id}`);
554 | button.channel.messages.fetch(msg).then(message => message.delete()).catch(err => { return });
555 | require('quick.db').delete(`DeleteRenameMessage_${button.channel.id}`);
556 | } else if (button.id == 'renameTicketTrue') {
557 | var msg = require('quick.db').fetch(`DeleteRenameMessage_${button.channel.id}`);
558 | button.channel.messages.fetch(msg).then(message => message.delete()).catch(err => { return });
559 | button.channel.setName('ticket-' + require('quick.db').fetch(`RenameTicket_${button.channel.id}`));
560 | button.channel.send({
561 | embed: {
562 | title: '✅',
563 | description: `this ticket name has been renamed to \`${require('quick.db').fetch(`RenameTicket_${button.channel.id}`)}\``,
564 | color: 0x00D700
565 | }
566 | })
567 | require('quick.db').delete(`DeleteRenameMessage_${button.channel.id}`);
568 | }
569 | } catch (err) {
570 | console.log(err)
571 | }
572 | }
573 |
--------------------------------------------------------------------------------
/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 (client) => {
5 | client.Ready = true;
6 | client.user.setActivity("motchys ticket bot", { type: "STREAMING", url:"https://www.twitch.tv/captain_motchy" }).then(() => {
7 | client.Manager.init(client.user.id);
8 | client.log("Successfully Logged in as " + client.user.tag);
9 | });
10 | client.RegisterSlashCommands();
11 | };
12 |
--------------------------------------------------------------------------------
/src/config/bot.js:
--------------------------------------------------------------------------------
1 | require('dotenv').config();
2 |
3 | module.exports = {
4 | token: process.env.TOKEN,
5 | prefix: process.env.PREFIX
6 | }
7 | // I have made all of this .envs!
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | const { Client, Collection } = require("discord.js");
2 | const Discord = require('discord.js');
3 | const emoji = require('./../emoji.json')
4 |
5 | const client = new Client();
6 | require('discord-buttons')(client);
7 | const chalk = require("chalk");
8 | const fs = require("fs");
9 |
10 | client.commands = new Collection();
11 |
12 | fs.readdir(__dirname + "/bot/events/", (err, files) => {
13 | if (err) return console.error(err);
14 | files.forEach(file => {
15 | if (!file.endsWith(".js")) return;
16 | let event = require(__dirname + "/bot/events/" + file);
17 | let eventName = file.split(".")[0];
18 | console.log(
19 | chalk.blue.bold("Loading event ") + chalk.magenta.bold(`"${eventName}"`)
20 | );
21 | client.on(eventName, event.bind(null, client));
22 | });
23 | });
24 |
25 | fs.readdir(__dirname + "/bot/commands/", (err, files) => {
26 | if (err) return console.error(err);
27 | files.forEach(file => {
28 | if (!file.endsWith(".js")) return;
29 | let props = require(__dirname + "/bot/commands/" + file);
30 | let commandName = file.split(".")[0];
31 | console.log(
32 | chalk.blue.bold("Loading command ") + chalk.red.bold(`"${commandName}"`)
33 | );
34 | client.commands.set(commandName, props);
35 | });
36 | });
37 |
38 | client.on('guildCreate', guild => {
39 | const botownerid = "608088106305978370";
40 | const botownerid2 = "608088106305978370";
41 | const serverjoinch = client.channels.cache.get("878005964014485584")
42 | //const botownerfix = client.users.fetch(botownerid);
43 | const botowner = client.users.cache.get("608088106305978370");
44 | const botowner2 = client.users.cache.get("608088106305978370");
45 | if(!botowner) console.log("Cannot find bot owner, please add one!")
46 | console.log(botowner)
47 | const join = new Discord.MessageEmbed()
48 | .setThumbnail(guild.iconURL({ dynamic: true }) || null)
49 | .setTitle(`Hi, Thanks For Inviting Ticket Bot in, ${guild.name}`)
50 | .setDescription("We've Looked Around And Found That We Don't Quite Have All The Permissions We Need To Function Properly Though. To Fix This So You Can Properly Use The Bot, A Link's Been Generated Which Will Give All The Relevent Permissions To The Bot\n\n")
51 | .setFooter("Thanks For Using Me!")
52 | .setColor("RANDOM")
53 | .setTimestamp();
54 | const ownerembed = new Discord.MessageEmbed()
55 | .setTitle(`${emoji.join} Joined A New Server | ${guild.name}`)
56 | .setDescription(`${emoji.members} **${guild.name}** | (\`${guild.id}\`)`)
57 | .setThumbnail(guild.iconURL({ dynamic: true }) || null)
58 | .addField("> Server Owner", `> ${emoji.dot} ${guild.owner}`)
59 | .addField("> Membercount", `> ${emoji.dot} ${guild.memberCount}`)
60 | .addField("> Server Bot Is In", `> ${emoji.dot} ${client.guilds.cache.size}`)
61 | .addField(`${emoji.leave} Get Bot Out Of There -`, `\`\`\`leaveserver ${guild.id}\`\`\``)
62 | .setFooter("Thanks For Using Me!")
63 | .setColor("RANDOM")
64 | .setTimestamp()
65 | try {
66 | botowner.send(ownerembed)
67 | botowner2.send(ownerembed)
68 | serverjoinch.send(ownerembed)
69 | } catch(err) {
70 | return;
71 | }
72 | })
73 | ///////////////////////////////////////////
74 | client.on('guildDelete', guild => {
75 | const owneridforleave = '693553429380857978';
76 | const owneridforleave2 = "700185351318405232";
77 | const serverleavech = client.channels.cache.get("878005964014485584")
78 | const botownerforleave = client.users.cache.get(owneridforleave);
79 | const botownerforleave2 = client.users.cache.get(owneridforleave2);
80 | const leaveembed = new Discord.MessageEmbed()
81 | .setTitle(`${emoji.leave} Left a Guild | ${guild.name}`)
82 | .setDescription(`${emoji.members} **${guild.name}** | (\`${guild.id}\`)`)
83 | .setThumbnail(guild.iconURL({ dynamic: true }) || null)
84 | .addField("> Server Owner", `> ${emoji.dot} ${guild.owner}`)
85 | .addField("> MemberCount", `> ${emoji.dot} ${guild.memberCount}`)
86 | .addField("> Server Bot Is In", `> ${emoji.dot} ${client.guilds.cache.size}`)
87 | .setColor("RANDOM")
88 | .setTimestamp()
89 | try{
90 | //console.log(botownerforleave)
91 | botownerforleave.send(leaveembed)
92 | botownerforleave2.send(leaveembed)
93 | serverleavech.send(leaveembed)
94 | } catch (err) {
95 | return;
96 | }
97 | });
98 |
99 | client.login(require("./config/bot").token).catch(err => console.log(chalk.red.bold(err)))
100 | require("http").createServer((_, res) => res.end("Copyright 2020-2021 captain motchy\n\nLinks:\n https://dsc.gg/dst74\n\nDONT REMOVE CREDITS")).listen(8080)
--------------------------------------------------------------------------------