Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0827f55d43 | ||
|
|
ba6ff8c342 | ||
|
|
c0b7dc2737 | ||
|
|
ab6abd453b | ||
|
|
77921aca75 | ||
|
|
a8f91c4814 | ||
|
|
7780fa792c | ||
|
|
41e4c376ec | ||
|
|
09aad61cfe | ||
|
|
31ac81428f | ||
|
|
60daab82d2 | ||
|
|
e7a0544004 | ||
|
|
ff0364bba8 | ||
|
|
a3b64be351 | ||
|
|
eae370e346 | ||
|
|
0d86b50a83 | ||
|
|
543b9028a3 | ||
|
|
867f12d11f | ||
|
|
462781ea6a | ||
|
|
c300ab6459 | ||
|
|
448d8f3007 | ||
|
|
faa53b0af1 | ||
|
|
8e53b8d9a6 | ||
|
|
5678567baa | ||
|
|
1c30f73bb1 | ||
|
|
bd3dbc3033 | ||
|
|
3c312ab8d3 | ||
|
|
7284785db0 | ||
|
|
4e543ea490 | ||
|
|
4d3540126f | ||
|
|
6c29f0d792 | ||
|
|
c85df7c40f | ||
|
|
4f6ff575ce | ||
|
|
aaf3890f71 | ||
|
|
4f9837d991 | ||
|
|
2e2eb008c6 | ||
|
|
fa7074bb59 | ||
|
|
18a7def050 | ||
|
|
40e9cf5fe5 | ||
|
|
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 |
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.
|
||||
@@ -0,0 +1,32 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [10.x, 12.x, 14.x, 15.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm ci
|
||||
- run: npm install discord.js --save
|
||||
- run: npm install js-yaml
|
||||
- run: npm run build --if-present
|
||||
- run: node index.js
|
||||
-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,126 +1,10 @@
|
||||
<h1 align="center">SupportBot v5</h1>
|
||||
<h4 align="center">#1 Discord Support System</h4>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/badge/Made%20with-NodeJS-blue.svg" alt="Made with NodeJS">
|
||||
<img src="https://img.shields.io/github/release/EmeraldRusher/SupportBot.svg" alt="GitHub release">
|
||||
<img src="https://img.shields.io/github/package-json/dependency-version/EmeraldRusher/SupportBot/discord.js.svg" alt="GitHub package.json dependency version (prod)">
|
||||
</p>
|
||||
|
||||
SupportBot is a free & open source discord bot for your server that has the capability to control & manage your servers support.
|
||||
|
||||
| Version | Supported | Status |
|
||||
| ------- | ------------------ |--------------------|
|
||||
| 1.x | 🚫 | Discontinued |
|
||||
| 2.x | 🚫 | Discontinued |
|
||||
| 3.x | ✔️ | Supported |
|
||||
| 4.x | ✔️ | Supported |
|
||||
| 5.x | ✔️ | Supported |
|
||||
|
||||
# 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.
|
||||
|
||||
# Help
|
||||
If you don't understand something, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [Emerald Services Server](https://discord.gg/u47MQJ).
|
||||
|
||||
# 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:
|
||||
|
||||
```
|
||||
{
|
||||
"SupportBot": "v4.0.0",
|
||||
|
||||
"token": "BOT_TOKEN_HERE",
|
||||
"prefix": "!",
|
||||
"botname": "SupportBot",
|
||||
"colour": "#13bd2a",
|
||||
"footer": "Support Bot, By Emerald Services",
|
||||
|
||||
"BotStatus": "Support Bot",
|
||||
|
||||
"staff": "Staff",
|
||||
"support": "Support",
|
||||
"everyone": "@everyone",
|
||||
"Auto_Role": "Member",
|
||||
|
||||
"LINKS": {
|
||||
"Discord": "https://discord.gg/",
|
||||
"Twitter": "https://twitter.com/",
|
||||
"Website": "https://example.com/",
|
||||
"AddMore": "AddMoreIfYouWant"
|
||||
},
|
||||
|
||||
"LINKS_TITLE": "SupportBot Links",
|
||||
|
||||
"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",
|
||||
"Default_Ticket_Reason": "No Subject",
|
||||
"Ticket_React_Message": ":mailbox: React to create your support ticket.",
|
||||
|
||||
"Commands_Log_Title": "SupportBot Logs",
|
||||
"Command_Log_Channel": "command-logs",
|
||||
|
||||
"Announcement_Title": "SupportBot Announcement",
|
||||
"Announcement_Channel": "announcements",
|
||||
"Announcement_Tag_Role": "@everyone",
|
||||
|
||||
"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",
|
||||
|
||||
|
||||
"Announcement_Command": "announce",
|
||||
"Say_Command": "say",
|
||||
"Suggest_Command": "suggest",
|
||||
"Ping_Command": "ping",
|
||||
"Ticket_Command": "ticket",
|
||||
"Remove_Command": "remove",
|
||||
"Add_Command": "add",
|
||||
"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"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
# Contributors List
|
||||
<p>
|
||||
<a href="https://github.com/RedstoneGamez">
|
||||
<img src="https://cdn.discordapp.com/avatars/282610987801247744/9567e0674a5a6d371bb5d6efb956d57b.png?size=32" alt="RedstoneGamez Profile">
|
||||
<strong>RedstoneGamez</strong>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
# Donators List
|
||||
|
||||
# Community
|
||||
<p align="center">
|
||||
<a href="https://discord.gg/tNt95Ba">
|
||||
<img src="https://discordapp.com/api/guilds/516345301985132552/widget.png?style=banner1" alt="Discord Server">
|
||||
</a>
|
||||
</p>
|
||||
> #### SupportBot
|
||||
>
|
||||
> - SupportBot is a free to use discord ticket system that is highly customisable to your own brand,
|
||||
Why use a branded ticket bot when you have the ability to match your ticket bot with your servers name.
|
||||
>
|
||||
> - Our Support team is over at [Discord](https://discord.com/invite/jspKFcE) ready to assist with any questions, concerns or setup information regarding SupportBot.
|
||||
>
|
||||
> - [Download via Polymart](https://polymart.org/resource/supportbot-1-discord-ticket-bot.518)
|
||||
> - [Download via MC-Market](https://www.mc-market.org/resources/8940/)
|
||||
|
||||
@@ -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,75 +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.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({embed: rolemissing});
|
||||
|
||||
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({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}`)
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Commands_Log_Title)
|
||||
.addField(`User`, `<@${message.author.id}>`)
|
||||
.addField(`Command`, bot.settings.Add_Command, true)
|
||||
.addField(`Channel`, message.channel, true)
|
||||
.addField(`Executed At`, message.createdAt, true)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel === `${bot.settings.Command_Log_Channel}`);
|
||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||
|
||||
CommandLog.send(CMDLog);
|
||||
|
||||
|
||||
}
|
||||
|
||||
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 });
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
Regular → Executable
+65
-56
@@ -1,64 +1,73 @@
|
||||
// SupportBot
|
||||
// Command: Say
|
||||
// SupportBot, Created by Emerald Services
|
||||
// Announce
|
||||
|
||||
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 = async(bot, message, args) => {
|
||||
message.delete();
|
||||
module.exports = {
|
||||
name: supportbot.AnnounceCommand,
|
||||
description: supportbot.AnnounceDesc,
|
||||
|
||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
||||
execute(message, args) {
|
||||
|
||||
if (supportbot.DeleteMessages == "true") message.delete();
|
||||
|
||||
let locateChannel = message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.name === supportbot.AnnouncementChannel);
|
||||
|
||||
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)
|
||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.AnnounceCommand}!`);
|
||||
|
||||
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)
|
||||
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 })
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
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("@everyone").then((msg) => {
|
||||
ac.send(embed);
|
||||
});
|
||||
|
||||
const SuggestionSuccessEmbed = new Discord.RichEmbed()
|
||||
.setDescription(`:white_check_mark: You have successfully created an announcement. <#${ac.id}>`)
|
||||
.setColor(bot.settings.colour)
|
||||
message.channel.send(SuggestionSuccessEmbed);
|
||||
|
||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Announcement_Command}`)
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Commands_Log_Title)
|
||||
.addField(`User`, `<@${message.author.id}>`)
|
||||
.addField(`Command`, bot.settings.Announcement_Command, true)
|
||||
.addField(`Channel`, message.channel, true)
|
||||
.addField(`Executed At`, message.createdAt, true)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||
|
||||
CommandLog.send(CMDLog);
|
||||
|
||||
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: bot.settings.Announcement_Command,
|
||||
}
|
||||
};
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
// 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.BanUser,
|
||||
description: supportbot.BanDesc,
|
||||
|
||||
execute(message, args, member) {
|
||||
if (supportbot.DeleteMessages == "true") message.delete();
|
||||
|
||||
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin);
|
||||
|
||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.BanUser}!`);
|
||||
|
||||
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 });
|
||||
|
||||
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel);
|
||||
|
||||
const errornochannel = new Discord.MessageEmbed()
|
||||
.setTitle("Invalid Channel")
|
||||
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
|
||||
.setColor(supportbot.ErrorColour);
|
||||
|
||||
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
||||
|
||||
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
|
||||
|
||||
const embed1 = new Discord.MessageEmbed()
|
||||
.setDescription("> :x: Please provide a reason to ban.\n\n`Try Again!`")
|
||||
.setColor(supportbot.ErrorColour)
|
||||
|
||||
if (!args[0]) return message.channel.send({
|
||||
embed: embed1
|
||||
});
|
||||
|
||||
const embed2 = new Discord.MessageEmbed()
|
||||
.setDescription("> :detective: **Hmm!** Can\'t seem tp find this user.\n\n`Are they in the server?`")
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
if (!user) return message.channel.send({
|
||||
embed: embed2
|
||||
})
|
||||
|
||||
const embed3 = new Discord.MessageEmbed()
|
||||
.setDescription("> :x: **Err No!** Cannot punish this user!\n\n`Reason: Their permissions and or roles are greater than mine.`")
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
if(!user.bannable) return message.channel.send({
|
||||
embed: embed3
|
||||
});
|
||||
|
||||
const embed4 = new Discord.MessageEmbed()
|
||||
.setDescription("> :joy: **OML!** Did you really just try to ban yourself!")
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
if(user.id === message.author.id) return message.channel.send({
|
||||
embed: embed4
|
||||
});
|
||||
|
||||
let reason = args.slice(1).join(" ");
|
||||
|
||||
if(!reason) reason = 'No Reason Provided.';
|
||||
|
||||
const embed5 = new Discord.MessageEmbed()
|
||||
.setDescription("> :thinking: **Hmm** Something seems to have gone wrong.\n\n`Check your system for errors!`")
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
user.ban({ days: supportbot.DaysBannedFor, reason: `${reason}` }).catch(err => {
|
||||
message.channel.send({ embed: embed5 })
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
|
||||
const successEmbed = new Discord.MessageEmbed()
|
||||
.setDescription(`> :white_check_mark: **OOF!** ${user} has been banned!`)
|
||||
.setColor(supportbot.SuccessColour)
|
||||
message.channel.send({
|
||||
embed: successEmbed
|
||||
})
|
||||
|
||||
const logEmbed = new Discord.MessageEmbed()
|
||||
.setTitle(supportbot.BanTitle)
|
||||
.setThumbnail(supportbot.ModThumbnail)
|
||||
.addField('Banned User:', user)
|
||||
.addField('Staff Member', message.author)
|
||||
.addField('Reason:', reason)
|
||||
.setFooter(supportbot.EmbedFooter)
|
||||
.setColor(supportbot.BanLogColour)
|
||||
.setTimestamp()
|
||||
|
||||
locateChannel.send({ embed: logEmbed })
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
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
+106
-82
@@ -1,65 +1,68 @@
|
||||
// SupportBot
|
||||
// Command: Close Ticket
|
||||
// SupportBot, Created by Emerald Services
|
||||
// Close Command
|
||||
|
||||
const Discord = require( "discord.js" );
|
||||
const bot = new Discord.Client()
|
||||
const Discord = require("discord.js");
|
||||
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'));
|
||||
|
||||
/**
|
||||
* @param {Discord.Message} message
|
||||
*/
|
||||
exports.run = ( bot, message, args ) => {
|
||||
message.delete();
|
||||
module.exports = {
|
||||
name: supportbot.CloseTicket,
|
||||
description: supportbot.CloseTicketDesc,
|
||||
|
||||
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.CloseTicket}!`);
|
||||
|
||||
if ( !message.channel.name.startsWith( `ticket-` ) ) {
|
||||
const embed = 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( `${supportbot.TicketChannel}-` )) {
|
||||
const Exists = new Discord.MessageEmbed()
|
||||
.setTitle("No Ticket Found!")
|
||||
.setDescription(`${supportbot.NoValidTicket}`)
|
||||
.setColor(supportbot.WarningColour);
|
||||
message.channel.send({ embed: Exists });
|
||||
|
||||
message.channel.send( embed );
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
const closeRequestEmbed = 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**||` )
|
||||
.setFooter( "Your request will be avoided in 20 seconds" )
|
||||
.setColor( bot.settings.colour )
|
||||
}
|
||||
|
||||
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( closeRequestEmbed ).then( m => {
|
||||
message.channel.awaitMessages( response => response.content.toLowerCase() === `confirm`, {
|
||||
max: 1,
|
||||
time: 20 * 1000,
|
||||
errors: [ 'time' ],
|
||||
message.channel.send(CloseTicketRequest).then(m => {
|
||||
message.channel.awaitMessages( response => response.content.toLowerCase() === supportbot.ClosingConfirmation_Word, {
|
||||
max: 1,
|
||||
time: 20000,
|
||||
errors: [ 'time' ],
|
||||
|
||||
} ).then( collected => {
|
||||
let logChannel = message.guild.channels.find( channel => channel.name === bot.settings.Transcript_Logs );
|
||||
|
||||
}).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 user = message.author;
|
||||
let name = message.channel.name;
|
||||
let ticketChannel = message.channel;
|
||||
|
||||
let reason = args.join( " " ) || "No reason provided.";
|
||||
message.channel.send(`**${supportbot.ClosingTicket}**`)
|
||||
|
||||
let name = message.channel.name;
|
||||
let ticketChannel = message.channel;
|
||||
.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.send( bot.settings.Ticket_Closing )
|
||||
.then( () => {
|
||||
const logEmbed = new Discord.RichEmbed()
|
||||
.setTitle( bot.settings.Transcript_Title )
|
||||
.setColor( bot.settings.colour )
|
||||
.setFooter( bot.settings.footer )
|
||||
.addField( "Ticket Author", user )
|
||||
.addField( "Closed By", message.author.tag )
|
||||
.addField( "Reason", reason );
|
||||
|
||||
message.channel.fetchMessages( { limit: 100 } )
|
||||
.then( msgs => {
|
||||
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`;
|
||||
@@ -70,56 +73,77 @@ exports.run = ( bot, message, args ) => {
|
||||
txt += `${msg.content}\n`;
|
||||
txt += `-----\n\n`;
|
||||
}
|
||||
} );
|
||||
});
|
||||
|
||||
message.author.send( `A transcript has been generated for the ticket you closed.` );
|
||||
message.author.send( new Discord.Attachment( Buffer.from( txt ), `${name}.txt` ) );
|
||||
logChannel.send(logEmbed).catch(err => {
|
||||
message.reply(err)
|
||||
})
|
||||
|
||||
logChannel.send( logEmbed );
|
||||
logChannel.send( new Discord.Attachment( Buffer.from( txt ), `${name}.txt` ) );
|
||||
logChannel.send( new Discord.MessageAttachment( Buffer.from( txt ), `${name}.txt` ) );
|
||||
|
||||
message.channel.delete();
|
||||
|
||||
// message.channel.fetchMessages( { limit: 100, before: msgs.last().id } )
|
||||
})
|
||||
})
|
||||
|
||||
// .then( msg => {
|
||||
// const merged = msgs.concat( msg );
|
||||
// const output = merged.reduce( ( out, msg ) => {
|
||||
// out += `[${message.createdAt}] ${message.author.tag}: ${message.cleanContent ? message.cleanContent.replace( /\n/g, '\r\n' ) : ''}\r\n`;
|
||||
// return out;
|
||||
// }, '' );
|
||||
})
|
||||
|
||||
// log.send( { files: [ { attachment: Buffer.from( output, 'utf8' ), name: `${name}.txt` } ] } ).then( c.delete() ).catch( console.error ); // sends the file to logs
|
||||
// return log.send( embed1 ).catch( console.error );
|
||||
// } )
|
||||
} );
|
||||
} )
|
||||
}).catch( () => {
|
||||
m.edit('The request to close the ticket has timed out.').then( m2 => m2.delete( 3000 ) );
|
||||
});
|
||||
|
||||
} ).catch( () => {
|
||||
m.edit( 'The request to close the ticket has timed out.' ).then( m2 => m2.delete( 3000 ) );
|
||||
} );
|
||||
} );
|
||||
}
|
||||
|
||||
console.log( `\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Close_Command}` )
|
||||
if (supportbot.CloseConfirmation === "false") {
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle( bot.settings.Commands_Log_Title )
|
||||
.addField( `User`, `<@${message.author.id}>` )
|
||||
.addField( `Command`, bot.settings.Close_Command, true )
|
||||
.addField( `Channel`, message.channel, true )
|
||||
.addField( `Executed At`, message.createdAt, true )
|
||||
.setColor( bot.settings.colour )
|
||||
.setFooter( bot.settings.footer )
|
||||
let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog);
|
||||
let user = message.author;
|
||||
let reason = args.join(" ") || "No Reason Provided.";
|
||||
|
||||
let CommandLog = message.guild.channels.find( LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}` );
|
||||
if ( !CommandLog ) return message.channel.send( `:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json``` );
|
||||
let name = message.channel.name;
|
||||
let ticketChannel = message.channel;
|
||||
|
||||
CommandLog.send( CMDLog );
|
||||
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`;
|
||||
|
||||
exports.help = {
|
||||
name: bot.settings.Close_Command,
|
||||
}
|
||||
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,83 +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.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({embed: rolemissing});
|
||||
|
||||
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({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 log = message.guild.channels.find(channel => channel.name === bot.settings.Transcript_Logs)
|
||||
const uID = message.author
|
||||
const reason = args.join(" ") || "No Reason Provided.";
|
||||
const name = message.channel.name;
|
||||
const c = message.channel;
|
||||
message.channel.send(`Your ticket is currently closing`)
|
||||
|
||||
.then(() => {
|
||||
|
||||
const embed1 = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Transcript_Title)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
.addField("Ticket Author", uID)
|
||||
.addField("Closed By", message.author.tag)
|
||||
.addField("Reason", reason)
|
||||
message.channel.fetchMessages({ limit: 100 })
|
||||
|
||||
.then(msgs => {
|
||||
message.channel.fetchMessages({ limit: 100, before: msgs.last().id })
|
||||
|
||||
.then(msg => {
|
||||
const merged = msgs.concat(msg);
|
||||
const output = merged.reduce((out, msg) => {
|
||||
out += `[${message.createdAt}] ${message.author.tag}: ${message.cleanContent ? message.cleanContent.replace(/\n/g, '\r\n') : ''}\r\n`;
|
||||
return out;
|
||||
}, '');
|
||||
|
||||
log.send({ files: [{ attachment: Buffer.from(output, 'utf8'), name: `${name}.txt` }] }).then(c.delete()).catch(console.error); // sends the file to logs
|
||||
return log.send(embed1).catch(console.error);
|
||||
})
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Forceclose_Command}`)
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Commands_Log_Title)
|
||||
.addField(`User`, `<@${message.author.id}>`)
|
||||
.addField(`Command`, bot.settings.Forceclose_Command, true)
|
||||
.addField(`Channel`, message.channel, true)
|
||||
.addField(`Executed At`, message.createdAt, true)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||
|
||||
CommandLog.send(CMDLog);
|
||||
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: bot.settings.Forceclose_Command,
|
||||
}
|
||||
+55
-55
@@ -1,63 +1,63 @@
|
||||
// SupportBot
|
||||
// Command: Help
|
||||
// SupportBot, Created by Emerald Services
|
||||
// Help Command
|
||||
|
||||
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) => {
|
||||
message.delete();
|
||||
module.exports = {
|
||||
name: supportbot.HelpCommand,
|
||||
description: supportbot.HelpDesc,
|
||||
|
||||
let userCommands = "";
|
||||
userCommands += `**${bot.settings.prefix}${bot.settings.Link_Command}**: Get some important links!\n`;
|
||||
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`;
|
||||
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`;
|
||||
userCommands += `**${bot.settings.prefix}${bot.settings.Report_Command} <user> <reason>**: Create a server suggestion\n`;
|
||||
|
||||
let supportCommands = "";
|
||||
supportCommands += `**${bot.settings.prefix}${bot.settings.Add_Command} <user>**: Adds a user to a ticket\n`;
|
||||
supportCommands += `**${bot.settings.prefix}${bot.settings.Remove_Command} <user>**: Removes a user from a ticket\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 = "";
|
||||
staffCommands += `**${bot.settings.prefix}${bot.settings.Announcement_Command} <message>**: Create a bot announcement\n`;
|
||||
staffCommands += `**${bot.settings.prefix}${bot.settings.Say_Command} <message>**: Send a message as the bot\n`;
|
||||
staffCommands += `**${bot.settings.prefix}${bot.settings.Lockchat_Command}**: Lock the chat channel\n`;
|
||||
staffCommands += `**${bot.settings.prefix}${bot.settings.UnLockchat_Command}**: UnLock the chat channel\n`;
|
||||
staffCommands += `**${bot.settings.prefix}${bot.settings.Poll_Command}**: Create a poll\n`;
|
||||
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.botname)
|
||||
.addField(":ticket: Support Commands", userCommands)
|
||||
.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)
|
||||
|
||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Help_Command}`)
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Commands_Log_Title)
|
||||
.addField(`User`, `<@${message.author.id}>`)
|
||||
.addField(`Command`, bot.settings.Help_Command, true)
|
||||
.addField(`Channel`, message.channel, true)
|
||||
.addField(`Executed At`, message.createdAt, true)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via settings.json`);
|
||||
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.HelpCommand}!`);
|
||||
|
||||
CommandLog.send(CMDLog);
|
||||
if (supportbot.helpmenu_withkey = "true") {
|
||||
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 = "";
|
||||
supportCommands += `**${supportbot.Prefix}${supportbot.NewTicket} [reason]** ${supportbot.NewTicketDesc}\n`
|
||||
supportCommands += `**${supportbot.Prefix}${supportbot.CloseTicket} [reason]** ${supportbot.CloseTicketDesc}\n`
|
||||
|
||||
let staffCommands = "";
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.AddUser} <user#0000>** ${supportbot.AddUserDesc}\n`
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>** ${supportbot.RemoveUserDesc}\n`
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.BotSay}** ${supportbot.BotSayDesc}\n`
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.PurgeMessage}** ${supportbot.PurgeDesc}\n`
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.AnnounceCommand}** ${supportbot.AnnounceDesc} \`Admin Only\`\n`
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.BanUser}** ${supportbot.BanDesc} \`Admin Only\` \n`
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.KickUser}** ${supportbot.KickDesc} \`Admin Only\` \n`
|
||||
|
||||
const HelpEmbed1 = new Discord.MessageEmbed()
|
||||
.setTitle(supportbot.Bot_Name)
|
||||
.setThumbnail(message.author.displayAvatarURL())
|
||||
|
||||
}
|
||||
.addFields(
|
||||
{ name: '🖥️ General Commands\n', value: `${generalCommands}\n`, inline: false },
|
||||
{ name: '🎫 Support Commands\n', value: `${supportCommands}\n`, inline: false },
|
||||
)
|
||||
|
||||
exports.help = {
|
||||
name: 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)) {
|
||||
HelpEmbed1.addFields(
|
||||
{ name: '🔐 Staff Commands\n', value: `${staffCommands}\n`, inline: false },
|
||||
)
|
||||
}
|
||||
|
||||
message.channel.send({
|
||||
embed: HelpEmbed1
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,111 @@
|
||||
// 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.KickUser,
|
||||
description: supportbot.KickDesc,
|
||||
|
||||
execute(message, args, member) {
|
||||
if (supportbot.DeleteMessages == "true") message.delete();
|
||||
|
||||
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin);
|
||||
|
||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.BanUser}!`);
|
||||
|
||||
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 });
|
||||
|
||||
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel);
|
||||
|
||||
const errornochannel = new Discord.MessageEmbed()
|
||||
.setTitle("Invalid Channel")
|
||||
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
|
||||
.setColor(supportbot.ErrorColour);
|
||||
|
||||
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
||||
|
||||
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
|
||||
|
||||
const embed1 = new Discord.MessageEmbed()
|
||||
.setDescription("> :x: Please provide a reason to kick.\n\n`Try Again!`")
|
||||
.setColor(supportbot.ErrorColour)
|
||||
|
||||
if (!args[0]) return message.channel.send({
|
||||
embed: embed1
|
||||
});
|
||||
|
||||
const embed2 = new Discord.MessageEmbed()
|
||||
.setDescription("> :detective: **Hmm!** Can\'t seem tp find this user.\n\n`Are they in the server?`")
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
if (!user) return message.channel.send({
|
||||
embed: embed2
|
||||
})
|
||||
|
||||
const embed3 = new Discord.MessageEmbed()
|
||||
.setDescription("> :x: **Err No!** Cannot punish this user!\n\n`Reason: Their permissions and or roles are greater than mine.`")
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
if(!user.kickable) return message.channel.send({
|
||||
embed: embed3
|
||||
});
|
||||
|
||||
const embed4 = new Discord.MessageEmbed()
|
||||
.setDescription("> :joy: **OML!** Did you really just try to kick yourself!")
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
if(user.id === message.author.id) return message.channel.send({
|
||||
embed: embed4
|
||||
});
|
||||
|
||||
let reason = args.slice(1).join(" ");
|
||||
|
||||
if(!reason) reason = 'No Reason Provided.';
|
||||
|
||||
const embed5 = new Discord.MessageEmbed()
|
||||
.setDescription("> :thinking: **Hmm** Something seems to have gone wrong.\n\n`Check your system for errors!`")
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
user.kick({ reason: `${reason}` }).catch(err => {
|
||||
message.channel.send({ embed: embed5 })
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
|
||||
const successEmbed = new Discord.MessageEmbed()
|
||||
.setDescription(`> :white_check_mark: **OOF!** ${user} has been kicked!`)
|
||||
.setColor(supportbot.SuccessColour)
|
||||
|
||||
message.channel.send({
|
||||
embed: successEmbed
|
||||
})
|
||||
|
||||
const logEmbed = new Discord.MessageEmbed()
|
||||
.setTitle(supportbot.KickTitle)
|
||||
.setThumbnail(supportbot.ModThumbnail)
|
||||
.addField('Kicked User:', user)
|
||||
.addField('Staff Member', message.author)
|
||||
.addField('Reason:', reason)
|
||||
.setFooter(supportbot.EmbedFooter)
|
||||
.setColor(supportbot.KickLogColour)
|
||||
.setTimestamp()
|
||||
|
||||
locateChannel.send({ embed: logEmbed })
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
Regular → Executable
+29
-41
@@ -1,48 +1,36 @@
|
||||
// SupportBot
|
||||
// Command: Help
|
||||
// SupportBot, Created by Emerald Services
|
||||
// Links Command
|
||||
|
||||
const Discord = require( "discord.js" );
|
||||
const bot = new Discord.Client()
|
||||
const Discord = require("discord.js");
|
||||
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 ) => {
|
||||
message.delete();
|
||||
module.exports = {
|
||||
name: supportbot.LinksCommand,
|
||||
description: supportbot.LinksDesc,
|
||||
|
||||
let botLinks = bot.settings.LINKS;
|
||||
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.LinksCommand}!`);
|
||||
|
||||
let links = '';
|
||||
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 });
|
||||
|
||||
for ( let name in botLinks ) {
|
||||
links += `[${name}](${botLinks[ name ]})\n`;
|
||||
}
|
||||
|
||||
let embed = new Discord.RichEmbed()
|
||||
.setTitle( bot.settings.LINKS_TITLE )
|
||||
.setDescription( links )
|
||||
.setColor( bot.settings.colour )
|
||||
.setFooter( bot.settings.footer )
|
||||
|
||||
message.channel.send( embed );
|
||||
|
||||
console.log( `\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Link_Command}` )
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Commands_Log_Title)
|
||||
.addField(`User`, `<@${message.author.id}>`)
|
||||
.addField(`Command`, bot.settings.Link_Command, true)
|
||||
.addField(`Channel`, message.channel, true)
|
||||
.addField(`Executed At`, message.createdAt, true)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||
|
||||
CommandLog.send(CMDLog);
|
||||
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: bot.settings.Link_Command,
|
||||
}
|
||||
};
|
||||
@@ -1,53 +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 lockedRole = message.guild.roles.find(lc => lc.name === `${bot.settings.locked_role}`)
|
||||
|
||||
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(lockedRole, { READ_MESSAGES: false, SEND_MESSAGES: false });
|
||||
message.channel.overwritePermissions(staffGroup, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
||||
|
||||
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}`)
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Commands_Log_Title)
|
||||
.addField(`User`, `<@${message.author.id}>`)
|
||||
.addField(`Command`, bot.settings.Lockchat_Command, true)
|
||||
.addField(`Channel`, message.channel, true)
|
||||
.addField(`Executed At`, message.createdAt, true)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||
|
||||
CommandLog.send(CMDLog);
|
||||
|
||||
}
|
||||
|
||||
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
+20
-30
@@ -1,37 +1,27 @@
|
||||
// SupportBot
|
||||
// Command: Ping
|
||||
// SupportBot, Created by Emerald Services
|
||||
// Ping Command
|
||||
|
||||
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) => {
|
||||
message.delete();
|
||||
module.exports = {
|
||||
name: supportbot.PingCommand,
|
||||
description: supportbot.PingDesc,
|
||||
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setDescription(`:ping_pong: **Pong!** \`${bot.ping}ms\` `)
|
||||
.setColor(bot.settings.colour)
|
||||
message.channel.send(embed).catch(console.error);
|
||||
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.PingCommand}!`)
|
||||
|
||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Ping_Command}`)
|
||||
let ping = Date.now() - message.createdTimestamp + " ms";
|
||||
|
||||
const PingCommandEmbed = new Discord.MessageEmbed()
|
||||
.setDescription(`🏓 **Pong!** \`${Date.now() - message.createdTimestamp}ms\``)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Commands_Log_Title)
|
||||
.addField(`User`, `<@${message.author.id}>`)
|
||||
.addField(`Command`, bot.settings.Ping_Command, true)
|
||||
.addField(`Channel`, message.channel, true)
|
||||
.addField(`Executed At`, message.createdAt, true)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||
|
||||
CommandLog.send(CMDLog);
|
||||
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: bot.settings.Ping_Command,
|
||||
}
|
||||
message.channel.send({ embed: PingCommandEmbed });
|
||||
}
|
||||
};
|
||||
@@ -1,60 +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}`)
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Commands_Log_Title)
|
||||
.addField(`User`, `<@${message.author.id}>`)
|
||||
.addField(`Command`, bot.settings.Close_Command, true)
|
||||
.addField(`Channel`, message.channel, true)
|
||||
.addField(`Executed At`, message.createdAt, true)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||
|
||||
CommandLog.send(CMDLog);
|
||||
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: bot.settings.Poll_Command,
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
// 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.PurgeMessage,
|
||||
description: supportbot.PurgeDesc,
|
||||
|
||||
execute(message, args, member) {
|
||||
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.PurgeMessage}!`);
|
||||
|
||||
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 });
|
||||
|
||||
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel);
|
||||
|
||||
const errornochannel = new Discord.MessageEmbed()
|
||||
.setTitle("Invalid Channel")
|
||||
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
|
||||
.setColor(supportbot.ErrorColour);
|
||||
|
||||
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
||||
|
||||
const embed1 = new Discord.MessageEmbed()
|
||||
.setDescription(`> :thinking: **Hmm!** Please enter a valid number of message to purge!\n\n\`${supportbot.Prefix}${supportbot.PurgeMessage} <message count>\` `)
|
||||
.setColor(supportbot.WarningColour)
|
||||
|
||||
if (!args[0]) return message.channel.send({
|
||||
embed: embed1
|
||||
});
|
||||
|
||||
const messagePrune = parseInt(args[0])
|
||||
|
||||
const embed2 = new Discord.MessageEmbed()
|
||||
.setDescription("> :person_facepalming: **Grr!** Can you count? That ain't a number :joy:")
|
||||
.setColor(supportbot.ErrorColour)
|
||||
|
||||
if (isNaN(messagePrune)) return message.reply({
|
||||
embed: embed2
|
||||
})
|
||||
|
||||
message.channel.bulkDelete(messagePrune).then(() => {
|
||||
|
||||
const embed3 = new Discord.MessageEmbed()
|
||||
.setDescription(`> :recycle: \`${args[0]} messages\` **have been purged!** `)
|
||||
.setColor(supportbot.ErrorColour)
|
||||
message.channel.send({
|
||||
embed: embed3
|
||||
})
|
||||
})
|
||||
|
||||
const logEmbed = new Discord.MessageEmbed()
|
||||
.setTitle(supportbot.PruneLogTitle)
|
||||
.setThumbnail(supportbot.PruneThumbnail)
|
||||
.addField('Messages Purged', `\`${args[0]} messages\``)
|
||||
.addField('Staff Member', message.author)
|
||||
.setFooter(supportbot.EmbedFooter)
|
||||
.setColor(supportbot.PruneColour)
|
||||
.setTimestamp()
|
||||
|
||||
locateChannel.send({ embed: logEmbed })
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
@@ -1,74 +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.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({embed: rolemissing});
|
||||
|
||||
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({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}`)
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Commands_Log_Title)
|
||||
.addField(`User`, `<@${message.author.id}>`)
|
||||
.addField(`Command`, bot.settings.Remove_Command, true)
|
||||
.addField(`Channel`, message.channel, true)
|
||||
.addField(`Executed At`, message.createdAt, true)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||
|
||||
CommandLog.send(CMDLog);
|
||||
|
||||
}
|
||||
|
||||
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,63 +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.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({embed: rolemissing});
|
||||
|
||||
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({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}`)
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Commands_Log_Title)
|
||||
.addField(`User`, `<@${message.author.id}>`)
|
||||
.addField(`Command`, bot.settings.Rename_Command, true)
|
||||
.addField(`Channel`, message.channel, true)
|
||||
.addField(`Executed At`, message.createdAt, true)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||
|
||||
CommandLog.send(CMDLog);
|
||||
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: bot.settings.Rename_Command,
|
||||
}
|
||||
@@ -1,75 +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}`);
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Commands_Log_Title)
|
||||
.addField(`User`, `<@${message.author.id}>`)
|
||||
.addField(`Command`, bot.settings.Report_Command, true)
|
||||
.addField(`Channel`, message.channel, true)
|
||||
.addField(`Executed At`, message.createdAt, true)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||
|
||||
CommandLog.send(CMDLog);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: bot.settings.Report_Command
|
||||
}
|
||||
@@ -1,52 +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)
|
||||
|
||||
message.channel.send(embed);
|
||||
|
||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Say_Command}`)
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Commands_Log_Title)
|
||||
.addField(`User`, `<@${message.author.id}>`)
|
||||
.addField(`Command`, bot.settings.Say_Command, true)
|
||||
.addField(`Executed At`, message.createdAt, true)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||
|
||||
CommandLog.send(CMDLog);
|
||||
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: bot.settings.Say_Command,
|
||||
}
|
||||
@@ -1,294 +0,0 @@
|
||||
const Discord = require("discord.js");
|
||||
const bot = new Discord.Client()
|
||||
bot.settings = require("../settings.json");
|
||||
|
||||
exports.run = async (bot, message, args) => {
|
||||
if (message.guild.owner === message.member) {
|
||||
message.delete(1000);
|
||||
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setTitle("SupportBot Setup Mode")
|
||||
.setColor("#fff")
|
||||
.setDescription(`${bot.settings.botname} is about to enter **Setup Mode**.\nThis means that all the roles & channels that are\nrequired to allow supportbot to work will be created.`)
|
||||
.setFooter("Setup mode will expire in 60 seconds")
|
||||
message.channel.send(embed).then((msg) => {
|
||||
msg.react("✅");
|
||||
const filter = (reaction, user) => reaction.emoji.name === "✅" && user.id === message.author.id;
|
||||
msg.awaitReactions(filter, {
|
||||
max: 1,
|
||||
time: 60000,
|
||||
errors: ["time"]
|
||||
}).then(async (collected) => {
|
||||
msg.clearReactions();
|
||||
|
||||
const embed1 = new Discord.RichEmbed()
|
||||
.setTitle("SupportBot Setup Mode")
|
||||
.setColor("#fff")
|
||||
.setDescription(`${bot.settings.botname} has activated **Setup Mode**\nPlease allow a couple minutes for the process to be complete.`)
|
||||
msg.edit(embed1).then((m) => {
|
||||
m.delete(5000);
|
||||
m.edit(":white_check_mark: **Success!** You\'r server is ready, thanks for using SupportBot by Emerald Services.");
|
||||
});
|
||||
const reaction = collected.first();
|
||||
if (reaction.emoji.name === "✅") {
|
||||
// Roles
|
||||
let supportRole = bot.settings.support;
|
||||
let staffRole = bot.settings.staff;
|
||||
let autoRole = bot.settings.Auto_Role;
|
||||
let Department_Role_1 = bot.settings.Department_Role_1
|
||||
let Department_Role_2 = bot.settings.Department_Role_2
|
||||
let Department_Role_3 = bot.settings.Department_Role_3
|
||||
|
||||
|
||||
// Channels & Categories
|
||||
let generalCategory = bot.settings.General_Category;
|
||||
let informationCategory = bot.settings.InformationCategory;
|
||||
let ticketCategory = bot.settings.category;
|
||||
let staffCategory = bot.settings.StaffCategory;
|
||||
let accessChannel = bot.settings.Access_Channel;
|
||||
let announceChannel = bot.settings.Announcement_Channel;
|
||||
let suggestChannel = bot.settings.Suggestion_Channel;
|
||||
let reportsChannel = bot.settings.Report_Channel;
|
||||
let ticketsChannel = bot.settings.Tickets_Channel;
|
||||
let ticketsVoice1 = bot.settings.TicketsVoice1;
|
||||
let ticketsVoice2 = bot.settings.TicketsVoice2;
|
||||
let generalChannel = bot.settings.GeneralChannel;
|
||||
let pollsChannel = bot.settings.Poll_Channel;
|
||||
let botSpam = bot.settings.BotSpam_Channel;
|
||||
let staffGeneral = bot.settings.StaffChat;
|
||||
let staffCommands = bot.settings.StaffCmds;
|
||||
let staffVoice = bot.settings.StaffVoice;
|
||||
let ticketLogs = bot.settings.Ticket_Logs;
|
||||
let commandLogs = bot.settings.Command_Log_Channel;
|
||||
|
||||
// Information Category
|
||||
await message.guild.createChannel(`${informationCategory}`, {
|
||||
type: "category",
|
||||
position: 1
|
||||
}).then(async (cat) => {
|
||||
await message.guild.createChannel(`${accessChannel}`, {
|
||||
type: "text",
|
||||
position: 1,
|
||||
topic: `${bot.settings.Access_Topic}`,
|
||||
parent: cat
|
||||
});
|
||||
await message.guild.createChannel(`${announceChannel}`, {
|
||||
type: "text",
|
||||
position: 2,
|
||||
topic: `${bot.settings.Announcement_Topic}`,
|
||||
parent: cat
|
||||
});
|
||||
await message.guild.createChannel(`${pollsChannel}`, {
|
||||
type: "text",
|
||||
position: 3,
|
||||
topic: `${bot.settings.Poll_Topic}`,
|
||||
parent: cat
|
||||
});
|
||||
await message.guild.createChannel(`${suggestChannel}`, {
|
||||
type: "text",
|
||||
position: 4,
|
||||
topic: `${bot.settings.Suggestion_Topic}`,
|
||||
parent: cat
|
||||
});
|
||||
await message.guild.createChannel(`${reportsChannel}`, {
|
||||
type: "text",
|
||||
position: 5,
|
||||
topic: `${bot.settings.Report_Topic}`,
|
||||
parent: cat
|
||||
});
|
||||
});
|
||||
// General Category
|
||||
await message.guild.createChannel(`${generalCategory}`, {
|
||||
type: "category",
|
||||
position: 2
|
||||
}).then(async (cat) => {
|
||||
await message.guild.createChannel(`${generalChannel}`, {
|
||||
type: "text",
|
||||
position: 1,
|
||||
topic: `${bot.settings.GeneralTopic}`,
|
||||
parent: cat
|
||||
});
|
||||
await message.guild.createChannel(`${botSpam}`, {
|
||||
type: "text",
|
||||
position: 2,
|
||||
topic: `${bot.settings.BotSpam_Topic}`,
|
||||
parent: cat
|
||||
});
|
||||
});
|
||||
// Support Category
|
||||
await message.guild.createChannel(`${ticketCategory}`, {
|
||||
type: "category",
|
||||
position: 3
|
||||
}).then(async (cat) => {
|
||||
await message.guild.createChannel(`${ticketsChannel}`, {
|
||||
type: "text",
|
||||
position: 1,
|
||||
topic: `${bot.settings.Tickets_Topic}`,
|
||||
parent: cat
|
||||
});
|
||||
await message.guild.createChannel(`${ticketsVoice1}`, {
|
||||
type: "voice",
|
||||
position: 2,
|
||||
parent: cat,
|
||||
userLimit: 2,
|
||||
speakable: true,
|
||||
joineable: true
|
||||
});
|
||||
await message.guild.createChannel(`${ticketsVoice2}`, {
|
||||
type: "voice",
|
||||
position: 3,
|
||||
parent: cat,
|
||||
userLimit: 2,
|
||||
speakable: true,
|
||||
joineable: true
|
||||
});
|
||||
});
|
||||
// Staff Category (Private)
|
||||
await message.guild.createChannel(`${staffCategory}`, {
|
||||
type: "category",
|
||||
position: 4
|
||||
}).then(async (cat) => {
|
||||
await message.guild.createChannel(`${staffGeneral}`, {
|
||||
type: "text",
|
||||
position: 1,
|
||||
parent: cat
|
||||
});
|
||||
await message.guild.createChannel(`${staffCommands}`, {
|
||||
type: "text",
|
||||
position: 2,
|
||||
parent: cat
|
||||
});
|
||||
await message.guild.createChannel(`${staffVoice}`, {
|
||||
type: "voice",
|
||||
position: 3,
|
||||
parent: cat,
|
||||
joineable: true,
|
||||
speakable: true
|
||||
});
|
||||
await message.guild.createChannel(`${ticketLogs}`, {
|
||||
type: "text",
|
||||
position: 4,
|
||||
parent: cat
|
||||
});
|
||||
await message.guild.createChannel(`${commandLogs}`, {
|
||||
type: "text",
|
||||
position: 5,
|
||||
parent: cat
|
||||
});
|
||||
|
||||
await message.guild.createRole({
|
||||
name: `${staffRole}`,
|
||||
color: "#ff0000",
|
||||
position: 1,
|
||||
permissions: {
|
||||
"MANAGE_CHANNELS": true,
|
||||
"MANAGE_GUILD": true,
|
||||
"MENTION_EVERYONE": true,
|
||||
"CREATE_INSTANT_INVITE": true,
|
||||
"KICK_MEMBERS": true,
|
||||
"VIEW_AUDIT_LOG": true,
|
||||
"MANAGE_NICKNAMES": true,
|
||||
"CONNECT": true,
|
||||
"SPEAK": true,
|
||||
"USE_EXTERNAL_EMOJIS": true,
|
||||
"MANAGE_MESSAGES": true,
|
||||
"PRIORITY_SPEAKER": true
|
||||
},
|
||||
mentionable: true
|
||||
});
|
||||
await message.guild.createRole({
|
||||
name: `${autoRole}`,
|
||||
color: "#ffffff",
|
||||
position: 2,
|
||||
permissions: {
|
||||
"MANAGE_CHANNELS": false,
|
||||
"MANAGE_GUILD": false,
|
||||
"MENTION_EVERYONE": false,
|
||||
"CREATE_INSTANT_INVITE": true,
|
||||
"KICK_MEMBERS": false,
|
||||
"VIEW_AUDIT_LOG": false,
|
||||
"MANAGE_NICKNAMES": false,
|
||||
"CONNECT": true,
|
||||
"SPEAK": true,
|
||||
"USE_EXTERNAL_EMOJIS": true,
|
||||
"MANAGE_MESSAGES": false,
|
||||
"PRIORITY_SPEAKER": false
|
||||
},
|
||||
mentionable: false
|
||||
});
|
||||
await message.guild.createRole({
|
||||
name: `${Department_Role_1}`,
|
||||
color: "#ffffff",
|
||||
position: 2,
|
||||
permissions: {
|
||||
"MANAGE_CHANNELS": false,
|
||||
"MANAGE_GUILD": false,
|
||||
"MENTION_EVERYONE": false,
|
||||
"CREATE_INSTANT_INVITE": true,
|
||||
"KICK_MEMBERS": true,
|
||||
"VIEW_AUDIT_LOG": true,
|
||||
"MANAGE_NICKNAMES": true,
|
||||
"CONNECT": true,
|
||||
"SPEAK": true,
|
||||
"USE_EXTERNAL_EMOJIS": true,
|
||||
"MANAGE_MESSAGES": true,
|
||||
"PRIORITY_SPEAKER": true
|
||||
},
|
||||
mentionable: false
|
||||
});
|
||||
await message.guild.createRole({
|
||||
name: `${Department_Role_2}`,
|
||||
color: "#ffffff",
|
||||
position: 2,
|
||||
permissions: {
|
||||
"MANAGE_CHANNELS": false,
|
||||
"MANAGE_GUILD": false,
|
||||
"MENTION_EVERYONE": false,
|
||||
"CREATE_INSTANT_INVITE": true,
|
||||
"KICK_MEMBERS": true,
|
||||
"VIEW_AUDIT_LOG": true,
|
||||
"MANAGE_NICKNAMES": true,
|
||||
"CONNECT": true,
|
||||
"SPEAK": true,
|
||||
"USE_EXTERNAL_EMOJIS": true,
|
||||
"MANAGE_MESSAGES": true,
|
||||
"PRIORITY_SPEAKER": true
|
||||
},
|
||||
mentionable: false
|
||||
});
|
||||
await message.guild.createRole({
|
||||
name: `${Department_Role_3}`,
|
||||
color: "#ffffff",
|
||||
position: 2,
|
||||
permissions: {
|
||||
"MANAGE_CHANNELS": false,
|
||||
"MANAGE_GUILD": false,
|
||||
"MENTION_EVERYONE": false,
|
||||
"CREATE_INSTANT_INVITE": true,
|
||||
"KICK_MEMBERS": true,
|
||||
"VIEW_AUDIT_LOG": true,
|
||||
"MANAGE_NICKNAMES": true,
|
||||
"CONNECT": true,
|
||||
"SPEAK": true,
|
||||
"USE_EXTERNAL_EMOJIS": true,
|
||||
"MANAGE_MESSAGES": true,
|
||||
"PRIORITY_SPEAKER": true
|
||||
},
|
||||
mentionable: false
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
message.channel.send(":x: **Error:** You don't have permissions to use this command.").then((msg) => {
|
||||
msg.delete(5000);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: bot.settings.Setup_Command
|
||||
}
|
||||
Regular → Executable
+56
-47
@@ -1,53 +1,62 @@
|
||||
// SupportBot
|
||||
// Command: Suggest
|
||||
// SupportBot, Created by Emerald Services
|
||||
// Suggest Command
|
||||
|
||||
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) => {
|
||||
message.delete();
|
||||
module.exports = {
|
||||
name: supportbot.SuggestCommand,
|
||||
description: supportbot.SuggestionDesc,
|
||||
|
||||
const SuggestionEmbed = new Discord.RichEmbed()
|
||||
.setTitle(`${bot.settings.Suggestion_Title}`)
|
||||
.setDescription(`\`\`\`${args.join(" ")}\`\`\`\nFrom <@${message.author.id}>`)
|
||||
.setFooter(`${bot.settings.footer}`, message.author.avatarURL)
|
||||
.setTimestamp(new Date())
|
||||
.setColor(bot.settings.colour);
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages == "true") message.delete();
|
||||
|
||||
let locateChannel = message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.name === supportbot.SuggestionChannel);
|
||||
|
||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.SuggestCommand}!`);
|
||||
|
||||
const errornochannel = new Discord.MessageEmbed()
|
||||
.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));
|
||||
});
|
||||
|
||||
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 })
|
||||
|
||||
});
|
||||
|
||||
let sc = message.guild.channels.find(SuggestionChannel => SuggestionChannel.name === `${bot.settings.Suggestion_Channel}`);
|
||||
if(!sc) return message.channel.send(`:x: Error! Could not find the suggestion channel **${bot.settings.Suggestion_Channel}**`);
|
||||
|
||||
sc.send(SuggestionEmbed)
|
||||
|
||||
.then(async function(msg) {
|
||||
msg.react(bot.settings.suggestyes).then(() => msg.react(bot.settings.suggestno));
|
||||
});
|
||||
|
||||
const SuggestionSuccessEmbed = new Discord.RichEmbed()
|
||||
.setDescription(`:white_check_mark: You have successfully created your suggestion. <#${sc.id}>`)
|
||||
.setColor(bot.settings.colour)
|
||||
message.channel.send(SuggestionSuccessEmbed);
|
||||
|
||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Suggest_Command}`)
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Commands_Log_Title)
|
||||
.addField(`User`, `<@${message.author.id}>`)
|
||||
.addField(`Command`, bot.settings.Suggest_Command, true)
|
||||
.addField(`Channel`, message.channel, true)
|
||||
.addField(`Executed At`, message.createdAt, true)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**`);
|
||||
|
||||
CommandLog.send(CMDLog);
|
||||
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: bot.settings.Suggest_Command,
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,153 +0,0 @@
|
||||
// SupportBot
|
||||
// Command: Ticket
|
||||
|
||||
const Discord = require("discord.js");
|
||||
const bot = new Discord.Client()
|
||||
|
||||
bot.settings = require("../settings.json");
|
||||
|
||||
exports.run = (bot, message, args) => {
|
||||
message.delete();
|
||||
|
||||
const ID = Math.floor(Math.random() * 10) + 2000;
|
||||
const subject = args.join(" ") || `${bot.settings.Default_Ticket_Reason}`;
|
||||
|
||||
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}`, {
|
||||
type: 'text',
|
||||
}).then(TicketChannel => {
|
||||
|
||||
// Roles
|
||||
let staff = message.guild.roles.find(supportRole => supportRole.name === `${bot.settings.staff}`)
|
||||
let everyone = message.guild.roles.find(everyoneRole => everyoneRole.name === "@everyone")
|
||||
let department = message.guild.roles.find(DepartmentRole => DepartmentRole.name === `${bot.settings.Department_Role_1}`)
|
||||
let department2 = message.guild.roles.find(DepartmentRole => DepartmentRole.name === `${bot.settings.Department_Role_2}`)
|
||||
let department3 = message.guild.roles.find(DepartmentRole => DepartmentRole.name === `${bot.settings.Department_Role_3}`)
|
||||
|
||||
// Permissions
|
||||
TicketChannel.overwritePermissions(everyone, { SEND_MESSAGES: false, READ_MESSAGES: false })
|
||||
TicketChannel.overwritePermissions(department, { SEND_MESSAGES: false, READ_MESSAGES: false })
|
||||
TicketChannel.overwritePermissions(department2, { SEND_MESSAGES: false, READ_MESSAGES: false })
|
||||
TicketChannel.overwritePermissions(department3, { 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()
|
||||
.setTitle(":white_check_mark: Support Ticket Created")
|
||||
.setDescription(`<@${message.author.id}> your support ticket created successfully`)
|
||||
.addField("Your Ticket:", `<#${TicketChannel.id}>`)
|
||||
.setColor(bot.settings.Ticket_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 Department_1 = bot.settings.Ticket_Department_1;
|
||||
const Department_2 = bot.settings.Ticket_Department_2;
|
||||
const Department_3 = bot.settings.Ticket_Department_3;
|
||||
|
||||
const Emoji_1 = bot.settings.Ticket_Department_Emoji_1;
|
||||
const Emoji_2 = bot.settings.Ticket_Department_Emoji_2;
|
||||
const Emoji_3 = bot.settings.Ticket_Department_Emoji_3;
|
||||
|
||||
const TicketMessage = new Discord.RichEmbed()
|
||||
.setDescription(ticketMessage, true)
|
||||
.addField("Available Departments", `${Emoji_1} ${Department_1}\n${Emoji_2} ${Department_2}\n${Emoji_3} ${Department_3}`)
|
||||
.setColor(bot.settings.Ticket_Colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
if (subject != 'No Subject.') {
|
||||
TicketChannel.setTopic(subject);
|
||||
}
|
||||
|
||||
|
||||
TicketChannel.send({embed: TicketMessage}).then(function(msg) {
|
||||
|
||||
msg.react(Emoji_1).then(() => msg.react(Emoji_2)).then(() => msg.react(Emoji_3));
|
||||
|
||||
const filter = (reaction, user) => {
|
||||
return [Emoji_1, Emoji_2, Emoji_3].includes(reaction.emoji.name) && user.id !== msg.author.id;
|
||||
};
|
||||
|
||||
msg.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] })
|
||||
.then(collected => {
|
||||
const reaction = collected.first();
|
||||
|
||||
if (reaction.emoji.name === `${Emoji_1}`) {
|
||||
TicketChannel.overwritePermissions(staff, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
||||
TicketChannel.overwritePermissions(department, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
||||
|
||||
msg.channel.send("You have contacted out " + department + "\nPlease wait patiently for somone to reach out to you.")
|
||||
}
|
||||
|
||||
if (reaction.emoji.name === `${Emoji_2}`) {
|
||||
TicketChannel.overwritePermissions(staff, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
||||
TicketChannel.overwritePermissions(department2, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
||||
|
||||
msg.channel.send("You have contacted out " + department2 + "\nPlease wait patiently for somone to reach out to you.")
|
||||
}
|
||||
|
||||
if (reaction.emoji.name === `${Emoji_3}`) {
|
||||
TicketChannel.overwritePermissions(staff, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
||||
TicketChannel.overwritePermissions(department3, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
||||
|
||||
msg.channel.send("You have contacted out " + department3 + "\nPlease wait patiently for somone to reach out to you.")
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// 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}`)
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Commands_Log_Title)
|
||||
.addField(`User`, `<@${message.author.id}>`)
|
||||
.addField(`Command`, bot.settings.Ticket_Command, true)
|
||||
.addField(`Channel`, message.channel, true)
|
||||
.addField(`Executed At`, message.createdAt, true)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||
|
||||
CommandLog.send(CMDLog);
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: bot.settings.Ticket_Command,
|
||||
}
|
||||
@@ -1,52 +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 lockedRole = message.guild.roles.find(lc => lc.name === `${bot.settings.locked_role}`)
|
||||
|
||||
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(lockedRole, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
||||
message.channel.overwritePermissions(staffGroup, { 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}`)
|
||||
|
||||
const CMDLog = new Discord.RichEmbed()
|
||||
.setTitle(bot.settings.Commands_Log_Title)
|
||||
.addField(`User`, `<@${message.author.id}>`)
|
||||
.addField(`Command`, bot.settings.UnLockchat_Command, true)
|
||||
.addField(`Executed At`, message.createdAt, true)
|
||||
.setColor(bot.settings.colour)
|
||||
.setFooter(bot.settings.footer)
|
||||
|
||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||
|
||||
CommandLog.send(CMDLog);
|
||||
|
||||
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: bot.settings.UnLockchat_Command,
|
||||
}
|
||||
Executable
+54
@@ -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'));
|
||||
|
||||
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)
|
||||
|
||||
const role = member.guild.roles.cache.find(role => role.name === supportbot.AutoRole_Role)
|
||||
|
||||
member.roles.add(role).catch(console.error);
|
||||
|
||||
if (supportbot.SystemMessage_Type === "embed") {
|
||||
|
||||
const GuildAddMember = new Discord.MessageEmbed()
|
||||
.setTitle(supportbot.Welcome_Title)
|
||||
.setDescription(supportbot.WelcomeMessage.replace(/%member%/g, `<@!${member.user.id}>`).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: "N/A",
|
||||
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(supportbot.NewTicket);
|
||||
if(!cmd) return;
|
||||
|
||||
cmd.execute(message, message.content);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,66 @@
|
||||
// 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);
|
||||
|
||||
if (supportbot.ReactionPanel_Description === true) {
|
||||
embed.setDescription(supportbot.ReactionDescription)
|
||||
}
|
||||
|
||||
if (supportbot.ReactionPanel_Thumbnail === true) {
|
||||
embed.setThumbnail(supportbot.ReactionThumbnail)
|
||||
}
|
||||
|
||||
if (supportbot.ReactionPanel_Image === true) {
|
||||
embed.setImage(supportbot.ReactionImage)
|
||||
}
|
||||
|
||||
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,118 +1,92 @@
|
||||
// ____ _ ____ _
|
||||
// / ___| _ _ _ __ _ __ ___ _ __| |_| __ ) ___ | |_
|
||||
// \___ \| | | | '_ \| '_ \ / _ \| '__| __| _ \ / _ \| __|
|
||||
// ___) | |_| | |_) | |_) | (_) | | | |_| |_) | (_) | |_
|
||||
// |____/ \__,_| .__/| .__/ \___/|_| \__|____/ \___/ \__|
|
||||
// |_| |_|
|
||||
|
||||
// Resource: SupportBot
|
||||
// Developed by Emerald Services
|
||||
// Version: 5.0.0
|
||||
// _________ __ __________ __
|
||||
// / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||
// \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||
// / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||
// /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||
// \/ |__| |__| \/
|
||||
//
|
||||
// SupportBot version 6.1
|
||||
// Created by Emerald Services
|
||||
// Installed with MIT License
|
||||
//
|
||||
// Support Server: discord.gg/jspKFcE
|
||||
|
||||
const Discord = require("discord.js");
|
||||
const fs = require("fs");
|
||||
const bot = new Discord.Client();
|
||||
|
||||
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) => {
|
||||
if(err) console.log(err);
|
||||
|
||||
let jsfile = 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) =>{
|
||||
let props = require(`./commands/${f}`);
|
||||
console.log(`[${bot.settings.botname}] > Command Loaded > ${f}`);
|
||||
bot.commands.set(props.help.name, props);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
bot.addons = new Discord.Collection();
|
||||
|
||||
fs.readdir("./sb-addons/", (err, files) => {
|
||||
if(err) console.log(err);
|
||||
|
||||
let jsfile = files.filter(f => f.split(".").pop() === "js")
|
||||
if(jsfile.length <= 0) return console.log(`${bot.settings.botname} No addons detected nor default! Either download addons from https://itzemerald.tk/`);
|
||||
|
||||
jsfile.forEach((f, i) =>{
|
||||
let props = require(`./sb-addons/${f}`);
|
||||
console.log(`[${bot.settings.botname}] > Addons Loaded > ${f}`);
|
||||
bot.addons.set(props.help.name, props);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
bot.on("ready", async () => {
|
||||
bot.user.setActivity(bot.settings.BotStatus, {type:"PLAYING"});
|
||||
console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`)
|
||||
console.log(`\u001b[37m`, `Emerald Services has successfully connected to discord`)
|
||||
console.log(`\u001b[37m`, `Invite your bot with https://discordapp.com/api/oauth2/authorize?client_id=516372960110444574&permissions=8&scope=bot`)
|
||||
console.log(`\u001b[37m`, `© ️SupportBot created by Emerald Services`)
|
||||
console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`)
|
||||
console.log(`\u001b[43;1m \u001b[37m \u001b[1m`, `If you require any assistance you can contact us at discord, https://discord.gg/tNt95Ba`)
|
||||
|
||||
});
|
||||
|
||||
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 && Auto Join Role
|
||||
|
||||
bot.on("guildMemberAdd", (member) => {
|
||||
let channel = member.guild.channels.find(channel => channel.name === `${bot.settings.Welcome_Channel}`)
|
||||
let autorole = member.guild.roles.find(autorole => autorole.name === `${bot.settings.Auto_Role}`)
|
||||
|
||||
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);
|
||||
member.addRole(autorole).catch(console.error);
|
||||
if (err) console.info(err, "error");
|
||||
|
||||
let jsfiles = files.filter((f) => f.split(".").pop() === "js");
|
||||
|
||||
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}`);
|
||||
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[31m`, `#${i + 1} Command Loaded: ${props.name.toProperCase()}`);
|
||||
bot.commands.set(props.name, props);
|
||||
});
|
||||
|
||||
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `Loaded ${jsfiles.length} commands!`);
|
||||
console.info(`\u001b[37m`, "-----------------------------------------------------------------------------");
|
||||
});
|
||||
|
||||
// [SupportBot] Leave Message
|
||||
fs.readdir("./addons/", (err, files) => {
|
||||
if (err) console.info(err, "error");
|
||||
|
||||
let jsfiles = files.filter((f) => f.split(".").pop() === "js");
|
||||
|
||||
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);
|
||||
if (jsfiles.length <= 0) {
|
||||
console.log(`[${supportbot.Bot_Name}]: No addons found. You can download addons from https://emeraldservices.xyz`);
|
||||
return;
|
||||
}
|
||||
|
||||
jsfiles.forEach((f, i) => {
|
||||
let props = require(`./addons/${f}`);
|
||||
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[31m`, `#${i + 1} Command Loaded: ${props.name.toProperCase()}`);
|
||||
bot.commands.set(props.name, props);
|
||||
});
|
||||
|
||||
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `Loaded ${jsfiles.length} commands!`);
|
||||
console.info(`\u001b[37m`, "-----------------------------------------------------------------------------");
|
||||
});
|
||||
|
||||
bot.login(bot.settings.token);
|
||||
bot.login(supportbot.Token);
|
||||
@@ -0,0 +1,8 @@
|
||||
SupportBot Language Compatibility
|
||||
|
||||
In order to switch languages simple remove the current existig configuration file and replace it with one of the files here renamnig the file to "supportbot-config.yml" from (for example) "supportbot-config_es.yml" to home directory of SupportBot.
|
||||
|
||||
-> Delete the existing supportbot-config.yml file
|
||||
-> Download the new file for whatever language
|
||||
-> Upload the file to SupportBot and rename it to supportbot-config.yml
|
||||
-> Job Done, restart the bot :wink:
|
||||
@@ -0,0 +1,229 @@
|
||||
# _________ __ __________ __
|
||||
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||
# \/ |__| |__| \/
|
||||
#
|
||||
# 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"
|
||||
|
||||
# Help Configuration
|
||||
|
||||
HelpMenu_withKey: "false"
|
||||
# If set to true, emojis will be used as a key to define the access level of commands.
|
||||
|
||||
|
||||
# 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!"
|
||||
ReactionPanel_Description: true
|
||||
ReactionDescription: "Create a support ticket to contact a member of staff."
|
||||
ReactionChannel: "create-ticket"
|
||||
ReactionEmoji: "📩"
|
||||
# Custom Emojis: <:test:EMOJI_ID>
|
||||
ReactionPanel_Thumbnail: true
|
||||
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
|
||||
ReactionPanel_Image: true
|
||||
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
|
||||
|
||||
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?"
|
||||
|
||||
# Moderation System Configuration
|
||||
|
||||
BanTitle: "User Banned!"
|
||||
DaysBannedFor: 7
|
||||
BanLogColour: "#D911B4"
|
||||
|
||||
KickTitle: "User Kicked!"
|
||||
KickLogColour: "#D9B111"
|
||||
|
||||
ModThumbnail: "https://i.imgur.com/l6P3DF6.png"
|
||||
ModLogChannel: "mod-logs"
|
||||
|
||||
PruneLogTitle: "Bulk Delete"
|
||||
PruneThumbnail: "https://i.imgur.com/OAgW2vR.png"
|
||||
PruneColour: "#1BA30C"
|
||||
|
||||
|
||||
# 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"
|
||||
PurgeMessage: "purge"
|
||||
|
||||
# Admin Command Configuration
|
||||
|
||||
AnnounceCommand: "announce"
|
||||
BanUser: "ban"
|
||||
KickUser: "kick"
|
||||
|
||||
# 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"
|
||||
BanDesc: "Ban a member from this server."
|
||||
KickDesc: "Kick a member from this server."
|
||||
PurgeDesc: "Purge messages from the chat."
|
||||
|
||||
# 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!"
|
||||
@@ -0,0 +1,222 @@
|
||||
# _________ __ __________ __
|
||||
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||
# \/ |__| |__| \/
|
||||
#
|
||||
# SupportBot version 6.2
|
||||
# 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"
|
||||
# Debe establecer ActivityType en STREAMING para que la dirección URL de streaming funcione en el estado de los bots.
|
||||
|
||||
ActivityType: "PLAYING"
|
||||
# El estado de la actividad puede ser
|
||||
|
||||
DeleteMessages: "true"
|
||||
|
||||
# Embed Configuration
|
||||
|
||||
EmbedColour: "#04b545"
|
||||
EmbedFooter: "SupportBot El #1 bot de discordia de apoyo"
|
||||
|
||||
ErrorColour: "#d12519"
|
||||
SuccessColour: "#04b545"
|
||||
WarningColour: "#fca117"
|
||||
|
||||
# Role Configuration
|
||||
|
||||
AutoRole: "true"
|
||||
# Estableciendo "AutoRole para 'true' el bot aplicará automáticamente el rol siguiente cuando los miembros se unan. Establecer en 'false' para desactivar esta función.
|
||||
AutoRole_Role: "Miembro"
|
||||
LockdownRole: "@everyone"
|
||||
|
||||
Staff: "Personal"
|
||||
Admin: "Admin"
|
||||
|
||||
# Ticket Configuration
|
||||
|
||||
TicketChannel: "ticket"
|
||||
TicketCategory: "Tickets"
|
||||
TicketLog: "ticket-logs"
|
||||
TranscriptLog: "transcripts"
|
||||
TicketSubject: "description"
|
||||
# TicketSubject: "description" significa que el sujeto (motivo) del billete se mostrará en la descripción del canal si se establece en "embed" se mostrará dentro de la incrustación.
|
||||
|
||||
AllowTicketMentions: "true"
|
||||
# Establecer en "true" para permitir que el boleto mencione al autor y al equipo de apoyo.
|
||||
# Establecer en "false" para desautorizar las menciones dentro de los boletos.
|
||||
|
||||
# Ticket Panel (Ticket Reaction Create)
|
||||
|
||||
ReactionTickets: "true"
|
||||
ReactionMessage: "React with %reaction_emoji% para crear un Ticket de Soporte!"
|
||||
ReactionChannel: "crear-ticket"
|
||||
ReactionPanel_Description: "true"
|
||||
ReactionDescription: "Cree un ticket de soporte para contactar a un miembro del personal."
|
||||
ReactionEmoji: "📩"
|
||||
# Custom Emojis: <:test:EMOJI_ID>
|
||||
ReactionPanel_Thumbnail: true
|
||||
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
|
||||
ReactionPanel_Image: true
|
||||
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
|
||||
|
||||
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
|
||||
Ticket_Title: "Server Support | %ticketusername%"
|
||||
TicketMessage: "Hola <@%ticketauthor%>, Gracias por crear un ticket de apoyo\nPor favor, espere pacientemente mientras un miembro de nuestro equipo se acerca a usted."
|
||||
NoTicketSubject: "No Reason Provided!"
|
||||
TicketCreatedAlert: ":ticket: Se ha creado su ticket de soporte: <#%ticketid%>"
|
||||
TranscriptTitle: "Transcripción de entradas"
|
||||
|
||||
AddedUser: "👍 <@%user%> se ha añadido a este billete"
|
||||
RemovedUser: "👍 <@%user%> ha sido retirado de este boleto"
|
||||
|
||||
ClosingTicket: ":warning: Ha solicitado cerrar su ticket de soporte."
|
||||
ClosingConfirmation_Word: "confirm"
|
||||
CloseConfirmation: "true"
|
||||
# CloseConfirmation a true hará que los usuarios confirmen que quieren cerrar un billete, la configuración a false simplemente cerrará el ticket.
|
||||
|
||||
# Ticket Department Configuration
|
||||
|
||||
TicketDepartments: "true"
|
||||
# Esta opción habilite o deshabilite los departamentos de tickets. Compensar "false" Los departamentos de entradas no funcionarán.
|
||||
|
||||
AllowStaff: "true"
|
||||
# AllowStaff es una opción para si desea o no que los usuarios con el rol "Personal" puedan ver dentro de los tickets. Si se establece falso "Personal" no verá los boletos.
|
||||
|
||||
DepartmentEmoji_1: "🙋"
|
||||
DepartmentEmoji_2: "💸"
|
||||
DepartmentEmoji_3: "📗"
|
||||
# Ticket emojis, los emojis son lo que los usuarios tendrán que reaccionar con orden para proceder furthur si los departamentos están habilitados.
|
||||
|
||||
DepartmentTitle_1: "Apoyo"
|
||||
DepartmentTitle_2: "Facturación"
|
||||
DepartmentTitle_3: "Otro"
|
||||
# Ticket department title, Este es el título de un departamento de tickets para ayudar a los usuarios a saber lo que está disponible.
|
||||
|
||||
DepartmentRole_1: "Apoyo"
|
||||
DepartmentRole_2: "Admin"
|
||||
DepartmentRole_3: "Apoyo"
|
||||
# Los roles de tickets son los roles que podrán acceder a los boletos dependiendo del departamento que se haya elegido.
|
||||
|
||||
# System Message Configuration
|
||||
|
||||
SystemMessages: "true"
|
||||
|
||||
SystemMessage_Channel: "smensajes-del-sistema"
|
||||
SystemMessage_Type: "embed"
|
||||
# Hay 2 tipos de cómo puede enviar mensajes del sistema, 'normal' or 'embed'
|
||||
SystemMessage_Icon: "USER"
|
||||
|
||||
Welcome_Title: "Usuario unido!"
|
||||
WelcomeMessage: "Hola %member%, Bienvenido a %guildname%!"
|
||||
# %member% definir el usuario que se unió y %guildnamne% define el nombre del servidor.
|
||||
|
||||
Leave_Title: "¡Usuario a la izquierda!"
|
||||
LeaveMessage: "Adios %member%, Gracias por visting %guildname%!"
|
||||
# %member% definir el usuario que se unió y %guildnamne% define el nombre del servidor.
|
||||
|
||||
SystemMessage_EmbedFooter: "false"
|
||||
|
||||
# LINKS Configuration
|
||||
|
||||
LinksTitle: "Enlaces rápidos"
|
||||
|
||||
LINKS:
|
||||
"Website": "https://www.example.com"
|
||||
"Store": "https://store.example.com"
|
||||
"Discord": "https://discord.gg/example"
|
||||
# "Twitter": "https://twitter.com/example"
|
||||
|
||||
# Suggestions Configuration
|
||||
|
||||
SuggestionChannel: "Sugerencias"
|
||||
SuggestionTitle: "Sugerencia"
|
||||
SuggestionStarter: "¿Qué te gustaría sugerir?"
|
||||
SuggestReact_1: 👍
|
||||
SuggestReact_2: 👎
|
||||
|
||||
# Announcement Configuration
|
||||
|
||||
AnnouncementChannel: "anuncios"
|
||||
AnnouncementTitle: "Anuncio de nombre de servidor"
|
||||
AnnouncementIcon: "https://i.imgur.com/HbkZyB7.png"
|
||||
|
||||
AnnouncementStarter: "¿Qué te gustaría anunciar?"
|
||||
|
||||
# Moderation System Configuration
|
||||
|
||||
BanTitle: "User Banned!"
|
||||
DaysBannedFor: 7
|
||||
BanLogColour: "#D911B4"
|
||||
|
||||
KickTitle: "User Kicked!"
|
||||
KickLogColour: "#D9B111"
|
||||
|
||||
ModThumbnail: "https://i.imgur.com/l6P3DF6.png"
|
||||
ModLogChannel: "mod-logs"
|
||||
|
||||
PruneLogTitle: "Bulk Delete"
|
||||
PruneThumbnail: "https://i.imgur.com/OAgW2vR.png"
|
||||
PruneColour: "#1BA30C"
|
||||
|
||||
# General Command Configuration
|
||||
|
||||
HelpCommand: "ayuda"
|
||||
LinksCommand: "enlaces"
|
||||
PingCommand: "senal"
|
||||
SuggestCommand: "cugerir"
|
||||
|
||||
# Support Command Configuration
|
||||
|
||||
NewTicket: "boleto"
|
||||
CloseTicket: "cerca"
|
||||
AddUser: "anadir"
|
||||
RemoveUser: "eliminar"
|
||||
RenameTicket: "renombrar"
|
||||
|
||||
# Staff Command Configuration
|
||||
|
||||
BotSay: "decir"
|
||||
PurgeMessage: "purge"
|
||||
|
||||
# Admin Command Configuration
|
||||
|
||||
AnnounceCommand: "anunciar"
|
||||
BanUser: "ban"
|
||||
KickUser: "kick"
|
||||
|
||||
# Commmand Descriptions
|
||||
|
||||
NewTicketDesc: "Crear un nuevo ticket de soporte"
|
||||
AnnounceDesc: "Crear un anuncio de servidor"
|
||||
CloseTicketDesc: "Cierre su ticket de soporte"
|
||||
LinksDesc: "Ver algunos enlaces importantes"
|
||||
PingDesc: "Obtener la latencia del bot"
|
||||
HelpDesc: "Obtener una lista de todos los comandoss"
|
||||
RemoveUserDesc: "Eliminar un usuario de un ticket de soporte"
|
||||
AddUserDesc: "Add un usuario a un ticket de soporte"
|
||||
SuggestionDesc: "Crear una sugerencia de servidor"
|
||||
BotSayDesc: "Di algo con el bot"
|
||||
BanDesc: "Prohibir a un/una miembro de este servidor."
|
||||
KickDesc: "Patea a un/una miembro de este servidor."
|
||||
PurgeDesc: "Purga los mensajes del chat."
|
||||
|
||||
# Error / Warining Messages
|
||||
|
||||
IncorrectPerms: ":x: **Err!** No tiene los permisos correctos para utilizar este comando."
|
||||
InvalidChannel: ":x: **Err!** Canal no encontrado. ¡Por favor, créalo!"
|
||||
UserNotFound: ":x: **Err!** Este usuario no existe, ¿están en este servidor?"
|
||||
NoValidTicket: ":warning: No puede ejecutar este comando aquí. Este comando se utiliza al cerrar un vale."
|
||||
TicketExists: ":warning: Este billete no se puede abrir, ¡Ya existe!"
|
||||
@@ -0,0 +1,224 @@
|
||||
# _________ __ __________ __
|
||||
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||
# \/ |__| |__| \/
|
||||
#
|
||||
# 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"
|
||||
# Doit définir ActivityType a STREAMING afin que l’URL de streaming fonctionne dans le statut bots.
|
||||
|
||||
ActivityType: "PLAYING"
|
||||
# L’état d’activité peut être PLAYING, WATCHING, LISTENING ou STREAMING.
|
||||
|
||||
DeleteMessages: "true"
|
||||
|
||||
# Embed Configuration
|
||||
|
||||
EmbedColour: "#04b545"
|
||||
EmbedFooter: "SupportBot | The #1 Supportive Discord Bot"
|
||||
|
||||
ErrorColour: "#d12519"
|
||||
SuccessColour: "#04b545"
|
||||
WarningColour: "#fca117"
|
||||
|
||||
# Role Configuration
|
||||
|
||||
AutoRole: "true"
|
||||
# En parametre "AutoRole a 'true' le bot appliquera automatiquement le rôle ci-dessous lorsque les membres se joindra. Mis à 'false' désactiver cette fonctionnalite.
|
||||
AutoRole_Role: "Membre"
|
||||
LockdownRole: "@everyone"
|
||||
|
||||
Staff: "Personnel"
|
||||
Admin: "Admin"
|
||||
|
||||
# Ticket Configuration
|
||||
|
||||
TicketChannel: "ticket"
|
||||
TicketCategory: "Tickets"
|
||||
TicketLog: "ticket-logs"
|
||||
TranscriptLog: "transcripts"
|
||||
TicketSubject: "description"
|
||||
# TicketSubject: "description" signifie que le sujet (reason) du billet sera affiché sur la description du canal s’il est défini pour "embed" il sera affiché dans l’intégration.
|
||||
|
||||
AllowTicketMentions: "true"
|
||||
# Mis a "true" pour permettre au billet de mentionner l’auteur et l’équipe de soutien.
|
||||
# Mis a "false" pour désa autoriser les mentions dans les billets.
|
||||
|
||||
|
||||
# Ticket Panel (Ticket Reaction Create)
|
||||
|
||||
ReactionTickets: "true"
|
||||
ReactionMessage: "Réagissez avec %reaction_emoji% pour créer un ticket de support !"
|
||||
ReactionChannel: "creer-billet"
|
||||
ReactionPanel_Description: "true"
|
||||
ReactionDescription: "Créez un ticket de support pour contacter un membre du personnel."
|
||||
ReactionEmoji: "📩"
|
||||
# Custom Emojis: <:test:EMOJI_ID>
|
||||
ReactionPanel_Thumbnail: true
|
||||
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
|
||||
ReactionPanel_Image: true
|
||||
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
|
||||
|
||||
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
|
||||
Ticket_Title: "Prise en charge du serveur | %ticketusername%"
|
||||
TicketMessage: "Bonjour <@%ticketauthor%>, Merci d’avoir créé un billet de support\nS’il vous plaît attendre patiemment pendant qu’un membre de notre équipe vous tend la main."
|
||||
NoTicketSubject: "Aucune raison fournie!"
|
||||
TicketCreatedAlert: ":ticket: Votre ticket de support a été créé : <#%ticketid%>"
|
||||
TranscriptTitle: "Transcription du billet"
|
||||
|
||||
AddedUser: "👍 <@%user%> a ete ajoute a ce billet"
|
||||
RemovedUser: "👍 <@%user%> a ete retiré de ce billet"
|
||||
|
||||
ClosingTicket: ":warning: Vous avez demandé de fermer votre billet de soutien."
|
||||
ClosingConfirmation_Word: "confirm"
|
||||
CloseConfirmation: "true"
|
||||
# CloseConfirmation a vrai fera confirmer aux utilisateurs qu’ils veulent fermer un leur billet, les paramètres à faux va juste fermer le billet.
|
||||
|
||||
# Ticket Department Configuration
|
||||
|
||||
TicketDepartments: "true"
|
||||
# Cette option permet ou désactive les départements de billetterie. Si définissez faux départements de billets ne fonctionnera pas
|
||||
|
||||
AllowStaff: "true"
|
||||
# AllowStaff est une option pour savoir si oui ou non vous voulez les utilisateurs avec le "Staff" rôle pour être en mesure de voir à l’intérieur des billets. S’il est mis faux "Staff" ne affichera pas les billets.
|
||||
|
||||
DepartmentEmoji_1: "🙋"
|
||||
DepartmentEmoji_2: "💸"
|
||||
DepartmentEmoji_3: "📗"
|
||||
# Emojis billet, les emojis sont ce que les utilisateurs devront réagir avec inorder pour procéder furthur si les départements sont activés.
|
||||
|
||||
DepartmentTitle_1: "Soutien"
|
||||
DepartmentTitle_2: "Facturation"
|
||||
DepartmentTitle_3: "Autres"
|
||||
# Titre du département des billets, C’est le titre d’un service de billetterie pour aider les utilisateurs à savoir ce qui est disponible.
|
||||
|
||||
DepartmentRole_1: "Soutien"
|
||||
DepartmentRole_2: "Admin"
|
||||
DepartmentRole_3: "Soutien"
|
||||
# Les rôles de billets sont les rôles qui seront en mesure d’accéder aux billets en fonction du ministère qui a été choisi.
|
||||
|
||||
# System Message Configuration
|
||||
|
||||
SystemMessages: "true"
|
||||
|
||||
SystemMessage_Channel: "messages-systeme"
|
||||
SystemMessage_Type: "embed"
|
||||
# Il existe 2 types de la façon dont vous pouvez envoyer des messages système, 'normal' or 'embed'
|
||||
SystemMessage_Icon: "USER"
|
||||
|
||||
Welcome_Title: "Utilisateur rejoint!"
|
||||
WelcomeMessage: "Bonjour %member%, Bienvenue à %guildname%!"
|
||||
# %member% définir l’utilisateur qui a rejoint et %guildnamne% définit le nom du serveur.
|
||||
|
||||
Leave_Title: "Utilisateur à gauche!"
|
||||
LeaveMessage: "Au revoir %member%, Merci d’avoir visting %guildname%!"
|
||||
# %member% définir l’utilisateur qui est parti et %guildnamne% définit le nom du serveur.
|
||||
|
||||
SystemMessage_EmbedFooter: "false"
|
||||
|
||||
# LINKS Configuration
|
||||
|
||||
LinksTitle: "Liens rapides"
|
||||
|
||||
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: "Qu’aimeriez-vous suggérer?"
|
||||
SuggestReact_1: 👍
|
||||
SuggestReact_2: 👎
|
||||
|
||||
# Announcement Configuration
|
||||
|
||||
AnnouncementChannel: "annonces"
|
||||
AnnouncementTitle: "Annonce servername"
|
||||
AnnouncementIcon: "https://i.imgur.com/HbkZyB7.png"
|
||||
|
||||
AnnouncementStarter: "Qu’aimeriez-vous annoncer?"
|
||||
|
||||
# Moderation System Configuration
|
||||
|
||||
BanTitle: "User Banned!"
|
||||
DaysBannedFor: 7
|
||||
BanLogColour: "#D911B4"
|
||||
|
||||
KickTitle: "User Kicked!"
|
||||
KickLogColour: "#D9B111"
|
||||
|
||||
ModThumbnail: "https://i.imgur.com/l6P3DF6.png"
|
||||
ModLogChannel: "mod-logs"
|
||||
|
||||
PruneLogTitle: "Bulk Delete"
|
||||
PruneThumbnail: "https://i.imgur.com/OAgW2vR.png"
|
||||
PruneColour: "#1BA30C"
|
||||
|
||||
|
||||
# General Command Configuration
|
||||
|
||||
HelpCommand: "aide"
|
||||
LinksCommand: "liens"
|
||||
PingCommand: "ping"
|
||||
SuggestCommand: "suggerer"
|
||||
|
||||
# Support Command Configuration
|
||||
|
||||
NewTicket: "billet"
|
||||
CloseTicket: "proche"
|
||||
AddUser: "ajouter"
|
||||
RemoveUser: "retirer"
|
||||
RenameTicket: "renommer"
|
||||
|
||||
# Staff Command Configuration
|
||||
|
||||
BotSay: "dire"
|
||||
PurgeMessage: "purge"
|
||||
|
||||
# Admin Command Configuration
|
||||
|
||||
AnnounceCommand: "annoncer"
|
||||
BanUser: "ban"
|
||||
KickUser: "kick"
|
||||
|
||||
# Commmand Descriptions
|
||||
|
||||
NewTicketDesc: "Créer un nouveau ticket de support"
|
||||
AnnounceDesc: "Créer une annonce de serveur"
|
||||
CloseTicketDesc: "Fermez votre billet de support"
|
||||
LinksDesc: "View some important links"
|
||||
PingDesc: "Obtenez la latence du bot"
|
||||
HelpDesc: "Obtenez une liste de toutes les commandes"
|
||||
RemoveUserDesc: "Supprimer un utilisateur d’un ticket de support"
|
||||
AddUserDesc: "Ajouter un utilisateur à un ticket de support"
|
||||
SuggestionDesc: "Créer une suggestion de serveur"
|
||||
BotSayDesc: "Dites quelque chose avec le bot"
|
||||
BanDesc: "Bannir un membre de ce serveur."
|
||||
KickDesc: "Kick un membre de ce serveur."
|
||||
PurgeDesc: "Purgez les messages du chat."
|
||||
|
||||
# Error / Warining Messages
|
||||
|
||||
IncorrectPerms: ":x: **Err!** Vous n’avez pas les autorisations correctes pour utiliser cette commande."
|
||||
InvalidChannel: ":x: **Err!** Canal ina pas trouvé. S’il vous plaît le créer!"
|
||||
UserNotFound: ":x: **Err!** Vous ne pouvez pas exécuter cette commande ici. Cette commande est utilisée lors de la fermeture d’un billet. ..."
|
||||
NoValidTicket: ":warning: Vous ne pouvez pas exécuter cette commande ici. Cette commande est utilisée lors de la fermeture d’un billet."
|
||||
TicketExists: ":warning: Ce billet ne peut pas être ouvert, il existe déjà!"
|
||||
@@ -0,0 +1,222 @@
|
||||
# _________ __ __________ __
|
||||
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||
# \/ |__| |__| \/
|
||||
#
|
||||
# SupportBot version 6.2
|
||||
# Erstellt von Emerald Services
|
||||
# Installiert unter MIT License
|
||||
#
|
||||
# Support Server: discord.gg/jspKFcE
|
||||
|
||||
# Generelle Bot Konfiguration
|
||||
|
||||
Token: "BOT_TOKEN_HERE"
|
||||
Prefix: "-"
|
||||
Bot_Name: "SupportBot"
|
||||
|
||||
BotActivity: "-help | SupportBot"
|
||||
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
|
||||
# ActivityType muss auf STREAMING gesetzt werden, damit die Streaming-URL im Bot-Status funktioniert
|
||||
ActivityType: "PLAYING"
|
||||
# Der Aktivitätsstatus kann entweder PLAYING, WATCHING, LISTENING oder STREAMING sein.
|
||||
|
||||
DeleteMessages: "true"
|
||||
|
||||
# Embed Konfiguration
|
||||
|
||||
EmbedColour: "#04b545"
|
||||
EmbedFooter: "SupportBot | Der #1 Support Discord Bot"
|
||||
|
||||
ErrorColour: "#d12519"
|
||||
SuccessColour: "#04b545"
|
||||
WarningColour: "#fca117"
|
||||
|
||||
# Rollen Konfiguration
|
||||
|
||||
AutoRole: "true"
|
||||
# Wenn Sie "AutoRole" auf "true" setzen, vergibt der Bot automatisch die folgende Rolle, wenn Mitglieder deinem Discord Server beitreten. Setze dies auf "false", um diese Funktion zu deaktivieren.
|
||||
AutoRole_Role: "Member"
|
||||
LockdownRole: "@everyone"
|
||||
|
||||
Staff: "Staff"
|
||||
Admin: "Admin"
|
||||
|
||||
# Ticket Konfiguration
|
||||
|
||||
TicketChannel: "ticket"
|
||||
TicketCategory: "Tickets"
|
||||
TicketLog: "ticket-logs"
|
||||
TranscriptLog: "transcripts"
|
||||
TicketSubject: "description"
|
||||
# TicketSubject: "description" bedeutet, dass der Grund des Tickets in der Kanalbeschreibung steht, "embed" bedeutet, dass der Grund im Embed steht.
|
||||
|
||||
AllowTicketMentions: "true"
|
||||
# Setze dies auf "true" damit das Ticket den Ersteller und das Support-Team pingt.
|
||||
# Setze dies auf "false" um Pings in Tickets zu deaktivieren
|
||||
|
||||
|
||||
# Ticket Panel (Per Reaktion ein Ticket erstellen)
|
||||
|
||||
ReactionTickets: "true"
|
||||
ReactionMessage: "Reagiere mit %reaction_emoji% um ein Ticket zu erstellen!"
|
||||
ReactionPanel_Description: "true"
|
||||
ReactionDescription: "Erstellen Sie ein Support-Ticket, um einen Mitarbeiter zu kontaktieren."
|
||||
ReactionChannel: "create-ticket"
|
||||
ReactionEmoji: "📩"
|
||||
# Custom Emojis: <:test:EMOJI_ID>
|
||||
ReactionPanel_Thumbnail: true
|
||||
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
|
||||
ReactionPanel_Image: true
|
||||
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
|
||||
|
||||
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
|
||||
Ticket_Title: "Server Support | %ticketusername%"
|
||||
TicketMessage: "Hallo <@%ticketauthor%>, Vielen Dank das du ein Ticket erstellt hast\nBitte warte, bis sich ein Mitglied unseres Teams meldet!"
|
||||
NoTicketSubject: "Keinen Grund angegeben!"
|
||||
TicketCreatedAlert: ":ticket: Dein Ticket wurde erstellt: <#%ticketid%>"
|
||||
TranscriptTitle: "Ticket Transcript"
|
||||
|
||||
AddedUser: "👍 <@%user%> wurde zu dem Ticket hinzugefügt"
|
||||
RemovedUser: "👍 <@%user%> wurde aus dem Ticket entfernt"
|
||||
|
||||
ClosingTicket: ":warning: Du hast angefragt, dein Ticket zu schließen"
|
||||
ClosingConfirmation_Word: "confirm"
|
||||
CloseConfirmation: "true"
|
||||
# CloseConfirmation "true" erwartet von Usern eine Bestätigung zum schließen des Ticket, setze dies auf "false" damit das Ticket einfach geschlossen wird.
|
||||
|
||||
# Ticket Abteilungskonfiguration
|
||||
|
||||
TicketDepartments: "true"
|
||||
# Diese Option aktiviert oder deaktiviert die verschiedenen Ticket Abteilungen, setze dies auf "false" um keine Ticket Abteilungen zu haben.
|
||||
|
||||
AllowStaff: "true"
|
||||
# Allowstaff ist eine Option welche der Rolle "Staff" ermöglicht, im Ticket mitzulesen, setze dies auf "false" damit die Rolle "Staff" nicht mitlesen kann.
|
||||
|
||||
DepartmentEmoji_1: "🙋"
|
||||
DepartmentEmoji_2: "💸"
|
||||
DepartmentEmoji_3: "📗"
|
||||
# Ticket Emojis, auf welche die User reagieren um ein Ticket für die verschiedenen Abteilungen zu erstellen, natürlich nur wenn die Abteilungen aktiviert sind.
|
||||
|
||||
DepartmentTitle_1: "Support"
|
||||
DepartmentTitle_2: "Billing"
|
||||
DepartmentTitle_3: "Other"
|
||||
# Ticket Abteilungstitel, dies ist der Titel einer Ticketabteilung, um Nutzern zu helfen, damit diese wissen welche Abteilungen vorhanden sind.
|
||||
|
||||
DepartmentRole_1: "Support"
|
||||
DepartmentRole_2: "Admin"
|
||||
DepartmentRole_3: "Support"
|
||||
# Ticketrollen sind die Rollen, welche abhängig von der Abteilung Zugriff auf Tickets erhalten.
|
||||
|
||||
# System Nachrichten Konfiguration
|
||||
|
||||
SystemMessages: "true"
|
||||
|
||||
SystemMessage_Channel: "System-Nachrichten"
|
||||
SystemMessage_Type: "embed"
|
||||
# Es gibt 2 Arten wie Sie System Nachrichten senden können, "normal" oder "embed"
|
||||
SystemMessage_Icon: "USER"
|
||||
|
||||
Welcome_Title: "User hat den Server betreten!"
|
||||
WelcomeMessage: "Herzlich Willkommen %member%, Willkommen auf %guildname%!"
|
||||
# %member% definiert den Nutzer welcher gerade gejoint ist, %guildnamne% den Server Namen.
|
||||
|
||||
Leave_Title: "User hat den Server verlassen!"
|
||||
LeaveMessage: "Es war schön dich zu sehen %member%, Danke dir für den Besuch auf %guildname%!"
|
||||
# %member% definiert den Nutzer, welcher den Server verlassen hat, %guildname% den Server Namen.
|
||||
|
||||
SystemMessage_EmbedFooter: "false"
|
||||
|
||||
# LINKS Konfiguration
|
||||
|
||||
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 Konfiguration
|
||||
|
||||
SuggestionChannel: "suggestions"
|
||||
SuggestionTitle: "Suggestion"
|
||||
SuggestionStarter: "Was möchtest du vorschlagen?"
|
||||
SuggestReact_1: 👍
|
||||
SuggestReact_2: 👎
|
||||
|
||||
# Announcement Konfiguration
|
||||
|
||||
AnnouncementChannel: "announcements"
|
||||
AnnouncementTitle: "Servername Announcement"
|
||||
AnnouncementIcon: "https://i.imgur.com/HbkZyB7.png"
|
||||
|
||||
AnnouncementStarter: "Was möchtest du ankündigen?"
|
||||
|
||||
# Moderation System Configuration
|
||||
|
||||
BanTitle: "User Banned!"
|
||||
DaysBannedFor: 7
|
||||
BanLogColour: "#D911B4"
|
||||
|
||||
KickTitle: "User Kicked!"
|
||||
KickLogColour: "#D9B111"
|
||||
|
||||
ModThumbnail: "https://i.imgur.com/l6P3DF6.png"
|
||||
ModLogChannel: "mod-logs"
|
||||
|
||||
PruneLogTitle: "Bulk Delete"
|
||||
PruneThumbnail: "https://i.imgur.com/OAgW2vR.png"
|
||||
PruneColour: "#1BA30C"
|
||||
|
||||
# General Command Konfiguration
|
||||
|
||||
HelpCommand: "help"
|
||||
LinksCommand: "links"
|
||||
PingCommand: "ping"
|
||||
SuggestCommand: "suggest"
|
||||
|
||||
# Support Command Konfiguration
|
||||
|
||||
NewTicket: "ticket"
|
||||
CloseTicket: "close"
|
||||
AddUser: "add"
|
||||
RemoveUser: "remove"
|
||||
RenameTicket: "rename"
|
||||
|
||||
# Staff Command Konfiguration
|
||||
|
||||
BotSay: "say"
|
||||
PurgeMessage: "purge"
|
||||
|
||||
# Admin Command Konfiguration
|
||||
|
||||
AnnounceCommand: "announce"
|
||||
BanUser: "ban"
|
||||
KickUser: "kick"
|
||||
|
||||
# Commmand Beschreibungen (help)
|
||||
|
||||
NewTicketDesc: "Erstelle ein neues Support Ticket"
|
||||
AnnounceDesc: "Erstelle eine neue Server Ankündigung"
|
||||
CloseTicketDesc: "Schließe dein Support Ticket"
|
||||
LinksDesc: "Zeigt wichtige Links an"
|
||||
PingDesc: "Bekomme die Bot Latenz"
|
||||
HelpDesc: "Erhalte eine Liste der verfügbaren Befehle"
|
||||
RemoveUserDesc: "Entferne einen Nutzer aus einem Ticket"
|
||||
AddUserDesc: "Füge einen Nutzer einem Ticket hinzu"
|
||||
SuggestionDesc: "Erstelle einen Server Vorschlag"
|
||||
BotSayDesc: "Sage etwas mit dem Bot"
|
||||
BanDesc: "Verbannen Sie ein Mitglied von diesem Server."
|
||||
KickDesc: "Treten Sie ein Mitglied von diesem Server."
|
||||
PurgeDesc: "Nachrichten aus dem Chat löschen."
|
||||
|
||||
# Error / Warning Nachrichten
|
||||
|
||||
IncorrectPerms: ":x: **Error!** Du hast nicht die benötigten Berechtigungen um diesen Befehl auszuführen."
|
||||
InvalidChannel: ":x: **Error!** Channel nicht gefunden. Bitte erstelle diesen Channel!"
|
||||
UserNotFound: ":x: **Error!** Dieser Nutzer existiert nicht, ist er auf diesem Server?"
|
||||
NoValidTicket: ":warning: Du kannst diesen Befehl hier nicht verwenden. Dieser Befehl wird zum schließen eines Tickets verwendet."
|
||||
TicketExists: ":warning: Dieses Ticket kann nicht erstellt werden, es existiert bereits."
|
||||
Generated
-5
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"name": "SupportBot",
|
||||
"version": "4.0",
|
||||
"lockfileVersion": 1
|
||||
}
|
||||
Regular → Executable
+15
-26
@@ -1,37 +1,26 @@
|
||||
{
|
||||
"name": "SupportBot",
|
||||
"version": "4.0",
|
||||
"description": "SupportBot",
|
||||
"name": "supportbot",
|
||||
"version": "6.1",
|
||||
"description": "SupportBot | #1 Self-Hosted Ticket Bot",
|
||||
"main": "index.js",
|
||||
"private": "true",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "node index.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "12.6.0",
|
||||
"npm": "6.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"array-sort": "^1.0.0",
|
||||
"discord.js": "^11.5.1",
|
||||
"table": "^5.4.4"
|
||||
"discord.js": "^12.5.1",
|
||||
"js-yaml": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"node-fetch": ">=2.6.1"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "help"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/EmeraldRusher/SupportBot.git"
|
||||
"url": "git+https://github.com/1tzemerald/SupportBot.git"
|
||||
},
|
||||
"keywords": [
|
||||
"SupportBot",
|
||||
"Emerald Services"
|
||||
],
|
||||
"author": "Emerald Services",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/EmeraldRusher/SupportBot/issues"
|
||||
"url": "https://github.com/1tzemerald/SupportBot/issues"
|
||||
},
|
||||
"homepage": "https://discord.gg/hmWgxdF",
|
||||
"contributors": [
|
||||
"iJosGCS",
|
||||
"RedstoneGamez"
|
||||
]
|
||||
"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',
|
||||
}
|
||||
-105
@@ -1,105 +0,0 @@
|
||||
{
|
||||
"SupportBot": "v5.0",
|
||||
|
||||
"token": "BOT_TOKEN_HERE",
|
||||
"prefix": "-",
|
||||
"botname": "SupportBot",
|
||||
"colour": "#13bd2a",
|
||||
"footer": "Support Bot, By Emerald Services",
|
||||
"BotStatus": "Support Bot",
|
||||
|
||||
"staff": "Staff",
|
||||
|
||||
"locked_role": "@everyone",
|
||||
"everyone": "@everyone",
|
||||
"Auto_Role": "Member",
|
||||
|
||||
"Department_Role_1": "Support",
|
||||
"Department_Role_2": "Security",
|
||||
"Department_Role_3": "Sales",
|
||||
|
||||
"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",
|
||||
"Default_Ticket_Reason": "No Subject",
|
||||
|
||||
"Ticket_Colour": "#000e42",
|
||||
"Transcript_Logs": "ticket-data",
|
||||
"Transcript_Title": "Support Transcript",
|
||||
"Ticket_Closing": "Your ticket is currently closing",
|
||||
|
||||
"Ticket_Department_1": "Support",
|
||||
"Ticket_Department_2": "Security",
|
||||
"Ticket_Department_3": "Sales",
|
||||
|
||||
"Ticket_Department_Emoji_1": "🎧",
|
||||
"Ticket_Department_Emoji_2": "🔐",
|
||||
"Ticket_Department_Emoji_3": "💵",
|
||||
|
||||
"General_Category": "General",
|
||||
"InformationCategory": "Information",
|
||||
"StaffCategory": "Staff",
|
||||
|
||||
"Access_Channel": "welcome",
|
||||
"GeneralChannel": "general",
|
||||
"BotSpam_Channel": "bot-spam",
|
||||
"Tickets_Channel": "open-a-ticket",
|
||||
"StaffChat": "staff-chat",
|
||||
"StaffCmds": "staff-commands",
|
||||
"StaffVoice": "Staff Room",
|
||||
"TicketsVoice1": "Support Lounge",
|
||||
"TicketsVoice2": "Support Lounge",
|
||||
|
||||
"Commands_Log_Title": "SupportBot Logs",
|
||||
"Command_Log_Channel": "command-logs",
|
||||
|
||||
"Announcement_Title": "SupportBot Announcement",
|
||||
"Announcement_Channel": "announcements",
|
||||
"Announcement_Tag_Role": "@everyone",
|
||||
|
||||
"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",
|
||||
|
||||
"LINKS_TITLE": "SupportBot Links",
|
||||
|
||||
"LINKS": {
|
||||
"Discord": "https://discord.gg/",
|
||||
"Twitter": "https://twitter.com/",
|
||||
"Website": "https://example.com/",
|
||||
"AddMore": "AddMoreIfYouWant"
|
||||
},
|
||||
|
||||
"Announcement_Command": "announce",
|
||||
"Say_Command": "say",
|
||||
"Suggest_Command": "suggest",
|
||||
"Ping_Command": "ping",
|
||||
"Ticket_Command": "ticket",
|
||||
"Remove_Command": "remove",
|
||||
"Add_Command": "add",
|
||||
"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",
|
||||
"Setup_Command": "setup"
|
||||
}
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
{}
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -0,0 +1 @@
|
||||
ReactionMessage_ID: ''
|
||||
Executable
+223
@@ -0,0 +1,223 @@
|
||||
# _________ __ __________ __
|
||||
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||
# \/ |__| |__| \/
|
||||
#
|
||||
# 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: "Administration"
|
||||
|
||||
# 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!"
|
||||
ReactionPanel_Description: true
|
||||
ReactionDescription: "Create a support ticket to contact a member of staff."
|
||||
ReactionChannel: "create-ticket"
|
||||
ReactionEmoji: "📩"
|
||||
# Custom Emojis: <:test:EMOJI_ID>
|
||||
ReactionPanel_Thumbnail: true
|
||||
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
|
||||
ReactionPanel_Image: true
|
||||
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
|
||||
|
||||
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?"
|
||||
|
||||
# Moderation System Configuration
|
||||
|
||||
BanTitle: "User Banned!"
|
||||
DaysBannedFor: 7
|
||||
BanLogColour: "#D911B4"
|
||||
|
||||
KickTitle: "User Kicked!"
|
||||
KickLogColour: "#D9B111"
|
||||
|
||||
ModThumbnail: "https://i.imgur.com/l6P3DF6.png"
|
||||
ModLogChannel: "mod-logs"
|
||||
|
||||
PruneLogTitle: "Bulk Delete"
|
||||
PruneThumbnail: "https://i.imgur.com/OAgW2vR.png"
|
||||
PruneColour: "#1BA30C"
|
||||
|
||||
|
||||
# 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"
|
||||
PurgeMessage: "purge"
|
||||
|
||||
# Admin Command Configuration
|
||||
|
||||
AnnounceCommand: "announce"
|
||||
BanUser: "ban"
|
||||
KickUser: "kick"
|
||||
|
||||
# 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"
|
||||
BanDesc: "Ban a member from this server."
|
||||
KickDesc: "Kick a member from this server."
|
||||
PurgeDesc: "Purge messages from the chat."
|
||||
|
||||
# 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!"
|
||||
@@ -1 +0,0 @@
|
||||
node index.js
|
||||
@@ -1 +0,0 @@
|
||||
node index.js
|
||||
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