Compare commits
363
Commits
SupportBot
...
6.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ce049a57e | ||
|
|
d4c4eac710 | ||
|
|
28ec96e5e8 | ||
|
|
a20fe8eb06 | ||
|
|
7d1d9b881d | ||
|
|
c116e6cbb0 | ||
|
|
a3ebf0a33b | ||
|
|
ea6ef022e7 | ||
|
|
683e29196a | ||
|
|
71694d7082 | ||
|
|
c5d5656fb6 | ||
|
|
b1fdbee5f8 | ||
|
|
70405a1cd0 | ||
|
|
3d7e81169f | ||
|
|
fa7c8c7219 | ||
|
|
358a25f522 | ||
|
|
690169a409 | ||
|
|
0ec4cc5a51 | ||
|
|
0b7dbaf368 | ||
|
|
940c445182 | ||
|
|
d8a90c9aa5 | ||
|
|
89ee8fceca | ||
|
|
68b55a2d33 | ||
|
|
8cc2e7747f | ||
|
|
4e6ac3a294 | ||
|
|
732e22ea7b | ||
|
|
ac0d9981f8 | ||
|
|
23f7310760 | ||
|
|
02a9ce6bac | ||
|
|
069665358f | ||
|
|
2cf6d69127 | ||
|
|
870435061d | ||
|
|
53ad906491 | ||
|
|
01399e343b | ||
|
|
a0bdec4c42 | ||
|
|
914f2057d8 | ||
|
|
ed9b9dca79 | ||
|
|
f6d4383ff6 | ||
|
|
b6ccf30ae4 | ||
|
|
48e44a0d38 | ||
|
|
735998b48c | ||
|
|
d94eefddb7 | ||
|
|
5a65b4df17 | ||
|
|
15a839a310 | ||
|
|
9730c61962 | ||
|
|
1805c041a6 | ||
|
|
f0bde93d5f | ||
|
|
1ed7412f92 | ||
|
|
1f5ea2d25b | ||
|
|
ff4c8f0e85 | ||
|
|
5c3dd878b8 | ||
|
|
20f0d91c75 | ||
|
|
894e48756f | ||
|
|
aef199b292 | ||
|
|
9b884cd941 | ||
|
|
b22d813cee | ||
|
|
0981566cbe | ||
|
|
0647aa435a | ||
|
|
58179f98e9 | ||
|
|
05fe62536b | ||
|
|
241d41e220 | ||
|
|
34d6134c24 | ||
|
|
702d1d1998 | ||
|
|
e43a5fd5a3 | ||
|
|
4ed9a7b7f5 | ||
|
|
d8ba76e395 | ||
|
|
448004abca | ||
|
|
7b0db34fb1 | ||
|
|
a7e7d5b372 | ||
|
|
9768628e8b | ||
|
|
6c0328b2fd | ||
|
|
6bf7d879e2 | ||
|
|
f25490f1ad | ||
|
|
31eee78535 | ||
|
|
4ed2aff1b7 | ||
|
|
6f05545be6 | ||
|
|
dfec8a0e4f | ||
|
|
47b730111b | ||
|
|
59ba27c36f | ||
|
|
b501164c38 | ||
|
|
1b795087bf | ||
|
|
7063edc10f | ||
|
|
c02abcb760 | ||
|
|
2d1a20dcc6 | ||
|
|
65156d4b20 | ||
|
|
951cedb190 | ||
|
|
11442f320d | ||
|
|
33df21f656 | ||
|
|
19ab208678 | ||
|
|
59b9651575 | ||
|
|
c1c1f1767a | ||
|
|
dda8a5180c | ||
|
|
34d558412f | ||
|
|
be77ee1903 | ||
|
|
fc571d6c73 | ||
|
|
7ca5a97535 | ||
|
|
730239ba8d | ||
|
|
9069e23188 | ||
|
|
366203fe21 | ||
|
|
f23f15c972 | ||
|
|
8432290a70 | ||
|
|
ceddd503f8 | ||
|
|
51ad35f72b | ||
|
|
5631b24a14 | ||
|
|
f9da25643d | ||
|
|
75bed3f5dd | ||
|
|
d4576dfc21 | ||
|
|
31bad3c2e5 | ||
|
|
a3c0e81e04 | ||
|
|
b5cf721efb | ||
|
|
95063398aa | ||
|
|
2da25c5566 | ||
|
|
a72c1ab380 | ||
|
|
87b9301e20 | ||
|
|
d0a6bed727 | ||
|
|
29881fbf28 | ||
|
|
4f05ad6546 | ||
|
|
36fc9aae6c | ||
|
|
fb3f87c685 | ||
|
|
a4c0eeb9b3 | ||
|
|
c64f249fd0 | ||
|
|
48b542293f | ||
|
|
95e92970c9 | ||
|
|
afdb16da07 | ||
|
|
0a230cfab9 | ||
|
|
c752a07ad0 | ||
|
|
cc5a6b7317 | ||
|
|
d93991ad86 | ||
|
|
5c98376a8c | ||
|
|
28699f0ff0 | ||
|
|
e3576b17b1 | ||
|
|
17c49b2b03 | ||
|
|
dcc00d8d1f | ||
|
|
05a772eee2 | ||
|
|
59dd291dc6 | ||
|
|
f0a791e354 | ||
|
|
94db6cff7b | ||
|
|
72a02bf6d2 | ||
|
|
cf99209887 | ||
|
|
ff7ed49905 | ||
|
|
ecd17a51df | ||
|
|
63b08f8c12 | ||
|
|
3077772aff | ||
|
|
f40aa9ed14 | ||
|
|
4ae6dc3a69 | ||
|
|
bdb8389d8d | ||
|
|
f7254c7ec7 | ||
|
|
3701156362 | ||
|
|
575d25f5ad | ||
|
|
698b82c7d3 | ||
|
|
eaa9da6d2e | ||
|
|
ca7294a0e3 | ||
|
|
5281ffce60 | ||
|
|
2f84fd3b33 | ||
|
|
bef270da74 | ||
|
|
bdf839ffca | ||
|
|
b1b2ead0d8 | ||
|
|
0b74473c64 | ||
|
|
2fb189cf5c | ||
|
|
24a29639e9 | ||
|
|
50258dc359 | ||
|
|
d9c6b7698f | ||
|
|
f042f34ae2 | ||
|
|
c087edc14f | ||
|
|
d96ccc3265 | ||
|
|
018ef19efd | ||
|
|
159317a15a | ||
|
|
34583c96bf | ||
|
|
887d3d3ab4 | ||
|
|
f2de39de33 | ||
|
|
8173c31a60 | ||
|
|
80a2871741 | ||
|
|
3b37e9c420 | ||
|
|
730ba561bc | ||
|
|
4d7ddc9d6f | ||
|
|
680f71a602 | ||
|
|
170a7b50b9 | ||
|
|
805c48c1bb | ||
|
|
7d92ed51bb | ||
|
|
f849897f29 | ||
|
|
75e0f1ad1e | ||
|
|
2f015aff2b | ||
|
|
bb322adb2f | ||
|
|
6ee0981885 | ||
|
|
877fb0f201 | ||
|
|
ded4b9094a | ||
|
|
36ab931998 | ||
|
|
20baddfcca | ||
|
|
d180c147db | ||
|
|
86fa91cc52 | ||
|
|
b8c12a0307 | ||
|
|
eff2f9c195 | ||
|
|
8a8597afef | ||
|
|
067e619488 | ||
|
|
f7f8bc8c55 | ||
|
|
0c71fd7e59 | ||
|
|
5b2bd21c06 | ||
|
|
9ac68f68e2 | ||
|
|
aa32f00b0d | ||
|
|
bd5f5dffad | ||
|
|
645ad63f4f | ||
|
|
c83c6afecc | ||
|
|
689a191d4c | ||
|
|
5767ba0de5 | ||
|
|
cdf78f2598 | ||
|
|
d23f46ad9e | ||
|
|
8453fa5007 | ||
|
|
0bd990a9e3 | ||
|
|
9c8ee1471b | ||
|
|
87262e82a3 | ||
|
|
953db88ed2 | ||
|
|
a44bb949eb | ||
|
|
9d11369059 | ||
|
|
8c92f39349 | ||
|
|
bce9d733d3 | ||
|
|
525c216401 | ||
|
|
c145e9f11d | ||
|
|
53700003f1 | ||
|
|
03094a4c35 | ||
|
|
934ebed24f | ||
|
|
9f469e1637 | ||
|
|
77fe39774d | ||
|
|
186d688ec8 | ||
|
|
de3181b5c7 | ||
|
|
6d53234f7a | ||
|
|
b0d3673f4b | ||
|
|
e40083f585 | ||
|
|
f7b702fa29 | ||
|
|
5089a19a56 | ||
|
|
d77e9842aa | ||
|
|
88ae76a25a | ||
|
|
9b0b0d10a1 | ||
|
|
68340a8b02 | ||
|
|
d14f0966d5 | ||
|
|
e4b83f28c4 | ||
|
|
1925deec90 | ||
|
|
e9ba960b29 | ||
|
|
821f0f5b60 | ||
|
|
8fa8915673 | ||
|
|
5405aa469e | ||
|
|
cfa50b4e8c | ||
|
|
c5014baeb4 | ||
|
|
c14f120ec2 | ||
|
|
b72fcf39da | ||
|
|
6da3b0cba0 | ||
|
|
752387a02d | ||
|
|
32d3e1b957 | ||
|
|
a029dff202 | ||
|
|
89e1b85a56 | ||
|
|
4350eb709c | ||
|
|
2b1b6e916e | ||
|
|
3f6f9045bd | ||
|
|
8294496faa | ||
|
|
9f58118ecd | ||
|
|
3ba9d42587 | ||
|
|
e496a5f3d0 | ||
|
|
04e2bb29b0 | ||
|
|
131a7a015c | ||
|
|
6f430f5f14 | ||
|
|
0154c106ef | ||
|
|
04de6e6fc0 | ||
|
|
2b17e5f842 | ||
|
|
0dc8c1e68a | ||
|
|
67b291eb09 | ||
|
|
d7865a5a4e | ||
|
|
d1809587a8 | ||
|
|
64ec4dfd53 | ||
|
|
6e07d21a3d | ||
|
|
018e47bd53 | ||
|
|
065a2e9347 | ||
|
|
b53307c7fd | ||
|
|
e4cc0d960e | ||
|
|
3336824df7 | ||
|
|
166173d53c | ||
|
|
45da2d7924 | ||
|
|
af14a65ef5 | ||
|
|
9049a4b9ad | ||
|
|
2f4873ab9a | ||
|
|
0fb25d71dc | ||
|
|
34b6901434 | ||
|
|
a90b43aba3 | ||
|
|
0ac5c2c300 | ||
|
|
6290fee7bd | ||
|
|
320992f3fa | ||
|
|
bd714f0c93 | ||
|
|
45d3867c1f | ||
|
|
deafa66565 | ||
|
|
ce8fcdaa7a | ||
|
|
b83965c144 | ||
|
|
2505a8cab8 | ||
|
|
21e598bb31 | ||
|
|
ee2f3c0dfc | ||
|
|
197bda14b8 | ||
|
|
d416c2e421 | ||
|
|
6bc2e669e4 | ||
|
|
9accb65256 | ||
|
|
d9212584ca | ||
|
|
1a7effb422 | ||
|
|
1480435f15 | ||
|
|
64c6a97657 | ||
|
|
7ae2ff9837 | ||
|
|
f19dec405d | ||
|
|
bbd4e9d162 | ||
|
|
58deff0869 | ||
|
|
628632f43e | ||
|
|
436586117c | ||
|
|
7234ec728c | ||
|
|
fc4d68be39 | ||
|
|
bcf2df4bff | ||
|
|
70a469a951 | ||
|
|
981995cb32 | ||
|
|
406c7d368b | ||
|
|
5c266d8b8d | ||
|
|
4f5b94a491 | ||
|
|
284c83cc1d | ||
|
|
23f06af202 | ||
|
|
82be317595 | ||
|
|
a43c76529f | ||
|
|
26065c2a5c | ||
|
|
6b1dfe01cf | ||
|
|
72443fb7c6 | ||
|
|
28cad23746 | ||
|
|
ebc0d4b137 | ||
|
|
4b198acda7 | ||
|
|
b84c3c75a5 | ||
|
|
de0ec97d9b | ||
|
|
a8302cd276 | ||
|
|
35d8d77f15 | ||
|
|
f853394d9d | ||
|
|
500c01dd1f | ||
|
|
71bfccfb0c | ||
|
|
71e1b64818 | ||
|
|
2118a00a36 | ||
|
|
1c69c21f21 | ||
|
|
31c76fc1c0 | ||
|
|
d31cdf8af2 | ||
|
|
29b5fd2c6f | ||
|
|
aa32525f8c | ||
|
|
f6a67a3373 | ||
|
|
4f78858641 | ||
|
|
c7e70bdaf8 | ||
|
|
5479e0957b | ||
|
|
8500554cfb | ||
|
|
368727cece | ||
|
|
742faf3805 | ||
|
|
7d08cbed84 | ||
|
|
f413bb5f3c | ||
|
|
2b3edc7b45 | ||
|
|
83f982f8d2 | ||
|
|
890a1d41b1 | ||
|
|
996a2c26ca | ||
|
|
fadf042101 | ||
|
|
a819078d7f | ||
|
|
2c9b4c663d | ||
|
|
22e6803e14 | ||
|
|
61cecb112f | ||
|
|
0c18aff34d | ||
|
|
599649a97f | ||
|
|
45194b82da | ||
|
|
570d0985d3 | ||
|
|
5eae625b28 | ||
|
|
fcc5460ff2 | ||
|
|
07d45e50de |
No files matched your search
@@ -1,2 +0,0 @@
|
|||||||
# Auto detect text files and perform LF normalization
|
|
||||||
* text=auto
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a bug report to help us improve SupportBot.
|
|
||||||
title: "[BUG]"
|
|
||||||
labels: bug
|
|
||||||
assignees: EmeraldRusher
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Describe the bug**
|
|
||||||
A clear and concise description of the bug you found and how you found it.
|
|
||||||
|
|
||||||
**How did you find it**
|
|
||||||
Please could explain what you did to find the bug?
|
|
||||||
|
|
||||||
**Expected behavior**
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
**Screenshots**
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Feel free to notify with us with anything else about the problem here.
|
|
||||||
-76
@@ -1,76 +0,0 @@
|
|||||||
# Logs
|
|
||||||
logs
|
|
||||||
*.log
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
|
|
||||||
# Runtime data
|
|
||||||
pids
|
|
||||||
*.pid
|
|
||||||
*.seed
|
|
||||||
*.pid.lock
|
|
||||||
|
|
||||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
||||||
lib-cov
|
|
||||||
|
|
||||||
# Coverage directory used by tools like istanbul
|
|
||||||
coverage
|
|
||||||
|
|
||||||
# nyc test coverage
|
|
||||||
.nyc_output
|
|
||||||
|
|
||||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
||||||
.grunt
|
|
||||||
|
|
||||||
# Bower dependency directory (https://bower.io/)
|
|
||||||
bower_components
|
|
||||||
|
|
||||||
# node-waf configuration
|
|
||||||
.lock-wscript
|
|
||||||
|
|
||||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
||||||
build/Release
|
|
||||||
|
|
||||||
# Dependency directories
|
|
||||||
node_modules/
|
|
||||||
jspm_packages/
|
|
||||||
|
|
||||||
# TypeScript v1 declaration files
|
|
||||||
typings/
|
|
||||||
|
|
||||||
# Optional npm cache directory
|
|
||||||
.npm
|
|
||||||
|
|
||||||
# Optional eslint cache
|
|
||||||
.eslintcache
|
|
||||||
|
|
||||||
# Optional REPL history
|
|
||||||
.node_repl_history
|
|
||||||
|
|
||||||
# Output of 'npm pack'
|
|
||||||
*.tgz
|
|
||||||
|
|
||||||
# Yarn Integrity file
|
|
||||||
.yarn-integrity
|
|
||||||
|
|
||||||
# dotenv environment variables file
|
|
||||||
.env
|
|
||||||
|
|
||||||
# parcel-bundler cache (https://parceljs.org/)
|
|
||||||
.cache
|
|
||||||
|
|
||||||
# next.js build output
|
|
||||||
.next
|
|
||||||
|
|
||||||
# nuxt.js build output
|
|
||||||
.nuxt
|
|
||||||
|
|
||||||
# vuepress build output
|
|
||||||
.vuepress/dist
|
|
||||||
|
|
||||||
# Serverless directories
|
|
||||||
.serverless
|
|
||||||
|
|
||||||
# FuseBox cache
|
|
||||||
.fusebox/
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2021 Emerald Services
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -1,94 +1,10 @@
|
|||||||
<h1 align="center">SupportBot v3.4</h1>
|
> #### SupportBot
|
||||||
<h4 align="center">A Self Hosted discord application</h4>
|
>
|
||||||
|
> - SupportBot is a free to use discord ticket system that is highly customisable to your own brand,
|
||||||
<p align="center">
|
Why use a branded ticket bot when you have the ability to match your ticket bot with your servers name.
|
||||||
<a href="https://discord.gg/hmWgxdF">
|
>
|
||||||
<img src="https://discordapp.com/api/guilds/516345301985132552/widget.png?style=shield" alt="Discord Server">
|
> - Our Support team is over at [Discord](https://discord.com/invite/jspKFcE) ready to assist with any questions, concerns or setup information regarding SupportBot.
|
||||||
</a>
|
>
|
||||||
<img src="https://img.shields.io/badge/Made%20with-NodeJS-blue.svg" alt="Made with NodeJS">
|
> - [Download via Polymart](https://polymart.org/resource/supportbot-1-discord-ticket-bot.518)
|
||||||
</p>
|
> - [Download via MC-Market](https://www.mc-market.org/resources/8940/)
|
||||||
|
|
||||||
SupportBot is a free & open source discord bot for your server that has the capability to control & manage your servers support.
|
|
||||||
|
|
||||||
| Version | Supported | Type |
|
|
||||||
| ------- | ------------------ |--------------------|
|
|
||||||
| 1.0.x | ❌ | None |
|
|
||||||
| 2.0.x | ⚠ | Community |
|
|
||||||
| 3.0.x | ✅ | Priority |
|
|
||||||
| 4.0.x | ❌ | N/A |
|
|
||||||
| Premium | ❌ | N/A |
|
|
||||||
|
|
||||||
# Getting Started
|
|
||||||
Firstly you will need to download the resource, Once you have downloaded the resource open a new tab in your browser and go to https://discordapp.com/developers/applications/. Create a new application and then open your app and select bot and then create your bot. Copy the bot token and paste it where it says ``"token": "BOT TOKEN HERE",`` in the ``settings.json`` file.
|
|
||||||
|
|
||||||
# Invite the bot
|
|
||||||
Head back to discord developers portal where your application is and head into the ``OAuth`` tab and select bot and then below select ``Administrator`` then copy the link and paste into your browser and it should as your to invite the bot to a server.
|
|
||||||
|
|
||||||
# Configurating SupportBot
|
|
||||||
Once you have setup your discord application such as invited the bot and added your bot token to the ``settings.json`` we can begin configurating your bot. Firstly open up the ``settings.json`` file and you will see loads of different things to config. You will see the following below:
|
|
||||||
|
|
||||||
```
|
|
||||||
"prefix": "!",
|
|
||||||
"botname": "SupportBot",
|
|
||||||
"colour": "#42f477",
|
|
||||||
"footer": "Support Bot, By Emerald",
|
|
||||||
|
|
||||||
"BotStatus": "Support Bot",.
|
|
||||||
|
|
||||||
"staff": "Staff",
|
|
||||||
"support": "Support Team",
|
|
||||||
"everyone": "@everyone",
|
|
||||||
|
|
||||||
"category": "Tickets",
|
|
||||||
"Ticket_Message": "Your support ticket has been opened successfully\nPlease allow us some time to reach out to you.",
|
|
||||||
"Ticket_Logs": "ticket-logs",
|
|
||||||
|
|
||||||
"Announcement_Title": "SupportBot Announcement",
|
|
||||||
"Announcement_Channel": "announcements",
|
|
||||||
|
|
||||||
"Welcome_Message": "Welcome to the server!",
|
|
||||||
"Welcome_Channel": "welcome",
|
|
||||||
|
|
||||||
"Leave_Message": "Thank you for visiting us!",
|
|
||||||
"Leave_Channel": "welcome",
|
|
||||||
|
|
||||||
"Poll_Channel": "polls",
|
|
||||||
"Poll_Title": "📊 Polls",
|
|
||||||
"Reaction_Poll_1": "✅",
|
|
||||||
"Reaction_Poll_2": "❎",
|
|
||||||
|
|
||||||
"Suggestion_Title": "SupportBot Suggestions",
|
|
||||||
"Suggestion_Channel": "suggestions",
|
|
||||||
"suggestyes": "✅",
|
|
||||||
"suggestno": "❎",
|
|
||||||
|
|
||||||
"LINK_1_NAME": "Discord",
|
|
||||||
"LINK_2_NAME": "Twitter",
|
|
||||||
"LINK_3_NAME": "Website",
|
|
||||||
|
|
||||||
"LINK_1": "https://dicord.gg/changemeinconfig",
|
|
||||||
"LINK_2": "https://twitter.com/changemeinconfig",
|
|
||||||
"LINK_3": "https://www.example.com/",
|
|
||||||
|
|
||||||
"LINKS_TITLE": "SupportBot Links",
|
|
||||||
|
|
||||||
"Ticket_Command": "ticket",
|
|
||||||
"Suggest_Command": "suggest",
|
|
||||||
"Say_Command": "say",
|
|
||||||
"Remove_Command": "remove",
|
|
||||||
"Add_Command": "add",
|
|
||||||
"Ping_Command": "ping",
|
|
||||||
"Close_Command": "close",
|
|
||||||
"Forceclose_Command": "forceclose",
|
|
||||||
"Rename_Command": "rename",
|
|
||||||
"Help_Command": "help",
|
|
||||||
"Link_Command": "links",
|
|
||||||
"Lockchat_Command": "lock",
|
|
||||||
"UnLockchat_Command": "unlock",
|
|
||||||
"Poll_Command": "poll"
|
|
||||||
```
|
|
||||||
|
|
||||||
# Contributors List
|
|
||||||
|
|
||||||
# Donators List
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
theme: jekyll-theme-cayman
|
|
||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Help Command
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
// location for the addons configuration, to keep it simple we generate a settings folder within the addons directory.
|
||||||
|
const example = yaml.load(fs.readFileSync('./addons/settings/exampleaddon.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: example.ExampleAddonCommand,
|
||||||
|
description: example.ExampleAddonDesc,
|
||||||
|
|
||||||
|
execute(message, args) {
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
message.channel.send(example.ExampleAddonMessage)
|
||||||
|
}
|
||||||
|
};
|
||||||
Vendored
BIN
Binary file not shown.
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
#
|
||||||
|
# SupportBot, Created by Emerald Services
|
||||||
|
# Example Addon
|
||||||
|
#
|
||||||
|
|
||||||
|
ExampleAddonCommand: "exampleaddon"
|
||||||
|
ExampleAddonDesc: "This is the default/example addon for SupportBot."
|
||||||
|
|
||||||
|
ExampleAddonMessage: "> :white_check_mark: This is the **default** addon for SupportBot. You can download addons from our website, https://emeraldservices.xyz/"
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
// SupportBot
|
|
||||||
// Command: Add User
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
|
||||||
const bot = new Discord.Client()
|
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
|
||||||
|
|
||||||
module.exports.run = async (bot, message, args) => {
|
|
||||||
message.delete()
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Add_Command}`)
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === bot.settings.support)
|
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.support}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!staffGroup) return message.reply({embed: rolemissing});
|
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.support}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole});
|
|
||||||
|
|
||||||
const outsideticket = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!message.channel.name.startsWith(`ticket-`)) return message.channel.send({embed: outsideticket});
|
|
||||||
|
|
||||||
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));
|
|
||||||
|
|
||||||
const cantfinduser = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Hmm! Does that user exist? I cannot find the user.`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if(!rUser) return message.channel.send({embed: cantfinduser});
|
|
||||||
|
|
||||||
const channel = message.guild.channels.find(channel => channel.name === message.channel.name);
|
|
||||||
|
|
||||||
const cantfindchannel = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Hmm! Does that ticket exist? I cannot find the ticket channel.`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if(!channel) return message.channel.send({embed: cantfindchannel});
|
|
||||||
message.delete().catch(O_o=>{});
|
|
||||||
|
|
||||||
message.channel.overwritePermissions(rUser, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
|
||||||
|
|
||||||
const useradded = new Discord.RichEmbed()
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setDescription(`:white_check_mark: Successfully Added ${rUser} to the ticket.`)
|
|
||||||
.setTimestamp();
|
|
||||||
|
|
||||||
message.channel.send({embed: useradded});
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has successfully added ${rUser} to ${message.channel}`)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: bot.settings.Add_Command,
|
|
||||||
}
|
|
||||||
Executable
+65
@@ -0,0 +1,65 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Add User
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: supportbot.AddUser,
|
||||||
|
description: supportbot.AddUserDesc,
|
||||||
|
|
||||||
|
execute(message, args) {
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.AddUser}!`);
|
||||||
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff)
|
||||||
|
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin)
|
||||||
|
|
||||||
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Permissions!")
|
||||||
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${supportbot.Staff}\` or \`${supportbot.Admin}\``)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (message.member.roles.cache.has(SupportStaff.id) || message.member.roles.cache.has(Admins.id)) {
|
||||||
|
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
||||||
|
const Exists = new Discord.MessageEmbed()
|
||||||
|
.setTitle("No Ticket Found!")
|
||||||
|
.setDescription(`${supportbot.NoValidTicket}`)
|
||||||
|
.setColor(supportbot.WarningColour);
|
||||||
|
message.channel.send({ embed: Exists });
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
|
||||||
|
const UserNotExist = new Discord.MessageEmbed()
|
||||||
|
.setTitle("User Not Found!")
|
||||||
|
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${supportbot.AddUser} <user#0000>\``)
|
||||||
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
|
if (!rUser) return message.channel.send({ embed: UserNotExist });
|
||||||
|
|
||||||
|
message.channel.updateOverwrite(rUser, {
|
||||||
|
VIEW_CHANNEL: true,
|
||||||
|
CREATE_INVITE: false,
|
||||||
|
SEND_MESSAGES: true,
|
||||||
|
READ_MESSAGES: true
|
||||||
|
});
|
||||||
|
|
||||||
|
const Complete = new Discord.MessageEmbed()
|
||||||
|
.setTitle("User Added!")
|
||||||
|
.setDescription(supportbot.AddedUser.replace(/%user%/g, rUser.id))
|
||||||
|
.setTimestamp()
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({ embed: Complete });
|
||||||
|
} else {
|
||||||
|
|
||||||
|
return message.channel.send({ embed: NoPerms });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
Executable
+73
@@ -0,0 +1,73 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Announce
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const { execute } = require("./help");
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: supportbot.AnnounceCommand,
|
||||||
|
description: supportbot.AnnounceDesc,
|
||||||
|
|
||||||
|
execute(message, args) {
|
||||||
|
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
|
||||||
|
let locateChannel = message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.name === supportbot.AnnouncementChannel);
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.AnnounceCommand}!`);
|
||||||
|
|
||||||
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Channel")
|
||||||
|
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.AnnouncementChannel}`)
|
||||||
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
|
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
||||||
|
|
||||||
|
let Admins = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin);
|
||||||
|
|
||||||
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Permissions!")
|
||||||
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${Admins.name}\``)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (!message.member.roles.cache.has(Admins.id))
|
||||||
|
return message.channel.send({ embed: NoPerms });
|
||||||
|
|
||||||
|
|
||||||
|
const embed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> **${supportbot.AnnouncementStarter}**`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({ embed: embed });
|
||||||
|
|
||||||
|
let announcement = []
|
||||||
|
message.channel.awaitMessages(response => response.content.length > 2, {
|
||||||
|
max: 1,
|
||||||
|
time: 500000,
|
||||||
|
errors: ['time'],
|
||||||
|
}).then((collected) => {
|
||||||
|
announcement.push(collected.map(r => r.content));
|
||||||
|
|
||||||
|
locateChannel.send('@everyone')
|
||||||
|
const AnnouncementEmbed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.AnnouncementTitle)
|
||||||
|
.setThumbnail(supportbot.AnnouncementIcon)
|
||||||
|
.setDescription(announcement)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL());
|
||||||
|
|
||||||
|
locateChannel.send({ embed: AnnouncementEmbed }).then(async function(msg) {
|
||||||
|
const AnnouncementComplete = new Discord.MessageEmbed()
|
||||||
|
.setColor(supportbot.SuccessColour)
|
||||||
|
.setDescription(`:white_check_mark: You have successfully created an announcement. <#${locateChannel.id}>`)
|
||||||
|
message.channel.send({ embed: AnnouncementComplete })
|
||||||
|
})
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
Executable
+53
@@ -0,0 +1,53 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Say Command
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const { execute } = require("./help");
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: supportbot.BotSay,
|
||||||
|
description: supportbot.BotSayDesc,
|
||||||
|
|
||||||
|
execute(message, args) {
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff);
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.BotSay}!`);
|
||||||
|
|
||||||
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Permissions!")
|
||||||
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (!message.member.roles.cache.has(SupportStaff.id))
|
||||||
|
return message.channel.send({ embed: NoPerms });
|
||||||
|
|
||||||
|
|
||||||
|
const embed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> **What would you like me to say!**`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({ embed: embed });
|
||||||
|
|
||||||
|
let announcement = []
|
||||||
|
message.channel.awaitMessages(response => response.content.length > 2, {
|
||||||
|
max: 1,
|
||||||
|
time: 500000,
|
||||||
|
errors: ['time'],
|
||||||
|
}).then((collected) => {
|
||||||
|
announcement.push(collected.map(r => r.content));
|
||||||
|
|
||||||
|
const AnnouncementEmbed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(announcement)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
message.channel.send({ embed: AnnouncementEmbed })
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
Regular → Executable
+133
-27
@@ -1,43 +1,149 @@
|
|||||||
// SupportBot
|
// SupportBot, Created by Emerald Services
|
||||||
// Command: Close Ticket
|
// Close Command
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const fs = require("fs");
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const yaml = require('js-yaml');
|
||||||
|
const { execute } = require("./help");
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
module.exports = {
|
||||||
message.delete();
|
name: supportbot.CloseTicket,
|
||||||
|
description: supportbot.CloseTicketDesc,
|
||||||
|
|
||||||
const outsideticket = new Discord.RichEmbed()
|
execute(message, args) {
|
||||||
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!message.channel.name.startsWith(`ticket-`)) return message.channel.send({embed: outsideticket});
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.CloseTicket}!`);
|
||||||
const close1 = new Discord.RichEmbed()
|
|
||||||
.setDescription(`Looks like you have come to the end of your support ticket\nPlease confirm that you want to close your ticket by saying ||**confirm**||`)
|
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
||||||
.setFooter("Your request will be avoided in 20 seconds")
|
const Exists = new Discord.MessageEmbed()
|
||||||
.setColor(bot.settings.colour)
|
.setTitle("No Ticket Found!")
|
||||||
message.channel.send({embed: close1}).then(m => {
|
.setDescription(`${supportbot.NoValidTicket}`)
|
||||||
message.channel.awaitMessages(response => response.content === `confirm`, {
|
.setColor(supportbot.WarningColour);
|
||||||
|
message.channel.send({ embed: Exists });
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.CloseConfirmation === "true") {
|
||||||
|
const CloseTicketRequest = new Discord.MessageEmbed()
|
||||||
|
.setTitle(`**${supportbot.ClosingTicket}**`)
|
||||||
|
.setDescription(`Please confirm by repeating the following word.. \`${supportbot.ClosingConfirmation_Word}\` `)
|
||||||
|
.setColor(supportbot.EmbedColour);
|
||||||
|
|
||||||
|
message.channel.send(CloseTicketRequest).then(m => {
|
||||||
|
message.channel.awaitMessages( response => response.content.toLowerCase() === supportbot.ClosingConfirmation_Word, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 10000,
|
time: 20000,
|
||||||
errors: [ 'time' ],
|
errors: [ 'time' ],
|
||||||
|
|
||||||
}).then((collected) => {
|
|
||||||
|
}).then( collected => {
|
||||||
|
let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog);
|
||||||
|
let user = message.author;
|
||||||
|
let reason = args.join(" ") || "No Reason Provided.";
|
||||||
|
|
||||||
|
let name = message.channel.name;
|
||||||
|
let ticketChannel = message.channel;
|
||||||
|
|
||||||
|
message.channel.send(`**${supportbot.ClosingTicket}**`)
|
||||||
|
|
||||||
|
.then(() => {
|
||||||
|
const logEmbed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.TranscriptTitle)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
.addField("Closed By", message.author.tag)
|
||||||
|
.addField("Reason", reason);
|
||||||
|
|
||||||
|
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
|
||||||
|
let txt = '';
|
||||||
|
|
||||||
|
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
|
||||||
|
txt += `${message.guild.name}\n`;
|
||||||
|
txt += `#${ticketChannel.name}\n`;
|
||||||
|
txt += `${msgs.size} messages\n\n\n`;
|
||||||
|
|
||||||
|
msgs.forEach( msg => {
|
||||||
|
if ( msg.content ) {
|
||||||
|
txt += `----- ${msg.author.tag} at ${msg.createdAt}\n`;
|
||||||
|
txt += `${msg.content}\n`;
|
||||||
|
txt += `-----\n\n`;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
logChannel.send(logEmbed).catch(err => {
|
||||||
|
message.reply(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
logChannel.send( new Discord.MessageAttachment( Buffer.from( txt ), `${name}.txt` ) );
|
||||||
|
|
||||||
message.channel.delete();
|
message.channel.delete();
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
}).catch( () => {
|
}).catch( () => {
|
||||||
m.edit('Close ticket request, timedout').then(m2 => {
|
m.edit('The request to close the ticket has timed out.').then( m2 => m2.delete( 3000 ) );
|
||||||
m2.delete();
|
|
||||||
}, 3000);
|
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Close_Command}`)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
if (supportbot.CloseConfirmation === "false") {
|
||||||
name: bot.settings.Close_Command,
|
|
||||||
|
let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog);
|
||||||
|
let user = message.author;
|
||||||
|
let reason = args.join(" ") || "No Reason Provided.";
|
||||||
|
|
||||||
|
let name = message.channel.name;
|
||||||
|
let ticketChannel = message.channel;
|
||||||
|
|
||||||
|
message.channel.send(`**${supportbot.ClosingTicket}**`)
|
||||||
|
|
||||||
|
.then(() => {
|
||||||
|
const logEmbed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.TranscriptTitle)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
.addField("Closed By", message.author.tag)
|
||||||
|
.addField("Reason", reason);
|
||||||
|
|
||||||
|
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
|
||||||
|
let txt = '';
|
||||||
|
|
||||||
|
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
|
||||||
|
txt += `${message.guild.name}\n`;
|
||||||
|
txt += `#${ticketChannel.name}\n`;
|
||||||
|
txt += `${msgs.size} messages\n\n\n`;
|
||||||
|
|
||||||
|
msgs.forEach( msg => {
|
||||||
|
if ( msg.content ) {
|
||||||
|
txt += `----- ${msg.author.tag} at ${msg.createdAt}\n`;
|
||||||
|
txt += `${msg.content}\n`;
|
||||||
|
txt += `-----\n\n`;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
logChannel.send(logEmbed).catch(err => {
|
||||||
|
message.reply(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
logChannel.send( new Discord.MessageAttachment( Buffer.from( txt ), `${name}.txt` ) );
|
||||||
|
|
||||||
|
message.channel.delete();
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}).catch( () => {
|
||||||
|
m.edit('The request to close the ticket has timed out.').then( m2 => m2.delete( 3000 ) );
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
// SupportBot
|
|
||||||
// Command: Forceclose Ticket
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
|
||||||
const bot = new Discord.Client()
|
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
|
||||||
message.delete();
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.support}`)
|
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.support}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!staffGroup) return message.reply({embed: rolemissing});
|
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.support}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole});
|
|
||||||
|
|
||||||
const outsideticket = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!message.channel.name.startsWith(`ticket-`)) return message.channel.send({embed: outsideticket});
|
|
||||||
message.channel.delete();
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Forceclose_Command}`)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: bot.settings.Forceclose_Command,
|
|
||||||
}
|
|
||||||
+39
-30
@@ -1,46 +1,55 @@
|
|||||||
// SupportBot
|
// SupportBot, Created by Emerald Services
|
||||||
// Command: Help
|
// Help Command
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const fs = require("fs");
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
module.exports = {
|
||||||
message.delete();
|
name: supportbot.HelpCommand,
|
||||||
|
description: supportbot.HelpDesc,
|
||||||
|
|
||||||
let userCommands = "";
|
execute(message, args) {
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Link_Command}**: Get some important links!\n`;
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Ping_Command}**: Check the bots ping. Pong!\n`;
|
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Ticket_Command} <reason>**: Create a support ticket\n`;
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.HelpCommand}!`);
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Close_Command}**: Close your support ticket\n`;
|
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Suggest_Command} <suggestion>**: Create a server suggestion\n`;
|
let generalCommands = "";
|
||||||
|
generalCommands += `**${supportbot.Prefix}${supportbot.HelpCommand}** ${supportbot.HelpDesc}\n`;
|
||||||
|
generalCommands += `**${supportbot.Prefix}${supportbot.LinksCommand}** ${supportbot.LinkDesc}\n`;
|
||||||
|
generalCommands += `**${supportbot.Prefix}${supportbot.SuggestCommand}** ${supportbot.SuggestionDesc}\n`;
|
||||||
|
generalCommands += `**${supportbot.Prefix}${supportbot.PingCommand}** ${supportbot.PingDesc}\n`;
|
||||||
|
|
||||||
let supportCommands = "";
|
let supportCommands = "";
|
||||||
supportCommands += `**${bot.settings.prefix}${bot.settings.Add_Command} <user>**: Adds a user to a ticket\n`;
|
supportCommands += `**${supportbot.Prefix}${supportbot.NewTicket} [reason]** ${supportbot.NewTicketDesc}\n`
|
||||||
supportCommands += `**${bot.settings.prefix}${bot.settings.Remove_Command} <user>**: Removes a user from a ticket\n`;
|
supportCommands += `**${supportbot.Prefix}${supportbot.CloseTicket} [reason]** ${supportbot.CloseTicketDesc}\n`
|
||||||
supportCommands += `**${bot.settings.prefix}${bot.settings.Forceclose_Command}**: Forceclose a support ticket\n`;
|
|
||||||
supportCommands += `**${bot.settings.prefix}${bot.settings.Rename_Command}**: Rename a support ticket\n`;
|
|
||||||
|
|
||||||
let staffCommands = "";
|
let staffCommands = "";
|
||||||
staffCommands += `**${bot.settings.prefix}${bot.settings.Say_Command} <message>**: Create a bot announcement\n`;
|
staffCommands += `**${supportbot.Prefix}${supportbot.AddUser} <user#0000>** ${supportbot.AddUserDesc}\n`
|
||||||
staffCommands += `**${bot.settings.prefix}${bot.settings.Lockchat_Command}**: Lock the chat channel\n`;
|
staffCommands += `**${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>** ${supportbot.RemoveUserDesc}\n`
|
||||||
staffCommands += `**${bot.settings.prefix}${bot.settings.UnLockchat_Command}**: UnLock the chat channel\n`;
|
staffCommands += `**${supportbot.Prefix}${supportbot.BotSay}** ${supportbot.BotSayDesc}\n`
|
||||||
|
staffCommands += `**${supportbot.Prefix}${supportbot.AnnounceCommand}** ${supportbot.AnnounceDesc}\n`
|
||||||
|
|
||||||
const embed = new Discord.RichEmbed()
|
const HelpCommandEmbed = new Discord.MessageEmbed()
|
||||||
.setTitle(bot.settings.botname)
|
.setTitle(supportbot.Bot_Name)
|
||||||
.addField(":ticket: Support Commands", userCommands)
|
.setThumbnail(message.author.displayAvatarURL())
|
||||||
.addField(":pushpin: Support Commands", supportCommands, true)
|
|
||||||
.addField(":pushpin: Staff Commands", staffCommands, true)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer, message.author.displayAvatarURL);
|
|
||||||
|
|
||||||
message.channel.send(embed)
|
.addFields(
|
||||||
|
{ name: '🖥️ General Commands', value: `${generalCommands}\n`, inline: false },
|
||||||
|
{ name: '🎫 Support Commands', value: `${supportCommands}\n`, inline: false },
|
||||||
|
)
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Help_Command}`)
|
.setColor(supportbot.EmbedColour)
|
||||||
|
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL());
|
||||||
|
|
||||||
|
if (message.member.roles.cache.some(role => role.name === supportbot.Staff || supportbot.Admin)) {
|
||||||
|
HelpCommandEmbed.addFields(
|
||||||
|
{ name: '🔐 Staff Commands', value: `${staffCommands}\n`, inline: false },
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
message.channel.send({ embed: HelpCommandEmbed });
|
||||||
name: bot.settings.Help_Command,
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
Regular → Executable
+27
-21
@@ -1,30 +1,36 @@
|
|||||||
// SupportBot
|
// SupportBot, Created by Emerald Services
|
||||||
// Command: Help
|
// Links Command
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const fs = require("fs");
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const yaml = require('js-yaml');
|
||||||
|
const { execute } = require("./help");
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
module.exports = {
|
||||||
message.delete();
|
name: supportbot.LinksCommand,
|
||||||
|
description: supportbot.LinksDesc,
|
||||||
|
|
||||||
let BotLinks = "";
|
execute(message, args) {
|
||||||
BotLinks += `[${bot.settings.LINK_1_NAME}](${bot.settings.LINK_1})\n`;
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
BotLinks += `[${bot.settings.LINK_2_NAME}](${bot.settings.LINK_2})\n`;
|
|
||||||
BotLinks += `[${bot.settings.LINK_3_NAME}](${bot.settings.LINK_3})\n`;
|
|
||||||
|
|
||||||
const links = new Discord.RichEmbed()
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.LinksCommand}!`);
|
||||||
.setTitle(`${bot.settings.LINKS_TITLE}`)
|
|
||||||
.setDescription(BotLinks)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
message.channel.send(links)
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Link_Command}`)
|
const LinksEmbed = new Discord.MessageEmbed()
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
let botLinks = supportbot.LINKS;
|
||||||
|
|
||||||
|
let links = '';
|
||||||
|
|
||||||
|
for ( let name in botLinks ) {
|
||||||
|
links += `[${name}](${botLinks[ name ]})\n`;
|
||||||
|
};
|
||||||
|
|
||||||
|
LinksEmbed.addField(supportbot.LinksTitle, links)
|
||||||
|
|
||||||
|
message.channel.send({ embed: LinksEmbed });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
exports.help = {
|
|
||||||
name: bot.settings.Link_Command,
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
// SupportBot
|
|
||||||
// Command: Lockchat
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
|
||||||
const bot = new Discord.Client()
|
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
|
||||||
|
|
||||||
exports.run = async(bot, message, args) => {
|
|
||||||
message.delete();
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
|
||||||
let everyoneRole = message.guild.roles.find(everyone => everyone.name === `${bot.settings.everyone}`)
|
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)})
|
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.staff}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
|
||||||
|
|
||||||
message.channel.overwritePermissions(everyoneRole, { READ_MESSAGES: false, SEND_MESSAGES: false });
|
|
||||||
|
|
||||||
const lockmsg = new Discord.RichEmbed()
|
|
||||||
.setDescription(":white_check_mark: **Chat Locked**")
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
message.channel.send(lockmsg)
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Lockchat_Command}`)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: bot.settings.Lockchat_Command,
|
|
||||||
}
|
|
||||||
Executable
+272
@@ -0,0 +1,272 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Ticket Command
|
||||||
|
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const bot = new Discord.Client()
|
||||||
|
|
||||||
|
const fs = require("fs")
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
const TicketNumberID = require('../utils/TicketNumber.js');
|
||||||
|
|
||||||
|
const reacted = [];
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: supportbot.NewTicket,
|
||||||
|
description: supportbot.NewTicketDesc,
|
||||||
|
|
||||||
|
execute(message, args) {
|
||||||
|
if (!message.channel.name === supportbot.ReactionChannel) {
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.NewTicket}!`);
|
||||||
|
|
||||||
|
// Ticket ID
|
||||||
|
let ticketNumberID = TicketNumberID.pad(message.guild.id);
|
||||||
|
|
||||||
|
// Ticket Subject
|
||||||
|
const TicketSubject = args || supportbot.NoTicketSubject;
|
||||||
|
|
||||||
|
// Ticket Exists
|
||||||
|
const TicketExists = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Ticket Exists!")
|
||||||
|
.setDescription(`${supportbot.TicketExists}`)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (message.guild.channels.cache.find(SupportTicket => SupportTicket.name === `${supportbot.TicketChannel}-${ticketNumberID}`))
|
||||||
|
return message.channel.send({ embed: TicketExists });
|
||||||
|
|
||||||
|
message.guild.channels.create(`${supportbot.TicketChannel}-${ticketNumberID}`, {
|
||||||
|
type: "text",
|
||||||
|
}).then(SupportTicket => {
|
||||||
|
|
||||||
|
let AllUsers = message.guild.roles.cache.find(everyone => everyone.name === '@everyone')
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff)
|
||||||
|
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin)
|
||||||
|
|
||||||
|
let DeptRole1 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_1}`)
|
||||||
|
let DeptRole2 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_2}`)
|
||||||
|
let DeptRole3 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_3}`)
|
||||||
|
|
||||||
|
SupportTicket.updateOverwrite(AllUsers, {
|
||||||
|
VIEW_CHANNEL: false,
|
||||||
|
READ_MESSAGES: false,
|
||||||
|
SEND_MESSAGES: false,
|
||||||
|
})
|
||||||
|
|
||||||
|
SupportTicket.updateOverwrite(message.author, {
|
||||||
|
VIEW_CHANNEL: true,
|
||||||
|
READ_MESSAGES: true,
|
||||||
|
SEND_MESSAGES: true,
|
||||||
|
})
|
||||||
|
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, {
|
||||||
|
VIEW_CHANNEL: true,
|
||||||
|
READ_MESSAGES: true,
|
||||||
|
SEND_MESSAGES: true,
|
||||||
|
})
|
||||||
|
|
||||||
|
SupportTicket.updateOverwrite(Admins, {
|
||||||
|
VIEW_CHANNEL: true,
|
||||||
|
READ_MESSAGES: true,
|
||||||
|
SEND_MESSAGES: true,
|
||||||
|
})
|
||||||
|
|
||||||
|
// Ticket Category
|
||||||
|
let TicketCategory = message.guild.channels.cache.find(category => category.name === supportbot.TicketCategory)
|
||||||
|
|
||||||
|
if (TicketCategory) {
|
||||||
|
SupportTicket.setParent(TicketCategory.id)
|
||||||
|
} else {
|
||||||
|
if (message.guild.channels.cache.get(supportbot.TicketCategory)) {
|
||||||
|
SupportTicket.setParent(message.guild.channels.cache.get(supportbot.TicketCategory).id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ticket Created, Message Sent
|
||||||
|
|
||||||
|
if (supportbot.AllowTicketMentions === "true") {
|
||||||
|
SupportTicket.send(`<@${message.author.id}>`)
|
||||||
|
}
|
||||||
|
|
||||||
|
const TicketMessage = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.Ticket_Title.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username))
|
||||||
|
.setDescription(supportbot.TicketMessage.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username))
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if (supportbot.TicketSubject === "embed") {
|
||||||
|
|
||||||
|
if (TicketSubject != 'No Reason Provided.') {
|
||||||
|
TicketMessage.addFields({ name: 'Reason', value: TicketSubject })
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.TicketSubject === "description") {
|
||||||
|
|
||||||
|
if (TicketSubject != 'No Reason Provided.') {
|
||||||
|
SupportTicket.setTopic(`Reason: ${TicketSubject} - User ID: ${message.author.id} - Ticket: ${SupportTicket.name}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.TicketDepartments === "true") {
|
||||||
|
TicketMessage.addFields({ name: 'Departments', value: `${supportbot.DepartmentEmoji_1} **${supportbot.DepartmentTitle_1}**\n${supportbot.DepartmentEmoji_2} **${supportbot.DepartmentTitle_2}**\n${supportbot.DepartmentEmoji_3} **${supportbot.DepartmentTitle_3}**` })
|
||||||
|
}
|
||||||
|
|
||||||
|
SupportTicket.send({ embed: TicketMessage }).then( async function(msg) {
|
||||||
|
|
||||||
|
const Emoji_1 = supportbot.DepartmentEmoji_1;
|
||||||
|
const Emoji_2 = supportbot.DepartmentEmoji_2;
|
||||||
|
const Emoji_3 = supportbot.DepartmentEmoji_3;
|
||||||
|
|
||||||
|
reacted[ticketNumberID] = false;
|
||||||
|
|
||||||
|
if (supportbot.TicketDepartments === "true") {
|
||||||
|
await msg.react(Emoji_1);
|
||||||
|
await msg.react(Emoji_2);
|
||||||
|
await msg.react(Emoji_3);
|
||||||
|
let filter = (reaction, user) => {
|
||||||
|
if (user.id !== message.author.id) return;
|
||||||
|
if (typeof reacted[ticketNumberID] !== "boolean") return;
|
||||||
|
delete reacted[ticketNumberID];
|
||||||
|
if (reaction.emoji.name === Emoji_1) {
|
||||||
|
SupportTicket.updateOverwrite(message.author.id, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
SupportTicket.updateOverwrite(Admins, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
SupportTicket.updateOverwrite(DeptRole1, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
|
||||||
|
if (supportbot.AllowStaff === "true") {
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.AllowStaff === "false") {
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: false, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
}
|
||||||
|
|
||||||
|
const Department1 = new Discord.MessageEmbed()
|
||||||
|
.setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_1} Department**. Please provide us information regarding your query.`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
SupportTicket.send({ embed: Department1 });
|
||||||
|
|
||||||
|
if (supportbot.AllowTicketMentions === "true") {
|
||||||
|
SupportTicket.send(`@here`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reaction.emoji.name === Emoji_2) {
|
||||||
|
SupportTicket.updateOverwrite(message.author.id, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
SupportTicket.updateOverwrite(Admins, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
SupportTicket.updateOverwrite(DeptRole2, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
|
||||||
|
if (supportbot.AllowStaff === "true") {
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.AllowStaff === "false") {
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: false, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
}
|
||||||
|
|
||||||
|
const Department2 = new Discord.MessageEmbed()
|
||||||
|
.setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_2} Department**. Please provide us information regarding your query.`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
SupportTicket.send({ embed: Department2 });
|
||||||
|
|
||||||
|
if (supportbot.AllowTicketMentions === "true") {
|
||||||
|
SupportTicket.send(`@here`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reaction.emoji.name === `${Emoji_3}`) {
|
||||||
|
SupportTicket.updateOverwrite(message.author.id, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
SupportTicket.updateOverwrite(Admins, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
SupportTicket.updateOverwrite(DeptRole3, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: false, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
|
||||||
|
if (supportbot.AllowStaff === "true") {
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.AllowStaff === "false") {
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: false, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
}
|
||||||
|
|
||||||
|
const Department3 = new Discord.MessageEmbed()
|
||||||
|
.setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_3} Department**. Please provide us information regarding your query.`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
SupportTicket.send({ embed: Department3 });
|
||||||
|
|
||||||
|
if (supportbot.AllowTicketMentions === "true") {
|
||||||
|
SupportTicket.send(`@here`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return [Emoji_1, Emoji_2, Emoji_3].includes(reaction.emoji.name) && user.id !== message.author.id;
|
||||||
|
}
|
||||||
|
msg.awaitReactions(filter, {
|
||||||
|
max: 4,
|
||||||
|
time: 60000,
|
||||||
|
errors: ['time']
|
||||||
|
}).then(async collected => {
|
||||||
|
});
|
||||||
|
|
||||||
|
setTimeout(async function() {
|
||||||
|
if (typeof reacted[ticketNumberID] == "boolean") {
|
||||||
|
delete reacted[ticketNumberID];
|
||||||
|
//delete channel because didn't react in a minute
|
||||||
|
}
|
||||||
|
}, 60000);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
if (message.channel.name === supportbot.ReactionChannel) {
|
||||||
|
const CreatedTicket = new Discord.MessageEmbed()
|
||||||
|
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username))
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({embed: CreatedTicket}).then((r) => {
|
||||||
|
r.delete({ timeout:5000 })
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
const CreatedTicket = new Discord.MessageEmbed()
|
||||||
|
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username))
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({embed: CreatedTicket});
|
||||||
|
}
|
||||||
|
fs.writeFileSync("./storage/SupportTickets.json", '{\n "ticket": "' + SupportTicket.name + '", \n "id":' + message.author.id + "\n}", (err) => {
|
||||||
|
if (!err) return;
|
||||||
|
console.error(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
// Ticket Logs
|
||||||
|
|
||||||
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
|
.setTitle("SupportBot Error!")
|
||||||
|
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.TicketLog}\`\n\nError Code: \`SB-03\``)
|
||||||
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
|
const TicketLogs = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Ticket Log")
|
||||||
|
.setThumbnail(supportbot.Ticket_Thumbnail)
|
||||||
|
.addFields(
|
||||||
|
{ name: 'Ticket', value: `<#${SupportTicket.id}>` },
|
||||||
|
{ name: 'User', value: `<@${message.author.id}>` },
|
||||||
|
)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
|
||||||
|
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === supportbot.TicketLog)
|
||||||
|
|
||||||
|
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
||||||
|
|
||||||
|
locateChannel.send({ embed: TicketLogs });
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
Regular → Executable
+19
-15
@@ -1,23 +1,27 @@
|
|||||||
// SupportBot
|
// SupportBot, Created by Emerald Services
|
||||||
// Command: Ping
|
// Ping Command
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const fs = require("fs");
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
module.exports = {
|
||||||
message.delete();
|
name: supportbot.PingCommand,
|
||||||
|
description: supportbot.PingDesc,
|
||||||
|
|
||||||
const embed = new Discord.RichEmbed()
|
execute(message, args) {
|
||||||
.setDescription(`:ping_pong: **Pong!** \`${bot.ping}ms\` `)
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
message.channel.send(embed).catch(console.error);
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Ping_Command}`)
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.PingCommand}!`)
|
||||||
|
|
||||||
|
let ping = Date.now() - message.createdTimestamp + " ms";
|
||||||
|
|
||||||
|
const PingCommandEmbed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`🏓 **Pong!** \`${Date.now() - message.createdTimestamp}ms\``)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
message.channel.send({ embed: PingCommandEmbed });
|
||||||
}
|
}
|
||||||
|
};
|
||||||
exports.help = {
|
|
||||||
name: bot.settings.Ping_Command,
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
// SupportBot
|
|
||||||
// Command: Poll
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
|
||||||
const bot = new Discord.Client()
|
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
|
||||||
message.delete();
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)})
|
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.staff}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
|
||||||
|
|
||||||
const embed = new Discord.RichEmbed()
|
|
||||||
.setTitle(`${bot.settings.Poll_Title}`)
|
|
||||||
.setDescription(args.join(" "))
|
|
||||||
.setTimestamp()
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer, message.author.displayAvatarURL)
|
|
||||||
|
|
||||||
let ac = message.guild.channels.find(AnnounceChannel => AnnounceChannel.name === `${bot.settings.Poll_Channel}`)
|
|
||||||
if(!ac) return message.channel.send(`:x: Error! Could not find the logs channel **${bot.settings.Poll_Channel}**`)
|
|
||||||
|
|
||||||
ac.send(embed)
|
|
||||||
|
|
||||||
.then(async function(msg) {
|
|
||||||
msg.react(bot.settings.Reaction_Poll_1).then(() => msg.react(bot.settings.Reaction_Poll_2));
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Poll_Command}`)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: bot.settings.Poll_Command,
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
// SupportBot
|
|
||||||
// Command: Remove User
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
|
||||||
const bot = new Discord.Client()
|
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
|
||||||
|
|
||||||
module.exports.run = async (bot, message, args) => {
|
|
||||||
message.delete()
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Add_Command}`)
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === bot.settings.support)
|
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.support}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!staffGroup) return message.reply({embed: rolemissing});
|
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.support}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole});
|
|
||||||
|
|
||||||
const outsideticket = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!message.channel.name.startsWith(`ticket-`)) return message.channel.send({embed: outsideticket});
|
|
||||||
|
|
||||||
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));
|
|
||||||
|
|
||||||
const cantfinduser = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Hmm! Does that user exist? I cannot find the user.`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if(!rUser) return message.channel.send({embed: cantfinduser});
|
|
||||||
|
|
||||||
const channel = message.guild.channels.find(channel => channel.name === message.channel.name);
|
|
||||||
|
|
||||||
const cantfindchannel = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Hmm! Does that ticket exist? I cannot find the ticket channel.`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if(!channel) return message.channel.send({embed: cantfindchannel});
|
|
||||||
message.delete().catch(O_o=>{});
|
|
||||||
|
|
||||||
message.channel.overwritePermissions(rUser, { READ_MESSAGES: false, SEND_MESSAGES: false });
|
|
||||||
|
|
||||||
const useradded = new Discord.RichEmbed()
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setDescription(`:white_check_mark: Successfully remove ${rUser} from the ticket.`)
|
|
||||||
.setTimestamp();
|
|
||||||
|
|
||||||
message.channel.send({embed: useradded});
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has successfully removed ${rUser} from ${message.channel}`)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: bot.settings.Remove_Command,
|
|
||||||
}
|
|
||||||
Executable
+64
@@ -0,0 +1,64 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Remove User
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: supportbot.RemoveUser,
|
||||||
|
description: supportbot.RemoveUserDesc,
|
||||||
|
|
||||||
|
execute(message, args) {
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.RemoveUser}!`);
|
||||||
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff)
|
||||||
|
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin)
|
||||||
|
|
||||||
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Permissions!")
|
||||||
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${supportbot.Staff}\` or \`${supportbot.Admin}\``)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (message.member.roles.cache.has(SupportStaff.id) || message.member.roles.cache.has(Admins.id)) {
|
||||||
|
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
||||||
|
const Exists = new Discord.MessageEmbed()
|
||||||
|
.setTitle("No Ticket Found!")
|
||||||
|
.setDescription(`${supportbot.NoValidTicket}`)
|
||||||
|
.setColor(supportbot.WarningColour);
|
||||||
|
message.channel.send({ embed: Exists });
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
|
||||||
|
const UserNotExist = new Discord.MessageEmbed()
|
||||||
|
.setTitle("User Not Found!")
|
||||||
|
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>\``)
|
||||||
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
|
if (!rUser) return message.channel.send({ embed: UserNotExist });
|
||||||
|
|
||||||
|
message.channel.updateOverwrite(rUser, {
|
||||||
|
VIEW_CHANNEL: false,
|
||||||
|
CREATE_INVITE: false,
|
||||||
|
SEND_MESSAGES: false,
|
||||||
|
READ_MESSAGES: false
|
||||||
|
});
|
||||||
|
|
||||||
|
const Complete = new Discord.MessageEmbed()
|
||||||
|
.setTitle("User Removed!")
|
||||||
|
.setDescription(supportbot.RemovedUser.replace(/%user%/g, rUser.id))
|
||||||
|
.setTimestamp()
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({ embed: Complete });
|
||||||
|
} else {
|
||||||
|
return message.channel.send({ embed: NoPerms });
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
// SupportBot
|
|
||||||
// Command: Close Ticket
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
|
||||||
const bot = new Discord.Client()
|
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
|
||||||
message.delete();
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === bot.settings.support)
|
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.support}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!staffGroup) return message.reply({embed: rolemissing});
|
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.support}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole});
|
|
||||||
|
|
||||||
const outsideticket = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!message.channel.name.startsWith(`ticket-`)) return message.channel.send({embed: outsideticket});
|
|
||||||
const renameto = args.join(" ")
|
|
||||||
message.channel.setName(`ticket-${renameto}-${message.author.username}`)
|
|
||||||
|
|
||||||
// Renamed Ticket Logistic
|
|
||||||
const logEmbed = new Discord.RichEmbed()
|
|
||||||
.setTitle(":ticket: Ticket Renamed")
|
|
||||||
.setDescription(`<@${message.author.id}> has renamed a ticket to ${renameto}`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
|
|
||||||
let logChannel = message.guild.channels.find(TicketChannel => TicketChannel.name === `${bot.settings.Ticket_Logs}`);
|
|
||||||
if(!logChannel) return message.channel.send(`:x: Error! Could not find the logs channel **${bot.settings.Ticket_Logs}**`);
|
|
||||||
|
|
||||||
logChannel.send({embed: logEmbed})
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Rename_Command}`)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: bot.settings.Rename_Command,
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
// SupportBot
|
|
||||||
// Command: Report
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
|
||||||
const bot = new Discord.Client()
|
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
|
||||||
message.delete();
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`);
|
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
|
||||||
.setColor(bot.settings.colour);
|
|
||||||
|
|
||||||
if(!staffGroup) {
|
|
||||||
message.reply(rolemissing).catch(err => {
|
|
||||||
console.error(err);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.staff}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if(!message.member.roles.has(staffGroup.id)) {
|
|
||||||
message.reply(donothaverole);
|
|
||||||
} else {
|
|
||||||
if(!args[0]) {
|
|
||||||
message.reply(":x: Sorry! Please specify the user to report.");
|
|
||||||
} else {
|
|
||||||
if(!args[1]) {
|
|
||||||
message.reply(":x: Sorry! Specify the reason of your report.");
|
|
||||||
} else {
|
|
||||||
let reportDesc = args.slice(1).join(" ");
|
|
||||||
const embed = new Discord.RichEmbed()
|
|
||||||
.setTitle(`${bot.settings.Report_Title}`)
|
|
||||||
.setThumbnail(message.author.avatarURL)
|
|
||||||
.addField("Report by:", `<@${message.author.id}>`, false)
|
|
||||||
.addField("Description:", `${reportDesc}`, false)
|
|
||||||
.addField("Reported User:", `${args[0]}`, false)
|
|
||||||
.setTimestamp(new Date())
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL);
|
|
||||||
let rc = message.guild.channels.find(ReportChannel => ReportChannel.name === `${bot.settings.Report_Channel}`)
|
|
||||||
if(!rc) {
|
|
||||||
message.channel.send(`:x: Error! Could not find the logs channel **${bot.settings.Report_Channel}**`);
|
|
||||||
} else {
|
|
||||||
rc.send(embed);
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Report_Command}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: bot.settings.Report_Command
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
// SupportBot
|
|
||||||
// Command: Say
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
|
||||||
const bot = new Discord.Client()
|
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
|
||||||
message.delete();
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)})
|
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.staff}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
|
||||||
|
|
||||||
const embed = new Discord.RichEmbed()
|
|
||||||
.setTitle(`${bot.settings.Announcement_Title}`)
|
|
||||||
.setDescription(args.join(" "))
|
|
||||||
.setTimestamp()
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL)
|
|
||||||
|
|
||||||
let ac = message.guild.channels.find(AnnounceChannel => AnnounceChannel.name === `${bot.settings.Announcement_Channel}`)
|
|
||||||
if(!ac) return message.channel.send(`:x: Error! Could not find the logs channel **${bot.settings.Announcement_Channel}**`)
|
|
||||||
|
|
||||||
ac.send(embed)
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Say_Command}`)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: bot.settings.Say_Command,
|
|
||||||
}
|
|
||||||
Regular → Executable
+50
-21
@@ -1,33 +1,62 @@
|
|||||||
// SupportBot
|
// SupportBot, Created by Emerald Services
|
||||||
// Command: Suggest
|
// Suggest Command
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const fs = require("fs");
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = async(bot, message, args) => {
|
module.exports = {
|
||||||
message.delete();
|
name: supportbot.SuggestCommand,
|
||||||
|
description: supportbot.SuggestionDesc,
|
||||||
|
|
||||||
const SuggestionEmbed = new Discord.RichEmbed()
|
execute(message, args) {
|
||||||
.setTitle(`${bot.settings.Suggestion_Title}`)
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
.setDescription(args.join(" "))
|
|
||||||
.setFooter(`Suggestion by ${message.author.username}`, message.author.displayAvatarURL)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
|
|
||||||
let sc = message.guild.channels.find(SuggestionChannel => SuggestionChannel.name === `${bot.settings.Suggestion_Channel}`);
|
let locateChannel = message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.name === supportbot.SuggestionChannel);
|
||||||
if(!sc) return message.channel.send(`:x: Error! Could not find the suggestion channel **${bot.settings.Suggestion_Channel}**`);
|
|
||||||
|
|
||||||
sc.send(SuggestionEmbed)
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.SuggestCommand}!`);
|
||||||
|
|
||||||
.then(async function(msg) {
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
msg.react(bot.settings.suggestyes).then(() => msg.react(bot.settings.suggestno));
|
.setTitle("Invalid Channel")
|
||||||
|
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.SuggestionChannel}\``)
|
||||||
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
|
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
||||||
|
|
||||||
|
const embed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> **${supportbot.SuggestionStarter}**`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({ embed: embed });
|
||||||
|
|
||||||
|
let suggestion = []
|
||||||
|
message.channel.awaitMessages(response => response.content.length > 2, {
|
||||||
|
max: 1,
|
||||||
|
time: 500000,
|
||||||
|
errors: ['time'],
|
||||||
|
}).then((collected) => {
|
||||||
|
suggestion.push(collected.map(r => r.content));
|
||||||
|
|
||||||
|
const SuggestionMessage = new Discord.MessageEmbed()
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
|
||||||
|
.setTitle(supportbot.SuggestionTitle)
|
||||||
|
.setDescription(`\`\`\`${suggestion}\`\`\``)
|
||||||
|
|
||||||
|
.addFields( { name: "From", value: `<@${message.author.id}>`, inline: false }, )
|
||||||
|
|
||||||
|
locateChannel.send({ embed: SuggestionMessage }).then(async function(msg) {
|
||||||
|
msg.react(supportbot.SuggestReact_1).then(() => msg.react(supportbot.SuggestReact_2));
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Suggest_Command}`)
|
const SuggestionComplete = new Discord.MessageEmbed()
|
||||||
|
.setColor(supportbot.SuccessColour)
|
||||||
|
.setDescription(`:white_check_mark: Your suggestion has been successfully created. <#${locateChannel.id}>`)
|
||||||
|
message.channel.send({ embed: SuggestionComplete })
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
exports.help = {
|
|
||||||
name: bot.settings.Suggest_Command,
|
|
||||||
}
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
// SupportBot
|
|
||||||
// Command: Ticket
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
|
||||||
const bot = new Discord.Client()
|
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
|
||||||
|
|
||||||
exports.run = async(bot, message, args) => {
|
|
||||||
message.delete();
|
|
||||||
|
|
||||||
const ID = Math.floor(Math.random() * 10) + 2000;
|
|
||||||
const subject = args.join(" ") || "No Subject.";
|
|
||||||
|
|
||||||
const alreadyopen = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Cannot create a ticket because **ticket-${message.author.username}** already exists.`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (message.guild.channels.find(TicketChannel => TicketChannel.name === 'ticket-' + message.author.username)) return message.channel.send(alreadyopen);
|
|
||||||
message.guild.createChannel(`ticket-${message.author.username}`, 'text').then(TicketChannel => {
|
|
||||||
|
|
||||||
// Roles
|
|
||||||
let staff = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.support}`)
|
|
||||||
let everyone = message.guild.roles.find(everyoneRole => everyoneRole.name === `@everyone`)
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
TicketChannel.overwritePermissions(everyone, { SEND_MESSAGES: false, READ_MESSAGES: false })
|
|
||||||
TicketChannel.overwritePermissions(staff, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
|
||||||
TicketChannel.overwritePermissions(message.author, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
|
||||||
TicketChannel.overwritePermissions(bot.user, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
|
||||||
|
|
||||||
// Category
|
|
||||||
let category = message.guild.channels.find(c => c.name === bot.settings.category);
|
|
||||||
if (category) {
|
|
||||||
TicketChannel.setParent(category.id);
|
|
||||||
} else {
|
|
||||||
if (message.guild.channels.get(bot.settings.category)) {
|
|
||||||
TicketChannel.setParent(message.guild.channels.get(bot.settings.category).id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const ticketopened = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:white_check_mark: <@${message.author.id}> You ticket has been created <#${TicketChannel.id}>`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
message.channel.send({embed: ticketopened});
|
|
||||||
|
|
||||||
// Ticket Message - ( Able to edit this message via the settings.json file )
|
|
||||||
const ticketMessage = `Hi! <@${message.author.id}>\n${bot.settings.Ticket_Message}`;
|
|
||||||
|
|
||||||
const TicketMessage = new Discord.RichEmbed()
|
|
||||||
.setDescription(ticketMessage)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
TicketChannel.send({embed: TicketMessage});
|
|
||||||
|
|
||||||
if (subject != 'No Subject.') {
|
|
||||||
TicketChannel.setTopic(subject);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ticket Logging
|
|
||||||
const logEmbed = new Discord.RichEmbed()
|
|
||||||
.setTitle(":ticket: Logistics of your Ticket")
|
|
||||||
.addField("Ticket ID", ID, true)
|
|
||||||
.addField("User", `<@${message.author.id}>`, true)
|
|
||||||
.addField("Channel", `ticket#${ID}`, true)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
|
|
||||||
if (subject != 'No Subject.') {
|
|
||||||
logEmbed.addField('Subject', subject, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
let logChannel = message.guild.channels.find(TicketChannel => TicketChannel.name === `${bot.settings.Ticket_Logs}`);
|
|
||||||
if(!logChannel) return message.channel.send(`:x: Error! Could not find the logs channel **${bot.settings.Ticket_Logs}**`);
|
|
||||||
|
|
||||||
logChannel.send({embed: logEmbed})
|
|
||||||
|
|
||||||
}).catch(err=>{console.error(err)});
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Ticket_Command}`)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: bot.settings.Ticket_Command,
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
// SupportBot
|
|
||||||
// Command: Lockchat
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
|
||||||
const bot = new Discord.Client()
|
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
|
||||||
|
|
||||||
exports.run = async(bot, message, args) => {
|
|
||||||
message.delete();
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
|
||||||
let everyoneRole = message.guild.roles.find(everyone => everyone.name === `${bot.settings.everyone}`)
|
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)})
|
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.staff}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
|
||||||
|
|
||||||
message.channel.overwritePermissions(everyoneRole, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
|
||||||
|
|
||||||
const lockmsg = new Discord.RichEmbed()
|
|
||||||
.setDescription(":white_check_mark: **Chat Un-Locked**")
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
message.channel.send(lockmsg)
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.UnLockchat_Command}`)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: bot.settings.UnLockchat_Command,
|
|
||||||
}
|
|
||||||
Executable
+49
@@ -0,0 +1,49 @@
|
|||||||
|
// SupportBot 6.0, Created by Emerald Services
|
||||||
|
// Ready Event
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = async (bot, member) => {
|
||||||
|
|
||||||
|
if (supportbot.SystemMessages === "true") {
|
||||||
|
const SystemChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.SystemMessage_Channel)
|
||||||
|
|
||||||
|
if (!SystemChannel) return;
|
||||||
|
|
||||||
|
console.log(`[${supportbot.Bot_Name}]: ${member.user.username} has joined ${member.guild.name}!`)
|
||||||
|
console.log(supportbot.AutoRole_Role)
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Type === "embed") {
|
||||||
|
const GuildAddMember = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.Welcome_Title)
|
||||||
|
.setDescription(supportbot.WelcomeMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Icon === "BOT") {
|
||||||
|
GuildAddMember.setThumbnail(bot.user.displayAvatarURL())
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Icon === "USER") {
|
||||||
|
GuildAddMember.setThumbnail(member.user.displayAvatarURL())
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_EmbedFooter === "true") {
|
||||||
|
GuildAddMember.setFooter(supportbot.EmbedFooter)
|
||||||
|
}
|
||||||
|
|
||||||
|
SystemChannel.send({ embed: GuildAddMember });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Type === "normal") {
|
||||||
|
SystemChannel.send(supportbot.WelcomeMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
Executable
+48
@@ -0,0 +1,48 @@
|
|||||||
|
// SupportBot 6.0, Created by Emerald Services
|
||||||
|
// Ready Event
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = async (bot, member) => {
|
||||||
|
|
||||||
|
if (supportbot.SystemMessages === "true") {
|
||||||
|
const SystemChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.SystemMessage_Channel)
|
||||||
|
|
||||||
|
if (!SystemChannel) return;
|
||||||
|
|
||||||
|
console.log(`[${supportbot.Bot_Name}]: ${member.user.username} has left ${member.guild.name}!`)
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Type === "embed") {
|
||||||
|
const GuildRemoveMember = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.Leave_Title)
|
||||||
|
.setDescription(supportbot.LeaveMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Icon === "BOT") {
|
||||||
|
GuildRemoveMember.setThumbnail(bot.user.displayAvatarURL())
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Icon === "USER") {
|
||||||
|
GuildRemoveMember.setThumbnail(member.user.displayAvatarURL())
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_EmbedFooter === "true") {
|
||||||
|
GuildRemoveMember.setFooter(supportbot.EmbedFooter)
|
||||||
|
}
|
||||||
|
|
||||||
|
SystemChannel.send({ embed: GuildRemoveMember });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Type === "normal") {
|
||||||
|
SystemChannel.send(supportbot.LeaveMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
Executable
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// SupportBot 6.0, Created by Emerald Services
|
||||||
|
// Message Event
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = async (bot, message) => {
|
||||||
|
if(message.author.bot) return;
|
||||||
|
if(message.channel.type === "dm") return;
|
||||||
|
if (message.content.indexOf(supportbot.Prefix) !== 0) return;
|
||||||
|
|
||||||
|
let messageArray = message.content.split(" ");
|
||||||
|
const args = message.content.slice(supportbot.Prefix.length).trim().split(/ +/g);
|
||||||
|
const command = args.shift().toLowerCase();
|
||||||
|
|
||||||
|
const cmd = bot.commands.get(command);
|
||||||
|
if(!cmd) return;
|
||||||
|
cmd.execute(message, args);
|
||||||
|
};
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
// SupportBot 6.0, Created by Emerald Services
|
||||||
|
// Message Reaction Event
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
const tickets = yaml.load(fs.readFileSync('./storage/ticketreaction.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = async (client, reaction, user) => {
|
||||||
|
|
||||||
|
let message = {
|
||||||
|
guild: reaction.message.channel.guild,
|
||||||
|
author: user,
|
||||||
|
content: "Not available",
|
||||||
|
channel: reaction.message.channel
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.ReactionTickets === "true") {
|
||||||
|
if (reaction.message.id === tickets.ReactionMessage_ID) {
|
||||||
|
if (reaction.emoji.name == supportbot.ReactionEmoji || reaction.emoji.id == supportbot.ReactionEmoji) {
|
||||||
|
await reaction.users.remove(user.id)
|
||||||
|
|
||||||
|
try {
|
||||||
|
const cmd = client.commands.get("ticket");
|
||||||
|
if(!cmd) return;
|
||||||
|
|
||||||
|
cmd.execute(message, "undefined");
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
// SupportBot 6.0, Created by Emerald Services
|
||||||
|
// Ready Event
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
const tickets = yaml.load(fs.readFileSync('./storage/ticketreaction.yml', 'utf8'));
|
||||||
|
|
||||||
|
|
||||||
|
module.exports = async (bot) => {
|
||||||
|
bot.user.setActivity(supportbot.BotActivity, {
|
||||||
|
type: supportbot.ActivityType,
|
||||||
|
url: supportbot.StreamingURL
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`)
|
||||||
|
console.log(`\u001b[37m`, `${supportbot.Bot_Name} has successfully connected to discord`)
|
||||||
|
console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`)
|
||||||
|
|
||||||
|
if (supportbot.ReactionTickets === "true") {
|
||||||
|
let chan1 = bot.channels.cache.find(channel => channel.name === supportbot.ReactionChannel)
|
||||||
|
|
||||||
|
if (!chan1) {
|
||||||
|
console.log('\u001b[33m', "[WARN] Ticket reaction panel is not setup, You can do so via the configuration file!")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
chan1.messages.fetch(tickets.ReactionMessage_ID).catch(r => {
|
||||||
|
let embed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.ReactionMessage.replace(/%reaction_emoji%/g, supportbot.ReactionEmoji))
|
||||||
|
.setColor(supportbot.SuccessColour)
|
||||||
|
.setFooter(supportbot.EmbedFooter);
|
||||||
|
|
||||||
|
bot.channels.cache.find(channel => channel.name === supportbot.ReactionChannel).send({
|
||||||
|
embed: embed
|
||||||
|
}).then(r => {
|
||||||
|
let data = {
|
||||||
|
"ReactionMessage_ID": `${r.id}`
|
||||||
|
}
|
||||||
|
let yamlStr = yaml.dump(data);
|
||||||
|
fs.writeFileSync('./storage/ticketreaction.yml', yamlStr, 'utf8');
|
||||||
|
|
||||||
|
r.react(supportbot.ReactionEmoji);
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
@@ -1,102 +1,92 @@
|
|||||||
// Resource: SupportBot
|
// _________ __ __________ __
|
||||||
// Developed by Emerald
|
// / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||||
// Version: 3.4
|
// \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||||
|
// / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||||
|
// /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||||
|
// \/ |__| |__| \/
|
||||||
|
//
|
||||||
|
// SupportBot version 6.1
|
||||||
|
// Created by Emerald Services
|
||||||
|
// Installed with MIT License
|
||||||
|
//
|
||||||
|
// Support Server: discord.gg/jspKFcE
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const bot = new Discord.Client();
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
bot.commands = new Discord.Collection();
|
bot.commands = new Discord.Collection();
|
||||||
bot.settings = require("./settings.json");
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
const { promisify } = require("util");
|
||||||
|
const readdir = promisify(require("fs").readdir);
|
||||||
|
|
||||||
|
String.prototype.toProperCase = function () {
|
||||||
|
return this.replace(
|
||||||
|
/([^\W_]+[^\s-]*) */g,
|
||||||
|
(txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const init = async () => {
|
||||||
|
const evtFiles = await readdir("./events/");
|
||||||
|
|
||||||
|
evtFiles.forEach((file, i) => {
|
||||||
|
const eventName = file.split(".")[0];
|
||||||
|
const event = require(`./events/${file}`);
|
||||||
|
|
||||||
|
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[31m`, `#${i + 1} Event Loaded: ${eventName.toProperCase()} `);
|
||||||
|
|
||||||
|
bot.on(eventName, event.bind(null, bot));
|
||||||
|
delete require.cache[require.resolve(`./events/${file}`)];
|
||||||
|
});
|
||||||
|
|
||||||
|
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `Successfully loaded ${evtFiles.length} events.`);
|
||||||
|
console.info(`\u001b[37m`, "-----------------------------------------------------------------------------");
|
||||||
|
};
|
||||||
|
|
||||||
|
init();
|
||||||
|
|
||||||
fs.readdir("./commands/", (err, files) => {
|
fs.readdir("./commands/", (err, files) => {
|
||||||
if(err) console.log(err);
|
if (err) console.info(err, "error");
|
||||||
|
|
||||||
let jsfile = files.filter(f => f.split(".").pop() === "js")
|
let jsfiles = files.filter((f) => f.split(".").pop() === "js");
|
||||||
if(jsfile.length <= 0) return console.log(`${bot.settings.botname} No commands found. Try to Re-download the resource`);
|
|
||||||
|
|
||||||
jsfile.forEach((f, i) =>{
|
if (jsfiles.length <= 0) {
|
||||||
|
console.log(`[${supportbot.Bot_Name}]: No commands found. Try to Re-download the resource`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
jsfiles.forEach((f, i) => {
|
||||||
let props = require(`./commands/${f}`);
|
let props = require(`./commands/${f}`);
|
||||||
console.log(`[${bot.settings.botname}] > Command Loaded > ${f}`);
|
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[31m`, `#${i + 1} Command Loaded: ${props.name.toProperCase()}`);
|
||||||
bot.commands.set(props.help.name, props);
|
bot.commands.set(props.name, props);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `Loaded ${jsfiles.length} commands!`);
|
||||||
|
console.info(`\u001b[37m`, "-----------------------------------------------------------------------------");
|
||||||
});
|
});
|
||||||
|
|
||||||
bot.addons = new Discord.Collection();
|
fs.readdir("./addons/", (err, files) => {
|
||||||
|
if (err) console.info(err, "error");
|
||||||
|
|
||||||
fs.readdir("./sb-addons/", (err, files) => {
|
let jsfiles = files.filter((f) => f.split(".").pop() === "js");
|
||||||
if(err) console.log(err);
|
|
||||||
|
|
||||||
let jsfile = files.filter(f => f.split(".").pop() === "js")
|
if (jsfiles.length <= 0) {
|
||||||
if(jsfile.length <= 0) return console.log(`${bot.settings.botname} No addons detected nor default! Either download addons from https://itzemerald.tk/`);
|
console.log(`[${supportbot.Bot_Name}]: No addons found. You can download addons from https://emeraldservices.xyz`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
jsfile.forEach((f, i) =>{
|
jsfiles.forEach((f, i) => {
|
||||||
let props = require(`./sb-addons/${f}`);
|
let props = require(`./addons/${f}`);
|
||||||
console.log(`[${bot.settings.botname}] > Addons Loaded > ${f}`);
|
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[31m`, `#${i + 1} Command Loaded: ${props.name.toProperCase()}`);
|
||||||
bot.addons.set(props.help.name, props);
|
bot.commands.set(props.name, props);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `Loaded ${jsfiles.length} commands!`);
|
||||||
|
console.info(`\u001b[37m`, "-----------------------------------------------------------------------------");
|
||||||
});
|
});
|
||||||
|
|
||||||
bot.on("ready", async () => {
|
bot.login(supportbot.Token);
|
||||||
bot.user.setActivity(bot.settings.BotStatus, {type:"PLAYING"});
|
|
||||||
console.log(`\x1b[36m`, `=== [SupportBot] ===\n\nSupportBot - Created by Emerald Services\nInvite ${bot.user.username} to your server\nhttps://discordapp.com/api/oauth2/authorize?client_id=${bot.user.username}&permissions=8&scope=bot\n\n=== [SupportBot] ===`)
|
|
||||||
});
|
|
||||||
|
|
||||||
bot.on("message", async message => {
|
|
||||||
if(message.author.bot) return;
|
|
||||||
if(message.channel.type === "dm") return;
|
|
||||||
if (message.content.indexOf(bot.settings.prefix) !== 0) return;
|
|
||||||
|
|
||||||
let messageArray = message.content.split(" ");
|
|
||||||
const args = message.content.slice(bot.settings.prefix.length).trim().split(/ +/g);
|
|
||||||
const command = args.shift().toLowerCase();
|
|
||||||
|
|
||||||
const cmd = bot.commands.get(command);
|
|
||||||
if(!cmd) return;
|
|
||||||
cmd.run(bot, message, args);
|
|
||||||
});
|
|
||||||
|
|
||||||
bot.on("message", async message => {
|
|
||||||
if(message.author.bot) return;
|
|
||||||
if(message.channel.type === "dm") return;
|
|
||||||
if (message.content.indexOf(bot.settings.prefix) !== 0) return;
|
|
||||||
|
|
||||||
let messageArray = message.content.split(" ");
|
|
||||||
const args = message.content.slice(bot.settings.prefix.length).trim().split(/ +/g);
|
|
||||||
const addon = args.shift().toLowerCase();
|
|
||||||
|
|
||||||
const cmd = bot.addons.get(addon);
|
|
||||||
if(!cmd) return;
|
|
||||||
cmd.run(bot, message, args);
|
|
||||||
});
|
|
||||||
|
|
||||||
// [SupportBot] Welcome Message
|
|
||||||
|
|
||||||
bot.on("guildMemberAdd", (member) => {
|
|
||||||
let channel = member.guild.channels.find(channel => channel.name === `${bot.settings.Welcome_Channel}`)
|
|
||||||
|
|
||||||
const WelcomeMsg= new Discord.RichEmbed()
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setThumbnail(member.user.avatarURL)
|
|
||||||
.setDescription(`:wave: ${member.user.username}\n${bot.settings.Welcome_Message}`)
|
|
||||||
|
|
||||||
channel.send(WelcomeMsg);
|
|
||||||
});
|
|
||||||
|
|
||||||
// [SupportBot] Leave Message
|
|
||||||
|
|
||||||
bot.on("guildMemberRemove", (member) => {
|
|
||||||
let channel = member.guild.channels.find(channel => channel.name === `${bot.settings.Leave_Channel}`)
|
|
||||||
|
|
||||||
const LeaveMsg= new Discord.RichEmbed()
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setThumbnail(member.user.avatarURL)
|
|
||||||
.setDescription(`:wave: ${member.user.username}\n${bot.settings.Leave_Message}`)
|
|
||||||
|
|
||||||
channel.send(LeaveMsg);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
bot.login(bot.settings.token);
|
|
||||||
+777
@@ -0,0 +1,777 @@
|
|||||||
|
{
|
||||||
|
"name": "supportbot",
|
||||||
|
"version": "6.0.0",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@discordjs/collection": {
|
||||||
|
"version": "0.1.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.6.tgz",
|
||||||
|
"integrity": "sha512-utRNxnd9kSS2qhyivo9lMlt5qgAUasH2gb7BEOn6p0efFh24gjGomHzWKMAPn2hEReOPQZCJaRKoURwRotKucQ=="
|
||||||
|
},
|
||||||
|
"@discordjs/form-data": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==",
|
||||||
|
"requires": {
|
||||||
|
"asynckit": "^0.4.0",
|
||||||
|
"combined-stream": "^1.0.8",
|
||||||
|
"mime-types": "^2.1.12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@javascript-obfuscator/escodegen": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@javascript-obfuscator/escodegen/-/escodegen-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-d5TIrhngNyqphUPgjWRVcepw55+aIrN2YX6BHy+4XOTq3/6AZCFj18Ym0tYSDm8T7+hLN6Culif18cepF/NpDQ==",
|
||||||
|
"requires": {
|
||||||
|
"esprima": "^4.0.1",
|
||||||
|
"estraverse": "^5.2.0",
|
||||||
|
"esutils": "^2.0.2",
|
||||||
|
"optionator": "^0.8.1",
|
||||||
|
"source-map": "~0.6.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@nuxtjs/opencollective": {
|
||||||
|
"version": "0.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz",
|
||||||
|
"integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==",
|
||||||
|
"requires": {
|
||||||
|
"chalk": "^4.1.0",
|
||||||
|
"consola": "^2.15.0",
|
||||||
|
"node-fetch": "^2.6.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/minimatch": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
||||||
|
},
|
||||||
|
"@types/validator": {
|
||||||
|
"version": "13.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.0.0.tgz",
|
||||||
|
"integrity": "sha512-WAy5txG7aFX8Vw3sloEKp5p/t/Xt8jD3GRD9DacnFv6Vo8ubudAsRTXgxpQwU0mpzY/H8U4db3roDuCMjShBmw=="
|
||||||
|
},
|
||||||
|
"abort-controller": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
|
||||||
|
"requires": {
|
||||||
|
"event-target-shim": "^5.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"acorn": {
|
||||||
|
"version": "8.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.0.4.tgz",
|
||||||
|
"integrity": "sha512-XNP0PqF1XD19ZlLKvB7cMmnZswW4C/03pRHgirB30uSJTaS3A3V1/P4sS3HPvFmjoriPCJQs+JDSbm4bL1TxGQ=="
|
||||||
|
},
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "4.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||||
|
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||||
|
"requires": {
|
||||||
|
"color-convert": "^2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"argparse": {
|
||||||
|
"version": "1.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||||
|
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
||||||
|
"requires": {
|
||||||
|
"sprintf-js": "~1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"array-differ": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg=="
|
||||||
|
},
|
||||||
|
"array-filter": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM="
|
||||||
|
},
|
||||||
|
"array-union": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw=="
|
||||||
|
},
|
||||||
|
"arrify": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug=="
|
||||||
|
},
|
||||||
|
"assert": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==",
|
||||||
|
"requires": {
|
||||||
|
"es6-object-assign": "^1.1.0",
|
||||||
|
"is-nan": "^1.2.1",
|
||||||
|
"object-is": "^1.0.1",
|
||||||
|
"util": "^0.12.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"asynckit": {
|
||||||
|
"version": "0.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||||
|
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
||||||
|
},
|
||||||
|
"available-typed-arrays": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==",
|
||||||
|
"requires": {
|
||||||
|
"array-filter": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"balanced-match": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||||
|
},
|
||||||
|
"brace-expansion": {
|
||||||
|
"version": "1.1.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
|
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||||
|
"requires": {
|
||||||
|
"balanced-match": "^1.0.0",
|
||||||
|
"concat-map": "0.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"buffer-from": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
|
||||||
|
},
|
||||||
|
"call-bind": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==",
|
||||||
|
"requires": {
|
||||||
|
"function-bind": "^1.1.1",
|
||||||
|
"get-intrinsic": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "4.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
|
||||||
|
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^4.1.0",
|
||||||
|
"supports-color": "^7.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chance": {
|
||||||
|
"version": "1.1.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/chance/-/chance-1.1.7.tgz",
|
||||||
|
"integrity": "sha512-bua/2cZEfzS6qPm0vi3JEvGNbriDLcMj9lKxCQOjUcCJRcyjA7umP0zZm6bKWWlBN04vA0L99QGH/CZQawr0eg=="
|
||||||
|
},
|
||||||
|
"char-regex": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw=="
|
||||||
|
},
|
||||||
|
"charenc": {
|
||||||
|
"version": "0.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
|
||||||
|
"integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc="
|
||||||
|
},
|
||||||
|
"class-validator": {
|
||||||
|
"version": "0.12.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.12.2.tgz",
|
||||||
|
"integrity": "sha512-TDzPzp8BmpsbPhQpccB3jMUE/3pK0TyqamrK0kcx+ZeFytMA+O6q87JZZGObHHnoo9GM8vl/JppIyKWeEA/EVw==",
|
||||||
|
"requires": {
|
||||||
|
"@types/validator": "13.0.0",
|
||||||
|
"google-libphonenumber": "^3.2.8",
|
||||||
|
"tslib": ">=1.9.0",
|
||||||
|
"validator": "13.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-convert": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||||
|
"requires": {
|
||||||
|
"color-name": "~1.1.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-name": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||||
|
},
|
||||||
|
"combined-stream": {
|
||||||
|
"version": "1.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||||
|
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||||
|
"requires": {
|
||||||
|
"delayed-stream": "~1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commander": {
|
||||||
|
"version": "6.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz",
|
||||||
|
"integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q=="
|
||||||
|
},
|
||||||
|
"concat-map": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
|
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||||
|
},
|
||||||
|
"consola": {
|
||||||
|
"version": "2.15.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/consola/-/consola-2.15.0.tgz",
|
||||||
|
"integrity": "sha512-vlcSGgdYS26mPf7qNi+dCisbhiyDnrN1zaRbw3CSuc2wGOMEGGPsp46PdRG5gqXwgtJfjxDkxRNAgRPr1B77vQ=="
|
||||||
|
},
|
||||||
|
"crypt": {
|
||||||
|
"version": "0.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
|
||||||
|
"integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs="
|
||||||
|
},
|
||||||
|
"deep-is": {
|
||||||
|
"version": "0.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
|
||||||
|
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
|
||||||
|
},
|
||||||
|
"define-properties": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
|
||||||
|
"integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
|
||||||
|
"requires": {
|
||||||
|
"object-keys": "^1.0.12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delayed-stream": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
|
||||||
|
},
|
||||||
|
"discord.js": {
|
||||||
|
"version": "12.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.5.1.tgz",
|
||||||
|
"integrity": "sha512-VwZkVaUAIOB9mKdca0I5MefPMTQJTNg0qdgi1huF3iwsFwJ0L5s/Y69AQe+iPmjuV6j9rtKoG0Ta0n9vgEIL6w==",
|
||||||
|
"requires": {
|
||||||
|
"@discordjs/collection": "^0.1.6",
|
||||||
|
"@discordjs/form-data": "^3.0.1",
|
||||||
|
"abort-controller": "^3.0.0",
|
||||||
|
"node-fetch": "^2.6.1",
|
||||||
|
"prism-media": "^1.2.2",
|
||||||
|
"setimmediate": "^1.0.5",
|
||||||
|
"tweetnacl": "^1.0.3",
|
||||||
|
"ws": "^7.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"es-abstract": {
|
||||||
|
"version": "1.18.0-next.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
|
||||||
|
"integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
|
||||||
|
"requires": {
|
||||||
|
"es-to-primitive": "^1.2.1",
|
||||||
|
"function-bind": "^1.1.1",
|
||||||
|
"has": "^1.0.3",
|
||||||
|
"has-symbols": "^1.0.1",
|
||||||
|
"is-callable": "^1.2.2",
|
||||||
|
"is-negative-zero": "^2.0.0",
|
||||||
|
"is-regex": "^1.1.1",
|
||||||
|
"object-inspect": "^1.8.0",
|
||||||
|
"object-keys": "^1.1.1",
|
||||||
|
"object.assign": "^4.1.1",
|
||||||
|
"string.prototype.trimend": "^1.0.1",
|
||||||
|
"string.prototype.trimstart": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"es-to-primitive": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
|
||||||
|
"requires": {
|
||||||
|
"is-callable": "^1.1.4",
|
||||||
|
"is-date-object": "^1.0.1",
|
||||||
|
"is-symbol": "^1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"es6-object-assign": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw="
|
||||||
|
},
|
||||||
|
"eslint-scope": {
|
||||||
|
"version": "5.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
|
||||||
|
"integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
|
||||||
|
"requires": {
|
||||||
|
"esrecurse": "^4.3.0",
|
||||||
|
"estraverse": "^4.1.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"estraverse": {
|
||||||
|
"version": "4.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
|
||||||
|
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"esprima": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
||||||
|
},
|
||||||
|
"esrecurse": {
|
||||||
|
"version": "4.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
|
||||||
|
"integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
|
||||||
|
"requires": {
|
||||||
|
"estraverse": "^5.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"estraverse": {
|
||||||
|
"version": "5.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ=="
|
||||||
|
},
|
||||||
|
"esutils": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
||||||
|
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
|
||||||
|
},
|
||||||
|
"event-target-shim": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
|
||||||
|
},
|
||||||
|
"eventemitter3": {
|
||||||
|
"version": "4.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
|
||||||
|
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
|
||||||
|
},
|
||||||
|
"fast-deep-equal": {
|
||||||
|
"version": "3.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||||
|
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
||||||
|
},
|
||||||
|
"fast-levenshtein": {
|
||||||
|
"version": "2.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
|
||||||
|
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
|
||||||
|
},
|
||||||
|
"foreach": {
|
||||||
|
"version": "2.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
|
||||||
|
"integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k="
|
||||||
|
},
|
||||||
|
"function-bind": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
|
||||||
|
},
|
||||||
|
"get-intrinsic": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==",
|
||||||
|
"requires": {
|
||||||
|
"function-bind": "^1.1.1",
|
||||||
|
"has": "^1.0.3",
|
||||||
|
"has-symbols": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"google-libphonenumber": {
|
||||||
|
"version": "3.2.15",
|
||||||
|
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.15.tgz",
|
||||||
|
"integrity": "sha512-tbCIuzMoH34RdrbFRw5kijAZn/p6JMQvsgtr1glg2ugbwqrMPlOL8pHNK8cyGo9B6SXpcMm4hdyDqwomR+HPRg=="
|
||||||
|
},
|
||||||
|
"has": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||||
|
"requires": {
|
||||||
|
"function-bind": "^1.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"has-flag": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
|
||||||
|
},
|
||||||
|
"has-symbols": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg=="
|
||||||
|
},
|
||||||
|
"inherits": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||||
|
},
|
||||||
|
"inversify": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/inversify/-/inversify-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-Ieh06s48WnEYGcqHepdsJUIJUXpwH5o5vodAX+DK2JA/gjy4EbEcQZxw+uFfzysmKjiLXGYwNG3qDZsKVMcINQ=="
|
||||||
|
},
|
||||||
|
"is-arguments": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==",
|
||||||
|
"requires": {
|
||||||
|
"call-bind": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is-buffer": {
|
||||||
|
"version": "1.1.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
|
||||||
|
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
|
||||||
|
},
|
||||||
|
"is-callable": {
|
||||||
|
"version": "1.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz",
|
||||||
|
"integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA=="
|
||||||
|
},
|
||||||
|
"is-date-object": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g=="
|
||||||
|
},
|
||||||
|
"is-generator-function": {
|
||||||
|
"version": "1.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.8.tgz",
|
||||||
|
"integrity": "sha512-2Omr/twNtufVZFr1GhxjOMFPAj2sjc/dKaIqBhvo4qciXfJmITGH6ZGd8eZYNHza8t1y0e01AuqRhJwfWp26WQ=="
|
||||||
|
},
|
||||||
|
"is-nan": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-z7bbREymOqt2CCaZVly8aC4ML3Xhfi0ekuOnjO2L8vKdl+CttdVoGZQhd4adMFAsxQ5VeRVwORs4tU8RH+HFtQ==",
|
||||||
|
"requires": {
|
||||||
|
"define-properties": "^1.1.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is-negative-zero": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w=="
|
||||||
|
},
|
||||||
|
"is-regex": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==",
|
||||||
|
"requires": {
|
||||||
|
"has-symbols": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is-symbol": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
|
||||||
|
"requires": {
|
||||||
|
"has-symbols": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is-typed-array": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-ILaRgn4zaSrVNXNGtON6iFNotXW3hAPF3+0fB1usg2jFlWqo5fEDdmJkz0zBfoi7Dgskr8Khi2xZ8cXqZEfXNA==",
|
||||||
|
"requires": {
|
||||||
|
"available-typed-arrays": "^1.0.2",
|
||||||
|
"call-bind": "^1.0.0",
|
||||||
|
"es-abstract": "^1.18.0-next.1",
|
||||||
|
"foreach": "^2.0.5",
|
||||||
|
"has-symbols": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"javascript-obfuscator": {
|
||||||
|
"version": "2.9.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/javascript-obfuscator/-/javascript-obfuscator-2.9.4.tgz",
|
||||||
|
"integrity": "sha512-isaI1E9BkqUI7cgG7RKmzzqe8GrmIr3E+AJBCJ+Q78dEZk4RByPHq65tkCUdKKRT8pZ1y729prPa5UAme2B4Ug==",
|
||||||
|
"requires": {
|
||||||
|
"@javascript-obfuscator/escodegen": "2.1.1",
|
||||||
|
"@nuxtjs/opencollective": "0.3.2",
|
||||||
|
"acorn": "8.0.4",
|
||||||
|
"assert": "2.0.0",
|
||||||
|
"chalk": "4.1.0",
|
||||||
|
"chance": "1.1.7",
|
||||||
|
"class-validator": "0.12.2",
|
||||||
|
"commander": "6.2.0",
|
||||||
|
"eslint-scope": "5.1.1",
|
||||||
|
"estraverse": "5.2.0",
|
||||||
|
"eventemitter3": "4.0.7",
|
||||||
|
"fast-deep-equal": "3.1.3",
|
||||||
|
"inversify": "5.0.1",
|
||||||
|
"js-string-escape": "1.0.1",
|
||||||
|
"md5": "2.3.0",
|
||||||
|
"mkdirp": "1.0.4",
|
||||||
|
"multimatch": "5.0.0",
|
||||||
|
"process": "0.11.10",
|
||||||
|
"reflect-metadata": "0.1.13",
|
||||||
|
"source-map-support": "0.5.19",
|
||||||
|
"string-template": "1.0.0",
|
||||||
|
"stringz": "2.1.0",
|
||||||
|
"tslib": "2.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"js-string-escape": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8="
|
||||||
|
},
|
||||||
|
"js-yaml": {
|
||||||
|
"version": "3.14.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
|
||||||
|
"integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
|
||||||
|
"requires": {
|
||||||
|
"argparse": "^1.0.7",
|
||||||
|
"esprima": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"levn": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
|
||||||
|
"integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
|
||||||
|
"requires": {
|
||||||
|
"prelude-ls": "~1.1.2",
|
||||||
|
"type-check": "~0.3.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"md5": {
|
||||||
|
"version": "2.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz",
|
||||||
|
"integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==",
|
||||||
|
"requires": {
|
||||||
|
"charenc": "0.0.2",
|
||||||
|
"crypt": "0.0.2",
|
||||||
|
"is-buffer": "~1.1.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime-db": {
|
||||||
|
"version": "1.44.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
|
||||||
|
"integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
|
||||||
|
},
|
||||||
|
"mime-types": {
|
||||||
|
"version": "2.1.27",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
|
||||||
|
"integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
|
||||||
|
"requires": {
|
||||||
|
"mime-db": "1.44.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimatch": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||||
|
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||||
|
"requires": {
|
||||||
|
"brace-expansion": "^1.1.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mkdirp": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
|
||||||
|
},
|
||||||
|
"multimatch": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/multimatch/-/multimatch-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA==",
|
||||||
|
"requires": {
|
||||||
|
"@types/minimatch": "^3.0.3",
|
||||||
|
"array-differ": "^3.0.0",
|
||||||
|
"array-union": "^2.1.0",
|
||||||
|
"arrify": "^2.0.1",
|
||||||
|
"minimatch": "^3.0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node-fetch": {
|
||||||
|
"version": "2.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
||||||
|
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
|
||||||
|
},
|
||||||
|
"object-inspect": {
|
||||||
|
"version": "1.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz",
|
||||||
|
"integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw=="
|
||||||
|
},
|
||||||
|
"object-is": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-1ZvAZ4wlF7IyPVOcE1Omikt7UpaFlOQq0HlSti+ZvDH3UiD2brwGMwDbyV43jao2bKJ+4+WdPJHSd7kgzKYVqg==",
|
||||||
|
"requires": {
|
||||||
|
"call-bind": "^1.0.0",
|
||||||
|
"define-properties": "^1.1.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"object-keys": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
|
||||||
|
},
|
||||||
|
"object.assign": {
|
||||||
|
"version": "4.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
|
||||||
|
"integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
|
||||||
|
"requires": {
|
||||||
|
"call-bind": "^1.0.0",
|
||||||
|
"define-properties": "^1.1.3",
|
||||||
|
"has-symbols": "^1.0.1",
|
||||||
|
"object-keys": "^1.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"optionator": {
|
||||||
|
"version": "0.8.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
|
||||||
|
"integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
|
||||||
|
"requires": {
|
||||||
|
"deep-is": "~0.1.3",
|
||||||
|
"fast-levenshtein": "~2.0.6",
|
||||||
|
"levn": "~0.3.0",
|
||||||
|
"prelude-ls": "~1.1.2",
|
||||||
|
"type-check": "~0.3.2",
|
||||||
|
"word-wrap": "~1.2.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prelude-ls": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
|
||||||
|
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
|
||||||
|
},
|
||||||
|
"prism-media": {
|
||||||
|
"version": "1.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.2.2.tgz",
|
||||||
|
"integrity": "sha512-I+nkWY212lJ500jLe4tN9tWO7nRiBAVdMv76P9kffZjYhw20raMlW1HSSvS+MLXC9MmbNZCazMrAr+5jEEgTuw=="
|
||||||
|
},
|
||||||
|
"process": {
|
||||||
|
"version": "0.11.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
|
||||||
|
"integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
|
||||||
|
},
|
||||||
|
"reflect-metadata": {
|
||||||
|
"version": "0.1.13",
|
||||||
|
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
|
||||||
|
"integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg=="
|
||||||
|
},
|
||||||
|
"safe-buffer": {
|
||||||
|
"version": "5.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||||
|
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
||||||
|
},
|
||||||
|
"setimmediate": {
|
||||||
|
"version": "1.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
|
||||||
|
"integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU="
|
||||||
|
},
|
||||||
|
"source-map": {
|
||||||
|
"version": "0.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||||
|
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
|
||||||
|
},
|
||||||
|
"source-map-support": {
|
||||||
|
"version": "0.5.19",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
|
||||||
|
"integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
|
||||||
|
"requires": {
|
||||||
|
"buffer-from": "^1.0.0",
|
||||||
|
"source-map": "^0.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sprintf-js": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
|
||||||
|
},
|
||||||
|
"string-template": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/string-template/-/string-template-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-np8iM9wA8hhxjsN5oopWc+zKi5Y="
|
||||||
|
},
|
||||||
|
"string.prototype.trimend": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==",
|
||||||
|
"requires": {
|
||||||
|
"call-bind": "^1.0.0",
|
||||||
|
"define-properties": "^1.1.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"string.prototype.trimstart": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==",
|
||||||
|
"requires": {
|
||||||
|
"call-bind": "^1.0.0",
|
||||||
|
"define-properties": "^1.1.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"stringz": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/stringz/-/stringz-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-KlywLT+MZ+v0IRepfMxRtnSvDCMc3nR1qqCs3m/qIbSOWkNZYT8XHQA31rS3TnKp0c5xjZu3M4GY/2aRKSi/6A==",
|
||||||
|
"requires": {
|
||||||
|
"char-regex": "^1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "7.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||||
|
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||||
|
"requires": {
|
||||||
|
"has-flag": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tslib": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
|
||||||
|
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
|
||||||
|
},
|
||||||
|
"tweetnacl": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw=="
|
||||||
|
},
|
||||||
|
"type-check": {
|
||||||
|
"version": "0.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
|
||||||
|
"integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
|
||||||
|
"requires": {
|
||||||
|
"prelude-ls": "~1.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"util": {
|
||||||
|
"version": "0.12.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/util/-/util-0.12.3.tgz",
|
||||||
|
"integrity": "sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==",
|
||||||
|
"requires": {
|
||||||
|
"inherits": "^2.0.3",
|
||||||
|
"is-arguments": "^1.0.4",
|
||||||
|
"is-generator-function": "^1.0.7",
|
||||||
|
"is-typed-array": "^1.1.3",
|
||||||
|
"safe-buffer": "^5.1.2",
|
||||||
|
"which-typed-array": "^1.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"validator": {
|
||||||
|
"version": "13.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/validator/-/validator-13.0.0.tgz",
|
||||||
|
"integrity": "sha512-anYx5fURbgF04lQV18nEQWZ/3wHGnxiKdG4aL8J+jEDsm98n/sU/bey+tYk6tnGJzm7ioh5FoqrAiQ6m03IgaA=="
|
||||||
|
},
|
||||||
|
"which-typed-array": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==",
|
||||||
|
"requires": {
|
||||||
|
"available-typed-arrays": "^1.0.2",
|
||||||
|
"call-bind": "^1.0.0",
|
||||||
|
"es-abstract": "^1.18.0-next.1",
|
||||||
|
"foreach": "^2.0.5",
|
||||||
|
"function-bind": "^1.1.1",
|
||||||
|
"has-symbols": "^1.0.1",
|
||||||
|
"is-typed-array": "^1.1.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"word-wrap": {
|
||||||
|
"version": "1.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
|
||||||
|
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ=="
|
||||||
|
},
|
||||||
|
"ws": {
|
||||||
|
"version": "7.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.0.tgz",
|
||||||
|
"integrity": "sha512-kyFwXuV/5ymf+IXhS6f0+eAFvydbaBW3zjpT6hUdAh/hbVjTIB5EHBGi0bPoCLSK2wcuz3BrEkB9LrYv1Nm4NQ=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Regular → Executable
+18
-9
@@ -1,18 +1,27 @@
|
|||||||
{
|
{
|
||||||
"name": "supportbot",
|
"name": "supportbot",
|
||||||
"version": "3.4",
|
"version": "6.1",
|
||||||
"description": "SupportBot",
|
"description": "SupportBot | #1 Self-Hosted Ticket Bot",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"discord.js": "^11.4.2"
|
"discord.js": "^12.5.1",
|
||||||
|
"javascript-obfuscator": "^2.9.4",
|
||||||
|
"js-yaml": "^3.14.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"node-fetch": ">=2.6.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "!help"
|
"test": "help"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/1tzemerald/SupportBot.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
|
||||||
"SupportBot"
|
|
||||||
],
|
|
||||||
"author": "Emerald Services",
|
"author": "Emerald Services",
|
||||||
"homepage": "https://discord.gg/hmWgxdF"
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/1tzemerald/SupportBot/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://emeraldsrv.dev"
|
||||||
}
|
}
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
// SupportBot Addons
|
|
||||||
// Default Addon
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
|
||||||
const bot = new Discord.Client()
|
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
|
||||||
|
|
||||||
exports.run = async(bot, message, args) => {
|
|
||||||
message.delete();
|
|
||||||
|
|
||||||
message.channel.send(":white_check_mark: **SupportBot Addon**\nThis addon is here by default.\nWe are currently working on some super amazing addons for SupportBot\nHowever, If you would like to start creating your own support bot addon\ncontact us at EmeraldServices.\n")
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: 'addon',
|
|
||||||
}
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
{
|
|
||||||
|
|
||||||
"SupportBot": "v3.4 / Download addons @ https://itzemerald.tk/",
|
|
||||||
|
|
||||||
"token": "TOKEN",
|
|
||||||
"prefix": "!",
|
|
||||||
"botname": "SupportBot",
|
|
||||||
"colour": "#42f477",
|
|
||||||
"footer": "Support Bot, By Emerald",
|
|
||||||
|
|
||||||
"BotStatus": "Support Bot",
|
|
||||||
|
|
||||||
"staff": "Staff",
|
|
||||||
"support": "Support",
|
|
||||||
"everyone": "@everyone",
|
|
||||||
|
|
||||||
"category": "Tickets",
|
|
||||||
"Ticket_Message": "Your support ticket has been opened successfully\nPlease allow us some time to reach out to you.",
|
|
||||||
"Ticket_Logs": "ticket-logs",
|
|
||||||
|
|
||||||
"Announcement_Title": "SupportBot Announcement",
|
|
||||||
"Announcement_Channel": "announcements",
|
|
||||||
|
|
||||||
"Welcome_Message": "Welcome to the server!",
|
|
||||||
"Welcome_Channel": "welcome",
|
|
||||||
|
|
||||||
"Leave_Message": "Thank you for visiting us!",
|
|
||||||
"Leave_Channel": "welcome",
|
|
||||||
|
|
||||||
"Poll_Channel": "polls",
|
|
||||||
"Poll_Title": "📊 Polls",
|
|
||||||
"Reaction_Poll_1": "✅",
|
|
||||||
"Reaction_Poll_2": "❎",
|
|
||||||
|
|
||||||
"Suggestion_Title": "SupportBot Suggestions",
|
|
||||||
"Suggestion_Channel": "suggestions",
|
|
||||||
"suggestyes": "✅",
|
|
||||||
"suggestno": "❎",
|
|
||||||
|
|
||||||
"Report_Channel": "reports",
|
|
||||||
"Report_Title": "SupportBot Report",
|
|
||||||
|
|
||||||
"LINK_1_NAME": "Discord",
|
|
||||||
"LINK_2_NAME": "Twitter",
|
|
||||||
"LINK_3_NAME": "Website",
|
|
||||||
|
|
||||||
"LINK_1": "https://dicord.gg/changemeinconfig",
|
|
||||||
"LINK_2": "https://twitter.com/changemeinconfig",
|
|
||||||
"LINK_3": "https://www.example.com/",
|
|
||||||
|
|
||||||
"LINKS_TITLE": "SupportBot Links",
|
|
||||||
|
|
||||||
"Ticket_Command": "ticket",
|
|
||||||
"Suggest_Command": "suggest",
|
|
||||||
"Say_Command": "say",
|
|
||||||
"Remove_Command": "remove",
|
|
||||||
"Add_Command": "add",
|
|
||||||
"Ping_Command": "ping",
|
|
||||||
"Close_Command": "close",
|
|
||||||
"Forceclose_Command": "forceclose",
|
|
||||||
"Rename_Command": "rename",
|
|
||||||
"Help_Command": "help",
|
|
||||||
"Link_Command": "links",
|
|
||||||
"Lockchat_Command": "lock",
|
|
||||||
"UnLockchat_Command": "unlock",
|
|
||||||
"Poll_Command": "poll",
|
|
||||||
"Report_Command": "report"
|
|
||||||
|
|
||||||
}
|
|
||||||
Executable
+4
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"ticket": "ticket-0012",
|
||||||
|
"id":419821884431925260
|
||||||
|
}
|
||||||
Executable
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"716992597377286145": {
|
||||||
|
"id": 65
|
||||||
|
},
|
||||||
|
"805909541979029524": {
|
||||||
|
"id": 13
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ReactionMessage_ID: ''
|
||||||
Executable
+195
@@ -0,0 +1,195 @@
|
|||||||
|
# _________ __ __________ __
|
||||||
|
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||||
|
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||||
|
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||||
|
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||||
|
# \/ |__| |__| \/
|
||||||
|
#
|
||||||
|
# SupportBot version 6.1
|
||||||
|
# Created by Emerald Services
|
||||||
|
# Installed with MIT License
|
||||||
|
#
|
||||||
|
# Support Server: discord.gg/jspKFcE
|
||||||
|
|
||||||
|
# General Bot Configuration
|
||||||
|
|
||||||
|
Token: "BOT_TOKEN_HERE"
|
||||||
|
Prefix: "-"
|
||||||
|
Bot_Name: "SupportBot"
|
||||||
|
|
||||||
|
BotActivity: "-help | SupportBot"
|
||||||
|
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
|
||||||
|
# Must set ActivityType to STREAMING in order for Streaming URL to work in the bots status.
|
||||||
|
|
||||||
|
ActivityType: "PLAYING"
|
||||||
|
# Activity status can either be PLAYING, WATCHING, LISTENING or STREAMING.
|
||||||
|
|
||||||
|
DeleteMessages: "true"
|
||||||
|
|
||||||
|
# Embed Configuration
|
||||||
|
|
||||||
|
EmbedColour: "#04b545"
|
||||||
|
EmbedFooter: "SupportBot | The #1 Supportive Discord Bot"
|
||||||
|
|
||||||
|
ErrorColour: "#d12519"
|
||||||
|
SuccessColour: "#04b545"
|
||||||
|
WarningColour: "#fca117"
|
||||||
|
|
||||||
|
# Role Configuration
|
||||||
|
|
||||||
|
AutoRole: "true"
|
||||||
|
# By setting "AutoRole to 'true' the bot will automatically apply the role below when members joins. Set to 'false' to disable this feature.
|
||||||
|
AutoRole_Role: "Member"
|
||||||
|
LockdownRole: "@everyone"
|
||||||
|
|
||||||
|
Staff: "Staff"
|
||||||
|
Admin: "Admin"
|
||||||
|
|
||||||
|
# Ticket Configuration
|
||||||
|
|
||||||
|
TicketChannel: "ticket"
|
||||||
|
TicketCategory: "Tickets"
|
||||||
|
TicketLog: "ticket-logs"
|
||||||
|
TranscriptLog: "transcripts"
|
||||||
|
TicketSubject: "description"
|
||||||
|
# TicketSubject: "description" means that the subject (reason) of the ticket will be displayed upon the channel description if set to "embed" it will be displayed within the embed.
|
||||||
|
|
||||||
|
AllowTicketMentions: "true"
|
||||||
|
# Set to "true" to allow the ticket to mention the author and the support team.
|
||||||
|
# Set to "false" to dis-allow mentions within tickets.
|
||||||
|
|
||||||
|
|
||||||
|
# Ticket Panel (Ticket Reaction Create)
|
||||||
|
|
||||||
|
ReactionTickets: "true"
|
||||||
|
ReactionMessage: "React with %reaction_emoji% to create a Support Ticket!"
|
||||||
|
ReactionChannel: "create-ticket"
|
||||||
|
ReactionEmoji: "📩"
|
||||||
|
# Custom Emojis: <:test:EMOJI_ID>
|
||||||
|
|
||||||
|
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
|
||||||
|
Ticket_Title: "Server Support | %ticketusername%"
|
||||||
|
TicketMessage: "Hello <@%ticketauthor%>, Thank you for creating a support ticket\nPlease wait patiently whilst a member of our team reaches out to you."
|
||||||
|
NoTicketSubject: "No Reason Provided!"
|
||||||
|
TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%>"
|
||||||
|
TranscriptTitle: "Ticket Transcript"
|
||||||
|
|
||||||
|
AddedUser: "👍 <@%user%> has been added to this ticket"
|
||||||
|
RemovedUser: "👍 <@%user%> has been removed from this ticket"
|
||||||
|
|
||||||
|
ClosingTicket: ":warning: You have requested to close your support ticket."
|
||||||
|
ClosingConfirmation_Word: "confirm"
|
||||||
|
CloseConfirmation: "true"
|
||||||
|
# CloseConfirmation to true will make users confirm that they want to close a their ticket, settings to false will just close the ticket.
|
||||||
|
|
||||||
|
# Ticket Department Configuration
|
||||||
|
|
||||||
|
TicketDepartments: "true"
|
||||||
|
# This option enable or disable the ticket departments. If set false Ticket Departments will not work
|
||||||
|
|
||||||
|
AllowStaff: "true"
|
||||||
|
# AllowStaff is an option to whether or not you want the users with the "Staff" role to be able to view inside tickets. If set false "Staff" will not view tickets.
|
||||||
|
|
||||||
|
DepartmentEmoji_1: "🙋"
|
||||||
|
DepartmentEmoji_2: "💸"
|
||||||
|
DepartmentEmoji_3: "📗"
|
||||||
|
# Ticket emojis, the emojis are what users will need to react with inorder to proceed furthur if departments are enabled.
|
||||||
|
|
||||||
|
DepartmentTitle_1: "Support"
|
||||||
|
DepartmentTitle_2: "Billing"
|
||||||
|
DepartmentTitle_3: "Other"
|
||||||
|
# Ticket department title, This is the title for a ticket department to help users know what is available.
|
||||||
|
|
||||||
|
DepartmentRole_1: "Support"
|
||||||
|
DepartmentRole_2: "Admin"
|
||||||
|
DepartmentRole_3: "Support"
|
||||||
|
# Ticket roles are the roles that will be able to gain access to tickets depending on what department has been choosen.
|
||||||
|
|
||||||
|
# System Message Configuration
|
||||||
|
|
||||||
|
SystemMessages: "true"
|
||||||
|
|
||||||
|
SystemMessage_Channel: "system-messages"
|
||||||
|
SystemMessage_Type: "embed"
|
||||||
|
# There are 2 types of how you can send system messages, 'normal' or 'embed'
|
||||||
|
SystemMessage_Icon: "USER"
|
||||||
|
|
||||||
|
Welcome_Title: "User Joined!"
|
||||||
|
WelcomeMessage: "Hello %member%, Welcome to %guildname%!"
|
||||||
|
# %member% define the user who joined and %guildnamne% defines the server name.
|
||||||
|
|
||||||
|
Leave_Title: "User Left!"
|
||||||
|
LeaveMessage: "Goodbye %member%, Thank you for visting %guildname%!"
|
||||||
|
# %member% define the user who left and %guildnamne% defines the server name.
|
||||||
|
|
||||||
|
SystemMessage_EmbedFooter: "false"
|
||||||
|
|
||||||
|
# LINKS Configuration
|
||||||
|
|
||||||
|
LinksTitle: "Quick Links"
|
||||||
|
|
||||||
|
LINKS:
|
||||||
|
"Website": "https://www.example.com"
|
||||||
|
"Store": "https://store.example.com"
|
||||||
|
"Discord": "https://discord.gg/example"
|
||||||
|
# "Twitter": "https://twitter.com/example"
|
||||||
|
|
||||||
|
# Suggestions Configuration
|
||||||
|
|
||||||
|
SuggestionChannel: "suggestions"
|
||||||
|
SuggestionTitle: "Suggestion"
|
||||||
|
SuggestionStarter: "What would you like to suggest?"
|
||||||
|
SuggestReact_1: 👍
|
||||||
|
SuggestReact_2: 👎
|
||||||
|
|
||||||
|
# Announcement Configuration
|
||||||
|
|
||||||
|
AnnouncementChannel: "announcements"
|
||||||
|
AnnouncementTitle: "Servername Announcement"
|
||||||
|
AnnouncementIcon: "https://i.imgur.com/HbkZyB7.png"
|
||||||
|
|
||||||
|
AnnouncementStarter: "What would you like to announce?"
|
||||||
|
|
||||||
|
# General Command Configuration
|
||||||
|
|
||||||
|
HelpCommand: "help"
|
||||||
|
LinksCommand: "links"
|
||||||
|
PingCommand: "ping"
|
||||||
|
SuggestCommand: "suggest"
|
||||||
|
|
||||||
|
# Support Command Configuration
|
||||||
|
|
||||||
|
NewTicket: "ticket"
|
||||||
|
CloseTicket: "close"
|
||||||
|
AddUser: "add"
|
||||||
|
RemoveUser: "remove"
|
||||||
|
RenameTicket: "rename"
|
||||||
|
|
||||||
|
# Staff Command Configuration
|
||||||
|
|
||||||
|
BotSay: "say"
|
||||||
|
|
||||||
|
# Admin Command Configuration
|
||||||
|
|
||||||
|
AnnounceCommand: "announce"
|
||||||
|
|
||||||
|
# Commmand Descriptions
|
||||||
|
|
||||||
|
NewTicketDesc: "Create a new support ticket"
|
||||||
|
AnnounceDesc: "Create a server announcement"
|
||||||
|
CloseTicketDesc: "Close your support ticket"
|
||||||
|
LinksDesc: "View some important links"
|
||||||
|
PingDesc: "Get the bot's latency"
|
||||||
|
HelpDesc: "Get a list of all the commands"
|
||||||
|
RemoveUserDesc: "Remove a user from a support ticket"
|
||||||
|
AddUserDesc: "Add a user to a support ticket"
|
||||||
|
SuggestionDesc: "Create a server suggestion"
|
||||||
|
BotSayDesc: "Say something with the bot"
|
||||||
|
|
||||||
|
# Error / Warining Messages
|
||||||
|
|
||||||
|
IncorrectPerms: ":x: **Err!** You do not have the correct permissions to use this command."
|
||||||
|
InvalidChannel: ":x: **Err!** Channel not found. Please create it!"
|
||||||
|
UserNotFound: ":x: **Err!** This user doesn't exist, Are they in this server?"
|
||||||
|
NoValidTicket: ":warning: You cannot execute this command here. This command is used when closing a ticket."
|
||||||
|
TicketExists: ":warning: This ticket cannot be opened, It already exists!"
|
||||||
Executable
+72
@@ -0,0 +1,72 @@
|
|||||||
|
// SupportBot Utils
|
||||||
|
// Ticket Numbers
|
||||||
|
|
||||||
|
const discord = require("discord.js")
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
class TicketNumberID {
|
||||||
|
|
||||||
|
static pad(guildId) {
|
||||||
|
let n = this.get(guildId) + '';
|
||||||
|
let z = '0';
|
||||||
|
let width = 4;
|
||||||
|
setTimeout(() => {
|
||||||
|
this.set(guildId, this.get(guildId) + 1);
|
||||||
|
}, 50);
|
||||||
|
return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
|
||||||
|
}
|
||||||
|
|
||||||
|
static get(guildId) {
|
||||||
|
|
||||||
|
let ticketnumberID = JSON.parse(fs.readFileSync("./storage/TicketID.json", "utf8"));
|
||||||
|
|
||||||
|
if (!ticketnumberID[guildId]) {
|
||||||
|
ticketnumberID[guildId] = {
|
||||||
|
id: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.writeFileSync("./storage/TicketID.json", JSON.stringify(ticketnumberID, null, 4), err => {
|
||||||
|
if (err) console.log(err);
|
||||||
|
});
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return ticketnumberID[guildId].id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static set(guildId, value) {
|
||||||
|
let ticketnumberID = JSON.parse(fs.readFileSync("./storage/TicketID.json", "utf8"));
|
||||||
|
|
||||||
|
ticketnumberID[guildId] = {
|
||||||
|
id: value
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.writeFileSync("./storage/TicketID.json", JSON.stringify(ticketnumberID, null, 4), err => {
|
||||||
|
if (err) console.log(err);
|
||||||
|
});
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
static reset(guildId) {
|
||||||
|
let ticketnumberID = JSON.parse(fs.readFileSync("./storage/TicketID.json", "utf8"));
|
||||||
|
|
||||||
|
ticketnumberID[guildId] = {
|
||||||
|
id: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.writeFileSync("./storage/TicketID.json", JSON.stringify(ticketnumberID, null, 4), err => {
|
||||||
|
if (err) console.log(err);
|
||||||
|
});
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = TicketNumberID;
|
||||||
Reference in new issue
Block a user