Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19a12f6c8f | ||
|
|
79a498d1d6 | ||
|
|
12a03c36f3 | ||
|
|
ddc8bcab9b | ||
|
|
35dacfd48a | ||
|
|
611cef34ab | ||
|
|
8a8f9fe890 | ||
|
|
5a65b70c80 | ||
|
|
8bea3faa1f | ||
|
|
4125954d53 | ||
|
|
3d9c5a729e | ||
|
|
51d775ea6d | ||
|
|
e461c47c4b | ||
|
|
bbdb38e45a | ||
|
|
083e047aec | ||
|
|
84e0b504ab | ||
|
|
bedff6832c | ||
|
|
6c29e04de2 | ||
|
|
ba674323e1 | ||
|
|
6d756a161e | ||
|
|
66a5cd95ec | ||
|
|
9f70648264 | ||
|
|
b975b79691 | ||
|
|
3cab896954 | ||
|
|
b9680e5b35 | ||
|
|
43a003ca7d | ||
|
|
fbe1cf2009 | ||
|
|
fdee61cc11 | ||
|
|
8b51200d9c | ||
|
|
0631ab536a | ||
|
|
0d76e76519 | ||
|
|
9e9f83d211 | ||
|
|
0829d477d9 | ||
|
|
1b7109fa23 | ||
|
|
366669ccd8 | ||
|
|
e05edd89fa | ||
|
|
a405df66c9 | ||
|
|
28a57ead9f | ||
|
|
72bfacae75 | ||
|
|
10f8821b3b | ||
|
|
92a3745ce1 | ||
|
|
aff7ff1451 | ||
|
|
9e63e0ff09 | ||
|
|
2c5ebd8620 | ||
|
|
e6d63db3a9 | ||
|
|
2cc316aafb | ||
|
|
4f25cfa0dd | ||
|
|
0385de3882 | ||
|
|
2e1253c54e | ||
|
|
14df15caeb | ||
|
|
af481a2ec8 | ||
|
|
96c1d80844 | ||
|
|
57ea2e25bd | ||
|
|
cd17b0a6d7 | ||
|
|
c5dd8823f6 | ||
|
|
c27f16f753 | ||
|
|
4842610229 | ||
|
|
bd33669dba | ||
|
|
e81684d322 | ||
|
|
8209dfa26c | ||
|
|
0a82c62a4e | ||
|
|
4399dfe6b8 | ||
|
|
defd0cc78c | ||
|
|
fd5fc8294c | ||
|
|
10823b416c | ||
|
|
4490920ac6 | ||
|
|
e0b8ad4a32 | ||
|
|
e11063832b | ||
|
|
d598fdd753 | ||
|
|
157b93239a | ||
|
|
3d7058dccd | ||
|
|
1ec654d1ea | ||
|
|
8ce2d4269d | ||
|
|
49e8aa7869 | ||
|
|
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 |
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/
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
FROM node:alpine
|
||||
|
||||
MAINTAINER Thien Tran, <contact@thientran.io>
|
||||
|
||||
RUN apk update \
|
||||
&& apk upgrade
|
||||
|
||||
RUN apk add --no-cache git && \
|
||||
adduser -D -h /home/container container
|
||||
|
||||
# Ensure UTF-8
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
WORKDIR /home/container
|
||||
|
||||
COPY ./entrypoint.sh /entrypoint.sh
|
||||
CMD ["/bin/ash", "/entrypoint.sh"]
|
||||
@@ -1,11 +1,11 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Emerald Services
|
||||
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, and/or sell
|
||||
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:
|
||||
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
<h1 align="center">SupportBot</h1>
|
||||
<p align="center">Created by Emerald SRV</p>
|
||||
<p align="center"> SupportBot is a free self-hosted discord that is developed/designed to help control and manage the support that takes place throughout your discord server(s). SupportBot has been going around since late-2018 and it's still being constantly, updated and supported today. Alongside the core features of SupportBot which is support related features such as tickets etc.. we also allow additional addons which are made by both 3rd-party and official developers. If something goes wrong with SupportBot you can simply come to our discord server and contact us. We will be happy to help. Also! if anyone ever tells you that "nothing is free" then tell them to think again. Sometimes you just have to look a little harder to find what you want.</p>
|
||||
Version 5.2
|
||||
<hr>
|
||||

|
||||
|
||||
## What is SupportBot?
|
||||
|
||||
SupportBot is an open-sourced support system for discord. It's completely free to use with high amounts of customisation to match your own brand.
|
||||
|
||||
## Quick Links
|
||||
|
||||
**|** [Discord](https://emeraldsrv.dev/discord) **|**
|
||||
[Hosting](https://emeraldsrv.dev/hosting) **|**
|
||||
[Documentation](https://docs.emeraldsrv.dev) **|**
|
||||
[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,62 +0,0 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Add
|
||||
|
||||
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'));
|
||||
|
||||
exports.run = (bot, message, args) => {
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Add_Command}`);
|
||||
|
||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === supportbot.StaffRole);
|
||||
|
||||
const rolemissing = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour);
|
||||
if (!staffGroup) return message.reply({embed: rolemissing});
|
||||
|
||||
const donothaverole = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour);
|
||||
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(supportbot.EmbedColour);
|
||||
if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) 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(supportbot.EmbedColour);
|
||||
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(supportbot.EmbedColour);
|
||||
|
||||
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(supportbot.EmbedColour)
|
||||
.setTitle("User Added")
|
||||
.setDescription(`👍 ${rUser} has been added to this ticket`)
|
||||
.setTimestamp();
|
||||
message.channel.send({embed: useradded});
|
||||
|
||||
};
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Add_Command,
|
||||
};
|
||||
Executable
+64
@@ -0,0 +1,64 @@
|
||||
// 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) message.delete();
|
||||
|
||||
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff) || message.guild.roles.cache.find(SupportTeam => SupportTeam.id === supportbot.Staff)
|
||||
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || message.guild.roles.cache.find(AdminUser => AdminUser.id === 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({ embeds: [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({ embeds: [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({ embeds: [Complete] });
|
||||
} else {
|
||||
|
||||
return message.channel.send({ embeds: [NoPerms] });
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
Regular → Executable
+63
-46
@@ -1,54 +1,71 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Announce (including @everyone)
|
||||
// SupportBot, Created by Emerald Services
|
||||
// Announce
|
||||
|
||||
const Discord = require("discord.js");
|
||||
const bot = new Discord.Client();
|
||||
const fs = require("fs");
|
||||
|
||||
const fs = require("fs")
|
||||
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.AnnounceCommand,
|
||||
description: supportbot.AnnounceDesc,
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Announcement_Command}`);
|
||||
execute(message, args) {
|
||||
|
||||
if (supportbot.DeleteMessages) message.delete();
|
||||
|
||||
let locateChannel = message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.name === supportbot.AnnouncementChannel) || message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.id === supportbot.AnnouncementChannel)
|
||||
|
||||
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({ embeds: [errornochannel] });
|
||||
|
||||
let Admins = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === 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({ embeds: [NoPerms] });
|
||||
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setDescription(`> **${supportbot.AnnouncementStarter}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
message.channel.send({ embeds: [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({ embeds: [AnnouncementComplete] })
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
||||
|
||||
const rolemissing = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
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 **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
||||
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setTitle(`${supportbot.Announcement_Title}`)
|
||||
.setDescription(args.join(" "))
|
||||
.setTimestamp()
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL)
|
||||
|
||||
let ac = message.guild.channels.find(AnnounceChannel => AnnounceChannel.name === `${supportbot.Announcement_Channel}`)
|
||||
if(!ac) return message.channel.send(`:x: Error! Could not find the logs channel **${supportbot.Announcement_Channel}**`)
|
||||
|
||||
ac.send("@everyone").then((msg) => {
|
||||
ac.send(embed);
|
||||
});
|
||||
|
||||
const AccSuccessEmbed = new Discord.RichEmbed()
|
||||
.setTitle("Announcement Created")
|
||||
.setDescription(`👍 Successfully sent your announcement to <#${ac.id}>`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
message.channel.send({embed: AccSuccessEmbed});
|
||||
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Announcement_Command,
|
||||
}
|
||||
};
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
// 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) message.delete();
|
||||
|
||||
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin)
|
||||
|
||||
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({ embeds: [NoPerms] });
|
||||
|
||||
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === 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({ embeds: [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({
|
||||
embeds: [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({
|
||||
embeds: [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({
|
||||
embeds: [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({
|
||||
embeds: [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({ embeds: [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({ embeds: [logEmbed] })
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,100 @@
|
||||
// SupportBot, Created by Emerald Services
|
||||
// Blacklist 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.BlacklistUser,
|
||||
description: supportbot.BlacklistDesc,
|
||||
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages) message.delete();
|
||||
|
||||
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin)
|
||||
|
||||
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({ embeds: [NoPerms] });
|
||||
}
|
||||
|
||||
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === supportbot.ModLogChannel)
|
||||
|
||||
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
|
||||
|
||||
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({ embeds: [errornochannel] });
|
||||
|
||||
const embed1 = new Discord.MessageEmbed()
|
||||
.setDescription("> :x: Please mention or write an ID\n\n`Try Again!`")
|
||||
.setColor(supportbot.ErrorColour)
|
||||
|
||||
if (!args[0]) return message.channel.send({
|
||||
embeds: [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({
|
||||
embeds: [embed2]
|
||||
});
|
||||
|
||||
let role = message.guild.roles.cache.find(role => role.name === supportbot.TicketBlackListRole) || message.guild.roles.cache.find(role => role.id === supportbot.TicketBlackListRole)
|
||||
|
||||
const embed3 = new Discord.MessageEmbed()
|
||||
.setDescription("> :detective: **Hmm!** Can\'t seem to find the blacklist role.\n\n`Did you created it?")
|
||||
.setColor(supportbot.ErrorColour)
|
||||
|
||||
|
||||
if (!role) return message.channel.send({
|
||||
embeds: [embed3]
|
||||
});
|
||||
|
||||
const embed4 = new Discord.MessageEmbed()
|
||||
.setDescription(`${user} is already blacklisted`)
|
||||
.setColor(supportbot.ErrorColour)
|
||||
|
||||
if(user.roles.cache.find(role => role.name === supportbot.TicketBlackListRole) || user.roles.cache.find(role => role.id === supportbot.TicketBlackListRole)) {
|
||||
return message.channel.send({
|
||||
embeds: [embed4]
|
||||
})
|
||||
};
|
||||
|
||||
user.roles.add(role);
|
||||
|
||||
const embed5 = new Discord.MessageEmbed()
|
||||
.setDescription(`Blacklisted ${user} successfully from creating a ticket`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
message.channel.send({
|
||||
embeds: [embed5]
|
||||
});
|
||||
|
||||
const logEmbed = new Discord.MessageEmbed()
|
||||
.setTitle(supportbot.BlacklistTitle)
|
||||
.setThumbnail(supportbot.ModThumbnail)
|
||||
.addField('Banned User:', user)
|
||||
.addField('Staff Member', message.author)
|
||||
.setFooter(supportbot.EmbedFooter)
|
||||
.setColor(supportbot.BlacklistColour)
|
||||
.setTimestamp()
|
||||
|
||||
locateChannel.send({ embeds: [logEmbed] });
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
// 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) message.delete();
|
||||
|
||||
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Staff)
|
||||
|
||||
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({ embeds: [NoPerms] });
|
||||
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setDescription(`> **What would you like me to say!**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
message.channel.send({ embeds: [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({ embeds: [AnnouncementEmbed] })
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
Regular → Executable
+129
-82
@@ -1,116 +1,163 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Close
|
||||
// SupportBot, Created by Emerald Services
|
||||
// Close Command
|
||||
|
||||
const Discord = require("discord.js");
|
||||
const bot = new Discord.Client();
|
||||
|
||||
const fs = require("fs");
|
||||
const yaml = require('js-yaml');
|
||||
|
||||
const yaml = require('js-yaml');
|
||||
const { execute } = require("./help");
|
||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||
|
||||
/**
|
||||
* @param {Discord.Message} message
|
||||
*/
|
||||
module.exports = {
|
||||
name: supportbot.CloseTicket,
|
||||
description: supportbot.CloseTicketDesc,
|
||||
|
||||
exports.run = (bot, message, args) => {
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages) message.delete();
|
||||
|
||||
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 });
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Close_Command}`);
|
||||
return;
|
||||
|
||||
if ( !message.channel.name.startsWith( `${supportbot.Ticket_Channel_Name}-` ) ) {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
|
||||
.setColor(supportbot.EmbedColour);
|
||||
}
|
||||
|
||||
message.channel.send(embed);
|
||||
return;
|
||||
}
|
||||
if (supportbot.CloseConfirmation) {
|
||||
const CloseTicketRequest = new Discord.MessageEmbed()
|
||||
.setTitle(`**${supportbot.ClosingTicket}**`)
|
||||
.setDescription(`Please confirm by repeating the following word.. \`${supportbot.ClosingConfirmation_Word}\` `)
|
||||
.setColor(supportbot.EmbedColour);
|
||||
|
||||
const closeRequestEmbed = new Discord.RichEmbed()
|
||||
.setDescription(`**${supportbot.Ticket_Closure}**`)
|
||||
.addField("Please confirm by repeating the following word..", `||**${supportbot.Closure_Confirm_Word}**||`)
|
||||
.setFooter("Your request will be avoided in 20 seconds")
|
||||
.setColor(supportbot.EmbedColour)
|
||||
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.cache.find(channel => channel.name === supportbot.TranscriptLog) || message.guild.channels.cache.find(channel => channel.id === supportbot.TranscriptLog)
|
||||
let user = message.author;
|
||||
let reason = args.join(" ") || "No Reason Provided.";
|
||||
|
||||
message.channel.send(closeRequestEmbed).then( m => {
|
||||
message.channel.awaitMessages( response => response.content.toLowerCase() === supportbot.Closure_Confirm_Word, {
|
||||
max: 1,
|
||||
time: 20000,
|
||||
errors: [ 'time' ],
|
||||
let name = message.channel.name;
|
||||
let ticketChannel = message.channel;
|
||||
|
||||
} ).then( collected => {
|
||||
let logChannel = message.guild.channels.find(channel => channel.name === supportbot.Transcript_Log);
|
||||
message.channel.send(`**${supportbot.ClosingTicket}**`)
|
||||
|
||||
let user = message.author;
|
||||
.then(() => {
|
||||
const logEmbed = new Discord.MessageEmbed()
|
||||
.setTitle(supportbot.TranscriptTitle)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(supportbot.EmbedFooter)
|
||||
.addField("Closed By", message.author.tag)
|
||||
.addField("Reason", reason);
|
||||
|
||||
let reason = args.join(" ") || "No reason provided.";
|
||||
|
||||
let name = message.channel.name;
|
||||
let ticketChannel = message.channel;
|
||||
|
||||
message.channel.send(`**${supportbot.Ticket_Closing}**`)
|
||||
.then(() => {
|
||||
const logEmbed = new Discord.RichEmbed()
|
||||
.setTitle(supportbot.Transcript_Title)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(supportbot.EmbedFooter)
|
||||
.addField("Ticket Author", user)
|
||||
.addField("Closed By", message.author.tag)
|
||||
.addField("Reason", reason);
|
||||
|
||||
message.channel.fetchMessages({ limit: 100 })
|
||||
.then( msgs => {
|
||||
let txt = '';
|
||||
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
|
||||
let html = '';
|
||||
|
||||
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`;
|
||||
html += `<strong>Server Name:</strong> ${message.guild.name}<br>`;
|
||||
html += `<strong>Ticket:</strong> ${ticketChannel.name}<br>`;
|
||||
html += `<strong>Message:</strong> ${msgs.size} Messages<br><br><br>`;
|
||||
|
||||
msgs.forEach( msg => {
|
||||
if ( msg.content ) {
|
||||
txt += `----- ${msg.author.tag} at ${msg.createdAt}\n`;
|
||||
txt += `${msg.content}\n`;
|
||||
txt += `-----\n\n`;
|
||||
html += `<strong>User:</strong> ${msg.author.tag}<br>`;
|
||||
html += `<strong>Message:</strong> ${msg.content}<br>`;
|
||||
html += `-----<br><br>`;
|
||||
}
|
||||
} );
|
||||
});
|
||||
|
||||
// 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 => {
|
||||
logChannel.send({embeds: [logEmbed]}).catch(err => {
|
||||
message.reply(err)
|
||||
})
|
||||
logChannel.send( new Discord.Attachment( Buffer.from( txt ), `${name}.txt` ) );
|
||||
|
||||
message.channel.delete();
|
||||
|
||||
// message.channel.fetchMessages( { limit: 100, before: msgs.last().id } )
|
||||
let file = new Discord.MessageAttachment( Buffer.from( html ), `${name}.html` )
|
||||
logChannel.send({embeds: [logEmbed], files: [file]}).catch(err => {
|
||||
message.reply(err)
|
||||
})
|
||||
|
||||
// .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;
|
||||
// }, '' );
|
||||
message.channel.delete().catch(error => {
|
||||
if (error.code !== Discord.Constants.APIErrors.UNKNOWN_CHANNEL) {
|
||||
console.error('Failed to delete the message:', error);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
// 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( () => {
|
||||
interaction.m.edit({content: 'The request to close the ticket has timed out.'}).then(m2 => setTimeout(() => channel.delete(3000)) );
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (!supportbot.CloseConfirmation) {
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Close_Command,
|
||||
}
|
||||
let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog) || message.guild.channels.cache.find(channel => channel.id === supportbot.TranscriptLog)
|
||||
let user = message.author;
|
||||
let reason = args.join(" ") || "No Reason Provided.";
|
||||
|
||||
let name = message.channel.name;
|
||||
let ticketChannel = message.channel;
|
||||
|
||||
message.channel.send(`**${supportbot.ClosingTicket}**`)
|
||||
|
||||
.then(() => {
|
||||
const logEmbed = new Discord.MessageEmbed()
|
||||
.setTitle(supportbot.TranscriptTitle)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(supportbot.EmbedFooter)
|
||||
.addField("Closed By", message.author.tag)
|
||||
.addField("Reason", reason);
|
||||
|
||||
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
|
||||
let html = '';
|
||||
|
||||
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
|
||||
html += `<strong>Server Name:</strong> ${message.guild.name}<br>`;
|
||||
html += `<strong>Ticket:</strong> ${ticketChannel.name}<br>`;
|
||||
html += `<strong>Message:</strong> ${msgs.size} Messages<br><br><br>`;
|
||||
|
||||
msgs.forEach( msg => {
|
||||
if ( msg.content ) {
|
||||
html += `<strong>User:</strong> ${msg.author.tag}<br>`;
|
||||
html += `<strong>Message:</strong> ${msg.content}<br>`;
|
||||
html += `-----<br><br>`;
|
||||
}
|
||||
});
|
||||
|
||||
logChannel.send({embeds: [logEmbed]}).catch(err => {
|
||||
message.reply(err)
|
||||
})
|
||||
|
||||
let file = new Discord.MessageAttachment( Buffer.from( html ), `${name}.html` )
|
||||
logChannel.send({embeds: [logEmbed], files: [file]}).catch(err => {
|
||||
message.reply(err)
|
||||
})
|
||||
|
||||
message.channel.delete().catch(error => {
|
||||
if (error.code !== Discord.Constants.APIErrors.UNKNOWN_CHANNEL) {
|
||||
console.error('Failed to delete the message:', error);
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
}).catch( () => {
|
||||
interaction.m.edit({content: 'The request to close the ticket has timed out.'}).then(m2 => setTimeout(() => channel.delete(3000)) );
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
@@ -1,73 +0,0 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Forceclose
|
||||
|
||||
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'));
|
||||
|
||||
exports.run = async (bot, message, args) => {
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Forceclose_Command}`);
|
||||
|
||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
||||
|
||||
const rolemissing = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
if (!staffGroup) return message.reply({embed: rolemissing});
|
||||
|
||||
const donothaverole = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
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(supportbot.EmbedColour)
|
||||
if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket});
|
||||
|
||||
const log = message.guild.channels.find(channel => channel.name === supportbot.Transcript_Log)
|
||||
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(supportbot.Transcript_Title)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(supportbot.EmbedFooter)
|
||||
.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);
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Forceclose_Command,
|
||||
}
|
||||
+72
-38
@@ -1,51 +1,85 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Help
|
||||
// SupportBot, Created by Emerald Services
|
||||
// Help Command
|
||||
|
||||
const Discord = require("discord.js");
|
||||
const bot = new Discord.Client()
|
||||
const fs = require("fs");
|
||||
|
||||
const fs = require("fs")
|
||||
const yaml = require('js-yaml');
|
||||
|
||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||
|
||||
exports.run = (bot, message, args) => {
|
||||
module.exports = {
|
||||
name: supportbot.HelpCommand,
|
||||
description: supportbot.HelpDesc,
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Help_Command}`);
|
||||
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages) message.delete();
|
||||
|
||||
let userCommands = "";
|
||||
userCommands += `**${supportbot.Prefix}${supportbot.Ticket_Command} <reason>**: Create a support ticket\n`;
|
||||
userCommands += `**${supportbot.Prefix}${supportbot.Close_Command}**: Close your support ticket\n`;
|
||||
userCommands += `**${supportbot.Prefix}${supportbot.Suggest_Command} <suggestion>**: Create a server suggestion\n`;
|
||||
userCommands += `**${supportbot.Prefix}${supportbot.Report_Command} <user> <reason>**: Report a valid user\n`;
|
||||
userCommands += `**${supportbot.Prefix}${supportbot.Link_Command}**: Get some important links!\n`;
|
||||
userCommands += `**${supportbot.Prefix}${supportbot.Ping_Command}**: Check the bots ping. Pong!\n`;
|
||||
|
||||
let supportCommands = "";
|
||||
supportCommands += `**${supportbot.Prefix}${supportbot.Add_Command} <user>**: Adds a user to a ticket\n`;
|
||||
supportCommands += `**${supportbot.Prefix}${supportbot.Remove_Command} <user>**: Removes a user from a ticket\n`;
|
||||
supportCommands += `**${supportbot.Prefix}${supportbot.Forceclose_Command}**: Forceclose a support ticket\n`;
|
||||
supportCommands += `**${supportbot.Prefix}${supportbot.Rename_Command}**: Rename a support ticket\n`;
|
||||
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff) || message.guild.roles.cache.find(staffRole => staffRole.id === supportbot.Staff);
|
||||
let AdminStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin);
|
||||
|
||||
if (supportbot.HelpMenu) {
|
||||
let generalCommands = "";
|
||||
generalCommands += `**${supportbot.Prefix}${supportbot.HelpCommand}** ${supportbot.HelpDesc}\n`;
|
||||
generalCommands += `**${supportbot.Prefix}${supportbot.LinksCommand}** ${supportbot.LinksDesc}\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.ChatLog}** ${supportbot.ChatLogDesc}\n`
|
||||
|
||||
let adminCommands = "";
|
||||
adminCommands += `**${supportbot.Prefix}${supportbot.AnnounceCommand}** ${supportbot.AnnounceDesc} \`Admin Only\`\n`
|
||||
adminCommands += `**${supportbot.Prefix}${supportbot.BanUser}** ${supportbot.BanDesc} \`Admin Only\` \n`
|
||||
adminCommands += `**${supportbot.Prefix}${supportbot.KickUser}** ${supportbot.KickDesc} \`Admin Only\` \n`
|
||||
adminCommands += `**${supportbot.Prefix}${supportbot.BlacklistUser}** ${supportbot.BlacklistDesc} \`Admin Only\` \n`
|
||||
|
||||
const HelpEmbed1 = new Discord.MessageEmbed()
|
||||
.setTitle(supportbot.Bot_Name)
|
||||
.setThumbnail(message.author.displayAvatarURL())
|
||||
|
||||
let staffCommands = "";
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.Announcement_Command} <message>**: Create a bot announcement\n`;
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.Say_Command} <message>**: Send a message as the bot\n`;
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.Lockchat_Command}**: Lock the chat channel\n`;
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.UnLockchat_Command}**: UnLock the chat channel\n`;
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.Poll_Command}**: Create a poll\n`;
|
||||
.addFields(
|
||||
{ name: '🖥️ General Commands\n', value: `${generalCommands}\n`, inline: false },
|
||||
{ name: '🎫 Support Commands\n', value: `${supportCommands}\n`, inline: false },
|
||||
)
|
||||
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setTitle(supportbot.Bot_Name)
|
||||
.addField("👨 User Commands", userCommands)
|
||||
.addField(":pushpin: Support Commands", supportCommands)
|
||||
.addField("🔑 Staff Commands", staffCommands)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL);
|
||||
message.channel.send(embed);
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL());
|
||||
|
||||
}
|
||||
if (message.member.roles.cache.has(SupportStaff.id)) {
|
||||
HelpEmbed1.addFields(
|
||||
{ name: '🔐 Staff Commands\n', value: `${staffCommands}\n`, inline: false },
|
||||
)
|
||||
}
|
||||
|
||||
if (message.member.roles.cache.has(AdminStaff.id)) {
|
||||
HelpEmbed1.addFields(
|
||||
{ name: '🔐 Admin Commands\n', value: `${adminCommands}\n`, inline: false },
|
||||
)
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Help_Command,
|
||||
if (supportbot.SendHelpPage === "dm") {
|
||||
message.author.send({
|
||||
embeds: [HelpEmbed1]
|
||||
});
|
||||
}
|
||||
|
||||
if (supportbot.SendHelpPage === "channel") {
|
||||
message.channel.send({
|
||||
embeds: [HelpEmbed1]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,109 @@
|
||||
// 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) message.delete();
|
||||
|
||||
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin)
|
||||
|
||||
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({ embeds: [NoPerms] });
|
||||
|
||||
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === 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({ embeds: [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({
|
||||
embeds: [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({
|
||||
embeds: [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({
|
||||
embeds: [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({
|
||||
embeds: [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({ embeds: [embed5] })
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
|
||||
const successEmbed = new Discord.MessageEmbed()
|
||||
.setDescription(`> :white_check_mark: **OOF!** ${user} has been kicked!`)
|
||||
.setColor(supportbot.SuccessColour)
|
||||
|
||||
message.channel.send({
|
||||
embeds: [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({ embeds: [logEmbed] })
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
Regular → Executable
+22
-24
@@ -1,36 +1,34 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Links
|
||||
// SupportBot, Created by Emerald Services
|
||||
// Links Command
|
||||
|
||||
const Discord = require("discord.js");
|
||||
const bot = new Discord.Client();
|
||||
|
||||
const fs = require("fs");
|
||||
const yaml = require('js-yaml');
|
||||
|
||||
const yaml = require('js-yaml');
|
||||
const { execute } = require("./help");
|
||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||
|
||||
exports.run = ( bot, message, args ) => {
|
||||
module.exports = {
|
||||
name: supportbot.LinksCommand,
|
||||
description: supportbot.LinksDesc,
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Link_Command}`);
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages) message.delete();
|
||||
|
||||
const LinksEmbed = new Discord.MessageEmbed()
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
let botLinks = supportbot.LINKS;
|
||||
let botLinks = supportbot.LINKS;
|
||||
|
||||
let links = '';
|
||||
|
||||
for ( let name in botLinks ) {
|
||||
links += `[${name}](${botLinks[ name ]})\n`;
|
||||
};
|
||||
|
||||
let links = '';
|
||||
LinksEmbed.addField(supportbot.LinksTitle, links)
|
||||
|
||||
for ( let name in botLinks ) {
|
||||
links += `[${name}](${botLinks[ name ]})\n`;
|
||||
};
|
||||
|
||||
let embed = new Discord.RichEmbed()
|
||||
.setTitle(supportbot.LINKS_TITLE)
|
||||
.setDescription(links)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(supportbot.EmbedFooter);
|
||||
message.channel.send(embed);
|
||||
message.channel.send({ embeds: [LinksEmbed] });
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Link_Command,
|
||||
};
|
||||
@@ -1,42 +0,0 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Close
|
||||
|
||||
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'));
|
||||
|
||||
exports.run = async(bot, message, args) => {
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Lockchat_Command}`);
|
||||
|
||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
||||
let lockedRole = message.guild.roles.find(lc => lc.name === `${supportbot.locked_role}`)
|
||||
|
||||
const rolemissing = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
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 **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
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(supportbot.EmbedColour)
|
||||
message.channel.send(lockmsg);
|
||||
|
||||
};
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Lockchat_Command,
|
||||
};
|
||||
Regular → Executable
+16
-17
@@ -1,26 +1,25 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Ping
|
||||
// SupportBot, Created by Emerald Services
|
||||
// Ping Command
|
||||
|
||||
const Discord = require("discord.js");
|
||||
const bot = new Discord.Client();
|
||||
|
||||
const fs = require("fs");
|
||||
const yaml = require('js-yaml');
|
||||
|
||||
const yaml = require('js-yaml');
|
||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||
|
||||
exports.run = (bot, message, args) => {
|
||||
module.exports = {
|
||||
name: supportbot.PingCommand,
|
||||
description: supportbot.PingDesc,
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Ping_Command}`);
|
||||
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setDescription(`:ping_pong: **Pong!** \`${bot.ping}ms\` `)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
message.channel.send(embed).catch(console.error);
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages) message.delete();
|
||||
|
||||
let ping = Date.now() - message.createdTimestamp + " ms";
|
||||
|
||||
const PingCommandEmbed = new Discord.MessageEmbed()
|
||||
.setDescription(`🏓 **Pong!** \`${Date.now() - message.createdTimestamp}ms\``)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
message.channel.send({ embeds: [PingCommandEmbed] });
|
||||
}
|
||||
};
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Ping_Command,
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Poll
|
||||
|
||||
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'));
|
||||
|
||||
exports.run = (bot, message, args) => {
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Poll_Command}`);
|
||||
|
||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
||||
|
||||
const rolemissing = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
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 **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
||||
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setTitle(`${supportbot.Poll_Title}`)
|
||||
.setDescription(args.join(" "))
|
||||
.setTimestamp()
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL)
|
||||
|
||||
let ac = message.guild.channels.find(AnnounceChannel => AnnounceChannel.name === `${supportbot.Poll_Channel}`)
|
||||
if(!ac) return message.channel.send(`:x: Error! Could not find the logs channel **${supportbot.Poll_Channel}**`)
|
||||
|
||||
ac.send(embed)
|
||||
|
||||
.then(async function(msg) {
|
||||
msg.react(supportbot.Reaction_Poll_1).then(() => msg.react(supportbot.Reaction_Poll_2));
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Poll_Command,
|
||||
};
|
||||
@@ -0,0 +1,80 @@
|
||||
// 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) message.delete();
|
||||
|
||||
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Staff)
|
||||
|
||||
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({ embeds: [NoPerms] });
|
||||
|
||||
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === 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({ embeds: [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({
|
||||
embeds: [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({
|
||||
embeds: [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({
|
||||
embeds: [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({ embeds: [logEmbed] })
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
@@ -1,63 +0,0 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Remove
|
||||
|
||||
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'));
|
||||
|
||||
exports.run = async (bot, message, args) => {
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Remove_Command}`);
|
||||
|
||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === supportbot.StaffRole)
|
||||
|
||||
const rolemissing = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
if (!staffGroup) return message.reply({embed: rolemissing});
|
||||
|
||||
const donothaverole = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
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(supportbot.EmbedColour)
|
||||
if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) 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(supportbot.EmbedColour)
|
||||
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(supportbot.EmbedColour)
|
||||
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(supportbot.EmbedColour)
|
||||
.setTitle("User Removed")
|
||||
.setDescription(`👍 ${rUser} has been removed from this ticket`)
|
||||
.setTimestamp();
|
||||
|
||||
message.channel.send({embed: useradded});
|
||||
|
||||
};
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Remove_Command,
|
||||
}
|
||||
Executable
+62
@@ -0,0 +1,62 @@
|
||||
// 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) message.delete();
|
||||
|
||||
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff) || message.guild.roles.cache.find(SupportTeam => SupportTeam.id === supportbot.Staff)
|
||||
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || message.guild.roles.cache.find(AdminUser => AdminUser.id === 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({ embeds: [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({ embeds: [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({ embeds: [Complete] });
|
||||
} else {
|
||||
return message.channel.send({ embeds: [NoPerms] });
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
@@ -1,52 +0,0 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Rename
|
||||
|
||||
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'));
|
||||
|
||||
exports.run = async (bot, message, args) => {
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Rename_Command}`);
|
||||
|
||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === supportbot.StaffRole)
|
||||
|
||||
const rolemissing = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.colour)
|
||||
if (!staffGroup) return message.reply({embed: rolemissing});
|
||||
|
||||
const donothaverole = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.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(supportbot.colour)
|
||||
if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket});
|
||||
const renameto = args.join(" ")
|
||||
message.channel.setName(`${supportbot.Ticket_Channel_Name}-${renameto}`)
|
||||
|
||||
// Renamed Ticket Logistic
|
||||
const logEmbed = new Discord.RichEmbed()
|
||||
.setTitle(":ticket: Ticket Renamed")
|
||||
.setDescription(`<@${message.author.id}> has renamed a ticket to ${supportbot.Ticket_Channel_Name}-${renameto}`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(supportbot.EmbedFooter)
|
||||
|
||||
let logChannel = message.guild.channels.find(TicketChannel => TicketChannel.name === `${supportbot.Ticket_Logs}`);
|
||||
if(!logChannel) return message.channel.send(`:x: Error! Could not find the logs channel **${supportbot.Ticket_Logs}**`);
|
||||
|
||||
logChannel.send({embed: logEmbed});
|
||||
|
||||
};
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Rename_Command,
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Report
|
||||
|
||||
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'));
|
||||
|
||||
exports.run = (bot, message, args) => {
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Report_Command}`);
|
||||
|
||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`);
|
||||
|
||||
const rolemissing = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour);
|
||||
|
||||
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 **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
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(`${supportbot.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(supportbot.EmbedColour)
|
||||
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL);
|
||||
let rc = message.guild.channels.find(ReportChannel => ReportChannel.name === `${supportbot.Report_Channel}`)
|
||||
if(!rc) {
|
||||
message.channel.send(`:x: Error! Could not find the logs channel **${supportbot.Report_Channel}**`);
|
||||
} else {
|
||||
rc.send(embed);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Report_Command
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Say
|
||||
|
||||
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'));
|
||||
|
||||
exports.run = (bot, message, args) => {
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Say_Command}`);
|
||||
|
||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
||||
|
||||
const rolemissing = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
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 **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
||||
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setTitle(`${supportbot.Announcement_Title}`)
|
||||
.setDescription(args.join(" "))
|
||||
.setTimestamp()
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL)
|
||||
|
||||
message.channel.send(embed);
|
||||
|
||||
};
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Say_Command,
|
||||
}
|
||||
Regular → Executable
+62
-34
@@ -1,42 +1,70 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Say
|
||||
// SupportBot, Created by Emerald Services
|
||||
// Suggest Command
|
||||
|
||||
const Discord = require("discord.js");
|
||||
const bot = new Discord.Client();
|
||||
|
||||
const fs = require("fs");
|
||||
const yaml = require('js-yaml');
|
||||
|
||||
const yaml = require('js-yaml');
|
||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||
|
||||
exports.run = async(bot, message, args) => {
|
||||
module.exports = {
|
||||
name: supportbot.SuggestCommand,
|
||||
description: supportbot.SuggestionDesc,
|
||||
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages) message.delete();
|
||||
|
||||
let locateChannel = message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.name === supportbot.SuggestionChannel) || message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.id === supportbot.SuggestionChannel)
|
||||
|
||||
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({ embeds: [errornochannel] });
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setDescription(`> **${supportbot.SuggestionStarter}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
message.channel.send({ embeds: [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)
|
||||
|
||||
.addField(supportbot.SuggestionTitle, suggestion, true)
|
||||
.addField("From", `<@${message.author.id}>`, true)
|
||||
|
||||
if (supportbot.SuggestionMessage_Icon === "BOT") {
|
||||
SuggestionMessage.setThumbnail(bot.user.displayAvatarURL())
|
||||
}
|
||||
|
||||
if (supportbot.SuggestionMessage_Icon === "USER") {
|
||||
SuggestionMessage.setThumbnail(message.author.displayAvatarURL())
|
||||
}
|
||||
|
||||
if (supportbot.SuggestionMessage_Icon === "CUSTOM") {
|
||||
SuggestionMessage.setThumbnail(supportbot.SuggestionIcon_URL)
|
||||
}
|
||||
|
||||
locateChannel.send({ embeds: [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({ embeds: [SuggestionComplete] })
|
||||
|
||||
});
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Suggest_Command}`);
|
||||
|
||||
const SuggestionEmbed = new Discord.RichEmbed()
|
||||
.setTitle(`${supportbot.Suggestion_Title}`)
|
||||
.setDescription(`\`\`\`${args.join(" ")}\`\`\`\nFrom <@${message.author.id}>`)
|
||||
.setFooter(`${supportbot.EmbedFooter}`, message.author.avatarURL)
|
||||
.setTimestamp(new Date())
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
let sc = message.guild.channels.find(SuggestionChannel => SuggestionChannel.name === `${supportbot.Suggestion_Channel}`);
|
||||
if(!sc) return message.channel.send(`:x: Error! Could not find the suggestion channel **${supportbot.Suggestion_Channel}**`);
|
||||
|
||||
sc.send(SuggestionEmbed)
|
||||
|
||||
.then(async function(msg) {
|
||||
msg.react(supportbot.suggestyes).then(() => msg.react(supportbot.suggestno));
|
||||
});
|
||||
|
||||
const SuggestionSuccessEmbed = new Discord.RichEmbed()
|
||||
.setDescription(`👍 Suggestion has been successfully created\nYou can view your suggestion in <#${sc.id}>`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
message.channel.send(SuggestionSuccessEmbed);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Suggest_Command,
|
||||
}
|
||||
+242
-150
@@ -1,150 +1,242 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Say
|
||||
|
||||
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('../utility/TicketNumber');
|
||||
|
||||
exports.run = async (bot, message, args) => {
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Ticket_Command}`);
|
||||
|
||||
// Ticket Number ID Settings
|
||||
let ticketNumberID = TicketNumberID.pad(message.guild.id);
|
||||
|
||||
// Ticket Subject Settings
|
||||
const subject = args.join(" ") || `${supportbot.Default_Ticket_Reason}`;
|
||||
|
||||
// Ticket Limitiations
|
||||
const alreadyopen = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Cannot create a ticket because **${supportbot.Ticket_Channel_Name}-${ticketNumberID}** already exists.`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
// Ticket Creation
|
||||
if (message.guild.channels.find(TicketChannel => TicketChannel.name === `${supportbot.Ticket_Channel_Name}-` + message.author.username)) return message.channel.send(alreadyopen);
|
||||
message.guild.createChannel(`${supportbot.Ticket_Channel_Name}-${ticketNumberID}`, {
|
||||
type: 'text',
|
||||
}).then(TicketChannel => {
|
||||
|
||||
// Roles
|
||||
let staff = message.guild.roles.find(supportRole => supportRole.name === `${supportbot.StaffRole}`)
|
||||
let everyone = message.guild.roles.find(everyoneRole => everyoneRole.name === "@everyone")
|
||||
let department = message.guild.roles.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_1}`)
|
||||
let department2 = message.guild.roles.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_2}`)
|
||||
let department3 = message.guild.roles.find(DepartmentRole => DepartmentRole.name === `${supportbot.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: false, READ_MESSAGES: true })
|
||||
TicketChannel.overwritePermissions(bot.user, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
||||
|
||||
// Category
|
||||
let category = message.guild.channels.find(c => c.name === supportbot.category);
|
||||
if (category) {
|
||||
TicketChannel.setParent(category.id);
|
||||
} else {
|
||||
if (message.guild.channels.get(supportbot.category)) {
|
||||
TicketChannel.setParent(message.guild.channels.get(supportbot.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(supportbot.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${supportbot.Ticket_Message}`;
|
||||
|
||||
const Department_1 = supportbot.Ticket_Department_1;
|
||||
const Department_2 = supportbot.Ticket_Department_2;
|
||||
const Department_3 = supportbot.Ticket_Department_3;
|
||||
|
||||
const Emoji_1 = supportbot.Ticket_Department_Emoji_1;
|
||||
const Emoji_2 = supportbot.Ticket_Department_Emoji_2;
|
||||
const Emoji_3 = supportbot.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(supportbot.Ticket_Colour)
|
||||
.setFooter(supportbot.EmbedFooter)
|
||||
|
||||
if (subject != 'No Subject.') {
|
||||
TicketMessage.addField("Reason", 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 someone 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 someone 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 someone to reach out to you.")
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// Ticket Logging
|
||||
const logEmbed = new Discord.RichEmbed()
|
||||
.setTitle(":ticket: Logistics of your Ticket")
|
||||
.addField("Ticket ID", ticketNumberID, true)
|
||||
.addField("User", `<@${message.author.id}>`, true)
|
||||
.addField("Channel", `ticket#${ticketNumberID}`, true)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(supportbot.EmbedFooter)
|
||||
|
||||
if (subject != 'No Subject.') {
|
||||
logEmbed.addField('Subject', subject, true);
|
||||
}
|
||||
|
||||
let logChannel = message.guild.channels.find(TicketChannel => TicketChannel.name === `${supportbot.Ticket_Logs}`);
|
||||
if(!logChannel) return message.channel.send(`:x: Error! Could not find the logs channel **${supportbot.Ticket_Logs}**`);
|
||||
|
||||
logChannel.send({embed: logEmbed})
|
||||
|
||||
}).catch(err=>{console.error(err)});
|
||||
|
||||
};
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Ticket_Command,
|
||||
};
|
||||
// SupportBot, Created by Emerald Services
|
||||
// Ticket Command
|
||||
|
||||
const Discord = require("discord.js");
|
||||
const { MessageButton, MessageActionRow, Permissions } = require("discord.js");
|
||||
|
||||
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');
|
||||
|
||||
async function asyncForEach(array, callback) {
|
||||
for (let index = 0; index < array.length; index++) {
|
||||
await callback(array[index], index, array);
|
||||
}
|
||||
}
|
||||
module.exports = {
|
||||
name: supportbot.NewTicket,
|
||||
description: supportbot.NewTicketDesc,
|
||||
|
||||
async execute(message, args) {
|
||||
if (message.channel.name !== supportbot.ReactionChannel) {
|
||||
if (supportbot.DeleteMessages) message.delete();
|
||||
}
|
||||
|
||||
let reactionUser = message.guild.members.cache.get(message.author.id)
|
||||
|
||||
if (reactionUser.roles.cache.find(role => role.name === supportbot.TicketBlackListRole) || reactionUser.roles.cache.find(role => role.id === supportbot.TicketBlackListRole)) {
|
||||
return message.channel.send({content:`<@${message.author.id}> ${supportbot.TicketBlackListMessage}`}).then(msg => {
|
||||
setTimeout(() => msg.delete(), 3500)
|
||||
})
|
||||
}
|
||||
|
||||
// Ticket ID
|
||||
let ticketNumberID = TicketNumberID.pad(message.guild.id);
|
||||
|
||||
// Ticket Subject
|
||||
const TicketSubject = args || supportbot.NoTicketSubject;
|
||||
|
||||
const TicketExists = new Discord.MessageEmbed()
|
||||
.setTitle("Ticket Exists!")
|
||||
.setDescription(`${supportbot.TicketExists}`)
|
||||
.setColor(supportbot.WarningColour)
|
||||
|
||||
if (message.guild.channels.cache.find(ticketChannel => ticketChannel.name === `${supportbot.TicketChannel}-${ticketNumberID}`)) {
|
||||
return message.channel.send({ embeds: [TicketExists] });
|
||||
}
|
||||
const Staff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff) || message.guild.roles.cache.find(SupportTeam => SupportTeam.id === supportbot.Staff)
|
||||
const Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || message.guild.roles.cache.find(AdminUser => AdminUser.id === supportbot.Admin)
|
||||
const DeptRole1 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_1}`) || message.guild.roles.cache.find(DepartmentRole => DepartmentRole.id === `${supportbot.DepartmentRole_1}`)
|
||||
const DeptRole2 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_2}`) || message.guild.roles.cache.find(DepartmentRole => DepartmentRole.id === `${supportbot.DepartmentRole_2}`)
|
||||
const DeptRole3 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_3}`) || message.guild.roles.cache.find(DepartmentRole => DepartmentRole.id === `${supportbot.DepartmentRole_3}`)
|
||||
const Author = message.author
|
||||
const Everyone = message.guild.id
|
||||
const ticketChannel = await message.guild.channels.create(`${supportbot.TicketChannel}-${ticketNumberID}`, {
|
||||
type: "GUILD_TEXT",
|
||||
})
|
||||
|
||||
if (message.channel.name === supportbot.ReactionChannel || message.channel.id === supportbot.ReactionChannel) {
|
||||
const CreatedTicket = new Discord.MessageEmbed()
|
||||
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.id).replace(/%ticketusername%/g, message.author.username))
|
||||
.setColor(supportbot.EmbedColour)
|
||||
message.channel.send({embeds: [CreatedTicket]}).then(msg => {
|
||||
setTimeout(() => msg.delete(), 5000)
|
||||
})
|
||||
} else {
|
||||
const CreatedTicket = new Discord.MessageEmbed()
|
||||
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.id).replace(/%ticketusername%/g, message.author.username))
|
||||
.setColor(supportbot.EmbedColour)
|
||||
message.channel.send({embeds: [CreatedTicket]}).then(msg => setTimeout(() => msg.delete(), 5000));
|
||||
}
|
||||
let AllowArr = [Staff, Staff, Admins, Author]
|
||||
await asyncForEach(AllowArr, (index) => {
|
||||
ticketChannel.permissionOverwrites.create(index, {VIEW_CHANNEL: true})
|
||||
})
|
||||
|
||||
let DenyArr = [Everyone]
|
||||
await asyncForEach(DenyArr, (index) => {
|
||||
ticketChannel.permissionOverwrites.create(index, {VIEW_CHANNEL: false})
|
||||
})
|
||||
|
||||
let TicketCategory = message.guild.channels.cache.find(category => category.name === supportbot.TicketCategory) || message.guild.channels.cache.find(category => category.id === supportbot.TicketCategory)
|
||||
if(TicketCategory) {
|
||||
ticketChannel.setParent(TicketCategory.id)
|
||||
}
|
||||
|
||||
if (supportbot.AllowTicketMentions) {
|
||||
ticketChannel.send({content:`${message.author}`})
|
||||
}
|
||||
|
||||
const TicketMessage = new Discord.MessageEmbed()
|
||||
.setTitle(supportbot.Ticket_Title.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.id).replace(/%ticketusername%/g, message.author.username))
|
||||
.setDescription(supportbot.TicketMessage.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.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.') {
|
||||
ticketChannel.setTopic(`Reason: ${TicketSubject} - User ID: ${message.author.id} - Ticket: ${ticketChannel.name}`)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (supportbot.TicketDepartments) {
|
||||
TicketMessage.addFields({ name: 'Departments', value: ` **${supportbot.DepartmentTitle_1}**\n **${supportbot.DepartmentTitle_2}**\n **${supportbot.DepartmentTitle_3}**` })
|
||||
}
|
||||
const CloseButton = new MessageButton()
|
||||
.setCustomId('ticketclose')
|
||||
.setLabel('Close')
|
||||
.setStyle(supportbot.TicketCloseColour)
|
||||
.setEmoji(supportbot.TicketCloseEmoji)
|
||||
|
||||
const LockButton = new MessageButton()
|
||||
.setCustomId('ticketlock')
|
||||
.setLabel('Lock')
|
||||
.setStyle(supportbot.TicketLockColour)
|
||||
.setEmoji(supportbot.TicketLockEmoji)
|
||||
|
||||
const row2 = new MessageActionRow()
|
||||
.addComponents(CloseButton, LockButton)
|
||||
|
||||
if(supportbot.TicketDepartments) {
|
||||
|
||||
let DenyArr = [DeptRole1, DeptRole2, DeptRole3]
|
||||
await asyncForEach(DenyArr, (index) => {
|
||||
ticketChannel.permissionOverwrites.create(index, {VIEW_CHANNEL: false})
|
||||
})
|
||||
const Department1Button = new MessageButton()
|
||||
.setCustomId('Department1')
|
||||
.setLabel(`${supportbot.DepartmentTitle_1}`)
|
||||
.setStyle(supportbot.TicketDept1Colour)
|
||||
.setEmoji(supportbot.TicketDept1Emoji)
|
||||
|
||||
const Department2Button = new MessageButton()
|
||||
.setCustomId('Department2')
|
||||
.setLabel(`${supportbot.DepartmentTitle_2}`)
|
||||
.setStyle(supportbot.TicketDept2Colour)
|
||||
.setEmoji(supportbot.TicketDept2Emoji)
|
||||
|
||||
const Department3Button = new MessageButton()
|
||||
.setCustomId('Department3')
|
||||
.setLabel(`${supportbot.DepartmentTitle_3}`)
|
||||
.setStyle(supportbot.TicketDept3Colour)
|
||||
.setEmoji(supportbot.TicketDept3Emoji)
|
||||
|
||||
const row = new MessageActionRow()
|
||||
.addComponents(Department1Button, Department2Button, Department3Button)
|
||||
|
||||
const m = await ticketChannel.send({embeds: [TicketMessage], components: [row]})
|
||||
|
||||
const filter = i => {
|
||||
i.deferUpdate();
|
||||
return i.user.id === message.author.id;
|
||||
};
|
||||
const collector = m.createMessageComponentCollector({ filter, max: 1, componentType: 'BUTTON', time: 60000 });
|
||||
|
||||
collector.on('collect',async (i) => {
|
||||
|
||||
if(i.customId === 'Department1') {
|
||||
|
||||
ticketChannel.permissionOverwrites.edit(DeptRole1, {
|
||||
VIEW_CHANNEL: true,
|
||||
READ_MESSAGE_HISTORY: true,
|
||||
SEND_MESSAGES: true,
|
||||
})
|
||||
|
||||
if(!supportbot.AllowStaff) {
|
||||
ticketChannel.permissionOverwrites.edit(Staff, { VIEW_CHANNEL: false, READ_MESSAGE_HISTORY: false, SEND_MESSAGES: false })
|
||||
}
|
||||
|
||||
const Department1 = new Discord.MessageEmbed()
|
||||
.setDescription(`> Thank for reaching out to the **${supportbot.DepartmentTitle_1} Department**. Please provide us information regarding your query.`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
ticketChannel.send({ embeds: [Department1] });
|
||||
|
||||
if (supportbot.AllowTicketMentions) {
|
||||
ticketChannel.send({content: `@here`})
|
||||
}
|
||||
}
|
||||
i.message.edit({embeds: [TicketMessage], components: [row2]})
|
||||
|
||||
if(i.customId === 'Department2') {
|
||||
|
||||
ticketChannel.permissionOverwrites.edit(DeptRole2, {
|
||||
VIEW_CHANNEL: true,
|
||||
READ_MESSAGE_HISTORY: true,
|
||||
SEND_MESSAGES: true,
|
||||
})
|
||||
|
||||
if(!supportbot.AllowStaff) {
|
||||
ticketChannel.permissionOverwrites.edit(Staff, { VIEW_CHANNEL: false, READ_MESSAGE_HISTORY: false, SEND_MESSAGES: false })
|
||||
}
|
||||
|
||||
|
||||
const Department2 = new Discord.MessageEmbed()
|
||||
.setDescription(`> Thank for reaching out to the **${supportbot.DepartmentTitle_2} Department**. Please provide us information regarding your query.`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
ticketChannel.send({ embeds: [Department2] });
|
||||
|
||||
if (supportbot.AllowTicketMentions) {
|
||||
ticketChannel.send({content: `@here`})
|
||||
}
|
||||
|
||||
i.message.edit({embeds: [TicketMessage], components: [row2]})
|
||||
}
|
||||
if(i.customId === 'Department3') {
|
||||
|
||||
ticketChannel.permissionOverwrites.edit(DeptRole3, {
|
||||
VIEW_CHANNEL: true,
|
||||
READ_MESSAGE_HISTORY: true,
|
||||
SEND_MESSAGES: true,
|
||||
})
|
||||
|
||||
if(!supportbot.AllowStaff) {
|
||||
ticketChannel.permissionOverwrites.edit(Staff, { VIEW_CHANNEL: false, READ_MESSAGE_HISTORY: false, SEND_MESSAGES: false })
|
||||
}
|
||||
|
||||
const Department3 = new Discord.MessageEmbed()
|
||||
.setDescription(`> Thank for reaching out to the **${supportbot.DepartmentTitle_3} Department**. Please provide us information regarding your query.`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
ticketChannel.send({ embeds: [Department3] });
|
||||
|
||||
if (supportbot.AllowTicketMentions) {
|
||||
ticketChannel.send({content: `@here`})
|
||||
}
|
||||
i.message.edit({embeds: [TicketMessage], components: [row2]})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ticketChannel.send({embeds: [TicketMessage], components: [row2]})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
|
||||
// SupportBot, Created by Emerald Services
|
||||
// Announce
|
||||
const Discord = require("discord.js");
|
||||
const fs = require("fs");
|
||||
const yaml = require('js-yaml');
|
||||
const { execute } = require("./help");
|
||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||
module.exports = {
|
||||
name: supportbot.ChatLog,
|
||||
description: supportbot.ChatLogDesc,
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages) message.delete();
|
||||
let name = message.channel.name;
|
||||
|
||||
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
|
||||
let html = '';
|
||||
|
||||
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
|
||||
html += `<strong>--- Channel Transcript ---</strong><br>`;
|
||||
html += `<strong>Server Name:</strong> ${message.guild.name}<br>`;
|
||||
html += `<strong>Channel:</strong> ${name}<br>`;
|
||||
html += `<strong>Message:</strong> ${msgs.size} Messages<br><br><br>`;
|
||||
|
||||
msgs.forEach( msg => {
|
||||
if ( msg.content ) {
|
||||
html += `<strong>User:</strong> ${msg.author.tag}<br>`;
|
||||
html += `<strong>Message:</strong> ${msg.content}<br>`;
|
||||
html += `-----<br><br>`;
|
||||
}
|
||||
});
|
||||
|
||||
const TranscriptSavedEmbed = new Discord.MessageEmbed()
|
||||
.setDescription(supportbot.ChatLogSavedMessage)
|
||||
.setColor(supportbot.SuccessColour)
|
||||
message.channel.send({embeds: [TranscriptSavedEmbed]})
|
||||
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.ChatLogChannel}\`\n\nError Code: \`SB-03\``)
|
||||
.setColor(supportbot.ErrorColour);
|
||||
|
||||
const ChatLogs = new Discord.MessageEmbed()
|
||||
.setTitle(supportbot.ChatLog_Title)
|
||||
.setThumbnail(supportbot.ChatLog_Thumbnail)
|
||||
.addFields(
|
||||
{ name: 'Channel', value: `<#${message.channel.id}>` },
|
||||
{ name: 'User', value: `<@${message.author.id}>` },
|
||||
)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(supportbot.EmbedFooter)
|
||||
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === supportbot.ChatLogChannel) || message.guild.channels.cache.find(LocateChannel => LocateChannel.id === supportbot.ChatLogChannel)
|
||||
|
||||
if(!locateChannel) return message.channel.send({ embeds: [errornochannel] });
|
||||
|
||||
let file = new Discord.MessageAttachment( Buffer.from( html ), `${name}.html` )
|
||||
locateChannel.send({embeds: [ChatLogs], files: [file]})
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Say
|
||||
|
||||
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'));
|
||||
|
||||
exports.run = async(bot, message, args) => {
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.UnLockchat_Command}`);
|
||||
|
||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
||||
let lockedRole = message.guild.roles.find(lc => lc.name === `${supportbot.locked_role}`)
|
||||
|
||||
const rolemissing = new Discord.RichEmbed()
|
||||
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
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 **${supportbot.StaffRole}**`)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
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(supportbot.EmbedColour);
|
||||
message.channel.send(lockmsg);
|
||||
|
||||
};
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.UnLockchat_Command,
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
cd /home/container
|
||||
|
||||
if [ "${GIT_CLONE}" == "true" ] || [ "${GIT_CLONE}" == "1" ]; then
|
||||
if [ "$(ls -A /home/container)" ]; then
|
||||
echo "Pulling Updates"
|
||||
git pull
|
||||
else
|
||||
echo -e "/home/container is empty.\nCloning files into the directory."
|
||||
git clone https://github.com/1tzemerald/SupportBot.git
|
||||
fi
|
||||
fi
|
||||
|
||||
sed -i '/s/BOT_TOKEN_HERE/${BOT_TOKEN}/g' settings.json
|
||||
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
|
||||
${MODIFIED_STARTUP}
|
||||
Executable
+58
@@ -0,0 +1,58 @@
|
||||
// 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) {
|
||||
const SystemChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.SystemMessage_Channel) || member.guild.channels.cache.get(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.guild.roles.cache.find(role => role.id === 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_Icon === "CUSTOM") {
|
||||
SuggestionMessage.setThumbnail(supportbot.SystemMessageIcon_URL)
|
||||
}
|
||||
|
||||
|
||||
if (supportbot.SystemMessage_EmbedFooter) {
|
||||
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) {
|
||||
const SystemChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.SystemMessage_Channel) || member.guild.channels.cache.get(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))
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,128 @@
|
||||
// SupportBot Interaction Event
|
||||
// SupportBot Created by Emerald Services
|
||||
|
||||
const fs = require("fs");
|
||||
const { MessageEmbed, MessageAttachment, Permissions, MessageButton, MessageActionRow } = require("discord.js");
|
||||
const yaml = require('js-yaml');
|
||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||
|
||||
module.exports = async (bot, interaction, args) => {
|
||||
|
||||
if (interaction.isCommand()) return;
|
||||
|
||||
if(interaction.isButton()) {
|
||||
if(interaction.customId === 'openticket') {
|
||||
interaction.message.fetch()
|
||||
interaction.deferUpdate()
|
||||
let message = {
|
||||
guild: bot.guilds.cache.get(interaction.message.guildId),
|
||||
author: bot.users.cache.get(interaction.user.id),
|
||||
content: "N/A",
|
||||
channel: bot.channels.cache.get(interaction.message.channelId)
|
||||
}
|
||||
try {
|
||||
const cmd = bot.commands.get(supportbot.NewTicket);
|
||||
if(!cmd) return;
|
||||
cmd.execute(message, message.content)
|
||||
}
|
||||
catch (error){
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
if(interaction.customId === 'ticketclose') {
|
||||
if(interaction.channel.name.startsWith(`${supportbot.TicketChannel}-`)) {
|
||||
interaction.message.fetch()
|
||||
interaction.deferUpdate()
|
||||
const DeleteTicketEmbed = new MessageEmbed()
|
||||
.setDescription(supportbot.TicketDeleteMessage)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
interaction.channel.send({embeds: [DeleteTicketEmbed]})
|
||||
|
||||
let logChannel = interaction.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog) || interaction.guild.channels.cache.find(channel => channel.id === supportbot.TranscriptLog)
|
||||
|
||||
let user = interaction.user
|
||||
let name = interaction.channel.name;
|
||||
let ticketChannel = interaction.channel
|
||||
let reason = "No Reason Provided."
|
||||
|
||||
interaction.channel.send({content: `**${supportbot.ClosingTicket}**`})
|
||||
.then(() => {
|
||||
const logEmbed = new MessageEmbed()
|
||||
.setTitle(supportbot.TranscriptTitle)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(supportbot.EmbedFooter)
|
||||
.addField("Closed By", user.username)
|
||||
.addField("Reason", reason)
|
||||
|
||||
interaction.channel.messages.fetch({limit: 100}).then(msgs => {
|
||||
let html = ''
|
||||
|
||||
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
|
||||
html += `<strong>Server Name:</strong> ${interaction.guild.name}<br>`
|
||||
html += `<strong>Ticket:</strong> ${ticketChannel.name}<br>`
|
||||
html += `<strong>Message:</strong> ${msgs.size} Messages<br><br><br>`
|
||||
|
||||
|
||||
msgs.forEach(msg => {
|
||||
if(msg.content) {
|
||||
html += `<strong>User:</strong> ${msg.author.tag}<br>`;
|
||||
html += `<strong>Message:</strong> ${msg.content}<br>`;
|
||||
html += `-----<br><br>`;
|
||||
}
|
||||
})
|
||||
|
||||
const TranscriptSavedEmbed = new MessageEmbed()
|
||||
.setDescription(supportbot.TranscriptSavedMessage)
|
||||
.setColor(supportbot.SuccessColour)
|
||||
interaction.channel.send({embeds: [TranscriptSavedEmbed]})
|
||||
|
||||
let file = new MessageAttachment( Buffer.from( html ), `${name}.html` )
|
||||
logChannel.send({embeds: [logEmbed], files: [file]})
|
||||
|
||||
setTimeout(() => interaction.channel.delete(), supportbot.TicketDeleteTime)
|
||||
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
if(interaction.customId === 'ticketlock') {
|
||||
if(interaction.channel.name.startsWith(`${supportbot.TicketChannel}`)) {
|
||||
interaction.message.fetch()
|
||||
interaction.deferUpdate()
|
||||
let Admin = interaction.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || interaction.guild.roles.cache.find(AdminUser => AdminUser.id === supportbot.Admin)
|
||||
let all = interaction.channel.permissionOverwrites.cache
|
||||
|
||||
let parent = interaction.guild.channels.cache.find(c => c.name === `${supportbot.LockTicketCategory}`) || interaction.guild.channels.cache.find(c => c.id === `${supportbot.LockTicketCategory}`)
|
||||
if(parent) {
|
||||
interaction.channel.setParent(parent.id)
|
||||
}
|
||||
|
||||
all.forEach(perm => {
|
||||
interaction.channel.permissionOverwrites.delete(perm.id)
|
||||
|
||||
})
|
||||
interaction.channel.permissionOverwrites.create(Admin.id, {VIEW_CHANNEL: true})
|
||||
|
||||
interaction.channel.permissionOverwrites.create(interaction.guild.id, {VIEW_CHANNEL: false})
|
||||
|
||||
|
||||
const ticketDeleteButton = new MessageButton()
|
||||
.setCustomId('ticketclose')
|
||||
.setLabel('Close')
|
||||
.setStyle(supportbot.TicketDeleteColour)
|
||||
.setEmoji(supportbot.TicketDeleteEmoji)
|
||||
|
||||
const row = new MessageActionRow()
|
||||
.addComponents(ticketDeleteButton)
|
||||
const ArchiveEmbed = new MessageEmbed()
|
||||
.setTitle("Archived")
|
||||
.setDescription(`Archived ${interaction.channel.name}`)
|
||||
.setColor(`${supportbot.SuccessColour}`)
|
||||
|
||||
interaction.channel.send({embeds: [ArchiveEmbed]})
|
||||
interaction.message.edit({components: [row]})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
// 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();
|
||||
|
||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]`, `\u001b[36m`, `${message.author.tag}`, `\u001b[33m`, `has executed the command`, `\u001b[36m`,`${supportbot.Prefix}${command}`)
|
||||
|
||||
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) {
|
||||
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,26 @@
|
||||
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, packet) => {
|
||||
if (!['MESSAGE_REACTION_ADD', 'MESSAGE_REACTION_REMOVE'].includes(packet.t)) return;
|
||||
|
||||
const channel = bot.channels.cache.get(packet.d.channel_id);
|
||||
if (channel.messages.has(packet.d.message_id)) return;
|
||||
|
||||
channel.messages.fetch(packet.d.message_id).then(message => {
|
||||
const emoji = packet.d.emoji.id ? `${packet.d.emoji.name}:${packet.d.emoji.id}` : packet.d.emoji.name;
|
||||
const reaction = message.reactions.get(emoji);
|
||||
if (reaction) reaction.users.set(packet.d.user_id, bot.users.get(packet.d.user_id));
|
||||
if (packet.t === 'MESSAGE_REACTION_ADD') {
|
||||
bot.emit('messageReactionAdd', reaction, bot.users.get(packet.d.user_id));
|
||||
}
|
||||
if (packet.t === 'MESSAGE_REACTION_REMOVE') {
|
||||
bot.emit('messageReactionRemove', reaction, bot.users.get(packet.d.user_id));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
// SupportBot 6.0, Created by Emerald Services
|
||||
// Ready Event
|
||||
|
||||
const Discord = require("discord.js");
|
||||
const fs = require("fs");
|
||||
const { MessageActionRow, MessageButton } = require('discord.js');
|
||||
|
||||
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`, `┏━━━┓╋╋╋╋╋╋╋╋╋╋╋╋╋┏┓┏━━┓╋╋╋┏┓`)
|
||||
console.log(`\u001b[32m`, `┃┏━┓┃╋╋╋╋╋╋╋╋╋╋╋╋┏┛┗┫┏┓┃╋╋┏┛┗┓`)
|
||||
console.log(`\u001b[32m`, `┃┗━━┳┓┏┳━━┳━━┳━━┳┻┓┏┫┗┛┗┳━┻┓┏┛`)
|
||||
console.log(`\u001b[32m`, `┗━━┓┃┃┃┃┏┓┃┏┓┃┏┓┃┏┫┃┃┏━┓┃┏┓┃┃`)
|
||||
console.log(`\u001b[32m`, `┃┗━┛┃┗┛┃┗┛┃┗┛┃┗┛┃┃┃┗┫┗━┛┃┗┛┃┗┓`)
|
||||
console.log(`\u001b[32m`, `┗━━━┻━━┫┏━┫┏━┻━━┻┛┗━┻━━━┻━━┻━┛`)
|
||||
console.log(`\u001b[32m`, `┗╋╋╋╋╋╋╋┃┃╋┃┃`)
|
||||
console.log(`\u001b[32m`, `╋╋╋╋╋╋╋┗┛╋┗┛`)
|
||||
console.log(` `)
|
||||
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
|
||||
console.log(` `)
|
||||
console.log(`\u001b[33m`, `${supportbot.Bot_Name} v${supportbot.SupportBot_Version}`, `\u001b[36m`, `Connected to Discord`)
|
||||
console.log(`\u001b[33m`, `Documentation:`, `\u001b[36m`, `https://supportbot.emeraldsrv.dev`)
|
||||
console.log(`\u001b[33m`, `Discord:`, `\u001b[36m`, `https://emeraldsrv.dev/discord`)
|
||||
console.log(`\u001b[33m`, `Hosting:`, `\u001b[36m`, `https://emeraldsrv.dev/hosting`)
|
||||
console.log(` `)
|
||||
console.log(`\u001b[37m`, `SupportBot proudly created by Emerald Services`)
|
||||
console.log(` `)
|
||||
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
|
||||
|
||||
|
||||
|
||||
if (supportbot.ReactionTickets) {
|
||||
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(async 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) {
|
||||
embed.setDescription(supportbot.ReactionDescription)
|
||||
}
|
||||
|
||||
if (supportbot.ReactionPanel_Thumbnail) {
|
||||
embed.setThumbnail(supportbot.ReactionThumbnail)
|
||||
}
|
||||
|
||||
if (supportbot.ReactionPanel_Image) {
|
||||
embed.setImage(supportbot.ReactionImage)
|
||||
}
|
||||
|
||||
let button = new MessageButton()
|
||||
.setLabel('Open Ticket')
|
||||
.setCustomId('openticket')
|
||||
.setStyle('PRIMARY')
|
||||
|
||||
let row = new MessageActionRow()
|
||||
.addComponents(button)
|
||||
|
||||
|
||||
await chan1.send({
|
||||
embeds: [embed],
|
||||
components: [row]
|
||||
}).then(r => {
|
||||
let data = {
|
||||
"ReactionMessage_ID": `${r.id}`
|
||||
}
|
||||
let yamlStr = yaml.dump(data);
|
||||
fs.writeFileSync('./storage/ticketreaction.yml', yamlStr, 'utf8');
|
||||
|
||||
}).catch(e => {
|
||||
console.log("Raw"+e)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
};
|
||||
@@ -1,120 +1,112 @@
|
||||
// ____ _ ____ _
|
||||
// / ___| _ _ _ __ _ __ ___ _ __| |_| __ ) ___ | |_
|
||||
// \___ \| | | | '_ \| '_ \ / _ \| '__| __| _ \ / _ \| __|
|
||||
// ___) | |_| | |_) | |_) | (_) | | | |_| |_) | (_) | |_
|
||||
// |____/ \__,_| .__/| .__/ \___/|_| \__|____/ \___/ \__|
|
||||
// |_| |_|
|
||||
// © 2020 Created by Emerald Services
|
||||
// Licnese: MIT
|
||||
// SupportBot v5.1.1
|
||||
// ___ _ ___ _
|
||||
// / __> _ _ ___ ___ ___ _ _ _| |_ | . > ___ _| |_
|
||||
// \__ \| | || . \| . \/ . \| '_> | | | . \/ . \ | |
|
||||
// <___/`___|| _/| _/\___/|_| |_| |___/\___/ |_|
|
||||
// |_| |_|
|
||||
//
|
||||
// SupportBot created by Emerald Services
|
||||
// Installed with MIT License
|
||||
//
|
||||
// Discord Support: https://emeraldsrv.dev/discord
|
||||
|
||||
// const Discord = require("discord.js");
|
||||
const { Client, Intents, Collection } = require("discord.js");
|
||||
|
||||
const Discord = require("discord.js");
|
||||
const fs = require("fs");
|
||||
const bot = new Discord.Client();
|
||||
|
||||
bot.commands = new Discord.Collection();
|
||||
const bot = new Client({
|
||||
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES]
|
||||
});
|
||||
|
||||
const { REST } = require('@discordjs/rest');
|
||||
|
||||
bot.commands = new Collection();
|
||||
|
||||
const yaml = require('js-yaml');
|
||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||
|
||||
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(`${supportbot.Bot_Name} No commands found. Try to Re-download the resource`);
|
||||
|
||||
jsfile.forEach((f, i) =>{
|
||||
let props = require(`./commands/${f}`);
|
||||
console.log(`[${supportbot.Bot_Name}] > Command Loaded > ${f}`);
|
||||
bot.commands.set(props.help.name, props);
|
||||
});
|
||||
|
||||
});
|
||||
const { promisify } = require("util");
|
||||
const readdir = promisify(require("fs").readdir);
|
||||
|
||||
bot.addons = new Discord.Collection();
|
||||
String.prototype.toProperCase = function () {
|
||||
return this.replace(
|
||||
/([^\W_]+[^\s-]*) */g,
|
||||
(txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()
|
||||
);
|
||||
};
|
||||
|
||||
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(`${supportbot.Bot_Name} No addons detected nor default! Either download addons from https://itzemerald.tk/`);
|
||||
|
||||
jsfile.forEach((f, i) =>{
|
||||
let props = require(`./sb-addons/${f}`);
|
||||
console.log(`[${supportbot.Bot_Name}] > Addons Loaded > ${f}`);
|
||||
bot.addons.set(props.help.name, props);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
bot.on("ready", async () => {
|
||||
bot.user.setActivity(supportbot.BotActivity, {type: supportbot.ActvityType});
|
||||
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=${bot.user.id}&permissions=8&scope=bot`)
|
||||
console.log(`\u001b[37m`, `© ️SupportBot created by Emerald Services`)
|
||||
console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`)
|
||||
|
||||
});
|
||||
|
||||
bot.on("message", async 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.run(bot, message, args);
|
||||
message.delete();
|
||||
});
|
||||
|
||||
bot.on("message", async 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 addon = args.shift().toLowerCase();
|
||||
|
||||
const cmd = bot.addons.get(addon);
|
||||
if(!cmd) return;
|
||||
cmd.run(bot, message, args);
|
||||
message.delete();
|
||||
});
|
||||
|
||||
// [SupportBot] Welcome Message && Auto Join Role
|
||||
|
||||
bot.on("guildMemberAdd", (member) => {
|
||||
let channel = member.guild.channels.find(channel => channel.name === `${supportbot.WelcomeChannel}`)
|
||||
let autorole = member.guild.roles.find(autorole => autorole.name === `${supportbot.AutoRole}`)
|
||||
|
||||
const WelcomeMsg= new Discord.RichEmbed()
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setThumbnail(member.user.avatarURL)
|
||||
.setDescription(`:wave: ${member.user.username}\n${supportbot.WelcomeMessage}`)
|
||||
|
||||
channel.send(WelcomeMsg);
|
||||
member.addRole(autorole).catch(console.error);
|
||||
const init = async () => {
|
||||
const evtFiles = await readdir("./events/");
|
||||
|
||||
console.info(`\u001b[36m`, `➢ SupportBot Events`);
|
||||
console.info(` `);
|
||||
|
||||
evtFiles.forEach((file, i) => {
|
||||
const eventName = file.split(".")[0];
|
||||
const event = require(`./events/${file}`);
|
||||
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `#${i + 1} Event Loaded: ${eventName.toProperCase()} `);
|
||||
|
||||
bot.on(eventName, event.bind(null, bot));
|
||||
delete require.cache[require.resolve(`./events/${file}`)];
|
||||
});
|
||||
|
||||
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `Successfully loaded ${evtFiles.length} events.`);
|
||||
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
|
||||
console.log(` `)
|
||||
};
|
||||
|
||||
init();
|
||||
|
||||
fs.readdir("./commands/", async (err, files) => {
|
||||
|
||||
console.info(`\u001b[36m`, `➢ SupportBot Commands`);
|
||||
console.info(` `);
|
||||
|
||||
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[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `#${i + 1} Command Loaded: ${props.name.toProperCase()}`);
|
||||
bot.commands.set(props.name, props);
|
||||
});
|
||||
|
||||
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `Loaded ${jsfiles.length} commands!`);
|
||||
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
|
||||
console.log(` `)
|
||||
});
|
||||
|
||||
// [SupportBot] Leave Message
|
||||
fs.readdir("./addons/", (err, files) => {
|
||||
|
||||
console.info(`\u001b[36m`, `➢ SupportBot Addons`);
|
||||
console.info(` `);
|
||||
|
||||
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 === `${supportbot.LeaveChannel}`)
|
||||
|
||||
const LeaveMsg= new Discord.RichEmbed()
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setThumbnail(member.user.avatarURL)
|
||||
.setDescription(`:wave: ${member.user.username}\n${supportbot.LeaveMessage}`)
|
||||
|
||||
channel.send(LeaveMsg);
|
||||
if (jsfiles.length <= 0) {
|
||||
console.log(`[${supportbot.Bot_Name}]: No addons found. You can download addons from https://emeraldsrv.dev`);
|
||||
return;
|
||||
}
|
||||
|
||||
jsfiles.forEach((f, i) => {
|
||||
let props = require(`./addons/${f}`);
|
||||
|
||||
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `#${i + 1} Addon Loaded: ${props.name.toProperCase()}`);
|
||||
bot.commands.set(props.name, props);
|
||||
});
|
||||
|
||||
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `Loaded ${jsfiles.length} addons!`);
|
||||
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
|
||||
console.log(` `)
|
||||
});
|
||||
|
||||
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,310 @@
|
||||
# ___ _ ___ _
|
||||
# / __> _ _ ___ ___ ___ _ _ _| |_ | . > ___ _| |_
|
||||
# \__ \| | || . \| . \/ . \| '_> | | | . \/ . \ | |
|
||||
# <___/`___|| _/| _/\___/|_| |_| |___/\___/ |_|
|
||||
# |_| |_|
|
||||
#
|
||||
# SupportBot created by Emerald Services
|
||||
# Installed with MIT License
|
||||
#
|
||||
# Discord Support: https://emeraldsrv.dev/discord
|
||||
|
||||
SupportBot_Version: "7.1 pre-1"
|
||||
|
||||
# -------------------------
|
||||
# General Configuration
|
||||
# -------------------------
|
||||
|
||||
Token: "BOT_TOKEN_HERE"
|
||||
Prefix: "!!"
|
||||
Bot_Name: "SupportBot"
|
||||
|
||||
DeleteMessages: true
|
||||
# Should the bot delete command messages after executed?
|
||||
|
||||
# -------------------------
|
||||
# Activity Configuration
|
||||
# -------------------------
|
||||
|
||||
BotActivity: "-help | SupportBot"
|
||||
|
||||
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
|
||||
# Set The ActivityType to "STREAMING" for a streaming status!
|
||||
|
||||
ActivityType: "PLAYING"
|
||||
# Activity status can either be PLAYING, WATCHING, LISTENING or STREAMING.
|
||||
|
||||
# -------------------------
|
||||
# Embed Configuration
|
||||
# -------------------------
|
||||
|
||||
EmbedColour: "#f74343"
|
||||
EmbedFooter: "SupportBot | The #1 Supportive Discord Bot"
|
||||
|
||||
ErrorColour: "#d12519"
|
||||
SuccessColour: "#04b545"
|
||||
WarningColour: "#fca117"
|
||||
|
||||
# -------------------------
|
||||
# Help Configuration
|
||||
# -------------------------
|
||||
|
||||
HelpMenu: true # Do not change!
|
||||
SendHelpPage: "channel" # Set to channel or dm
|
||||
|
||||
# -------------------------
|
||||
# Role Configuration
|
||||
# -------------------------
|
||||
|
||||
AutoRole: true
|
||||
AutoRole_Role: "Member"
|
||||
LockdownRole: "@everyone"
|
||||
|
||||
Staff: "Staff"
|
||||
Admin: "Admin"
|
||||
TicketBlackListRole: "Blacklisted"
|
||||
|
||||
# -------------------------
|
||||
# Tickets Configuration
|
||||
# -------------------------
|
||||
|
||||
# --- General Config ---
|
||||
# --- Start ---
|
||||
|
||||
TicketCategory: "▬▬ TICKETS ▬▬"
|
||||
TicketChannel: "ticket"
|
||||
|
||||
TicketLog: "ticket-logs"
|
||||
TranscriptLog: "transcripts"
|
||||
|
||||
TranscriptTitle: "Ticket Transcript"
|
||||
TicketBlackListMessage: "You are not allowed to open a ticket"
|
||||
|
||||
TicketSubject: "description"
|
||||
# "description" will displays the ticket reason within the channel description
|
||||
# "embed" will displays the ticket reason within the ticket 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.
|
||||
|
||||
# --- Panel Config ---
|
||||
# --- Start ---
|
||||
|
||||
ReactionChannel: "create-ticket"
|
||||
ReactionEmoji: "📩"
|
||||
# For cusomt emojis: <:emoji_name:EMOJI_ID>
|
||||
|
||||
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."
|
||||
|
||||
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"
|
||||
|
||||
# --- Creation Config ---
|
||||
# --- Start ---
|
||||
|
||||
# Available Placeholders:
|
||||
|
||||
# %ticketusername% - User who created the ticket.
|
||||
# <@%ticketauthor%> - Tags the user who created the ticket.
|
||||
# <#%ticketid%> - Mentions the ticket channel.
|
||||
|
||||
|
||||
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."
|
||||
|
||||
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
|
||||
NoTicketSubject: "No Reason Provided!"
|
||||
|
||||
TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%>"
|
||||
|
||||
AddedUser: "👍 <@%user%> has been added to this ticket"
|
||||
RemovedUser: "👍 <@%user%> has been removed from this ticket"
|
||||
|
||||
|
||||
TicketLockReaction: "🔒"
|
||||
TicketDeleteReaction: "⛔"
|
||||
|
||||
TranscriptSavedMessage: "📝 **Transcript Saved!**"
|
||||
TicketLockMessage: "❌ **Ticket Locked!**"
|
||||
TicketDeleteMessage: "⚠ **Ticket Deleting!**" # Tickets deleting after 5 seconds by default.
|
||||
TicketDeleteTime: 5000 # Time must be set in miliseconds.
|
||||
|
||||
# --- Closing Config ---
|
||||
# --- Start ---
|
||||
|
||||
ClosingTicket: ":warning: You have requested to close your support ticket."
|
||||
ClosingConfirmation_Word: "confirm"
|
||||
CloseConfirmation: true
|
||||
|
||||
# --- Departments Config ---
|
||||
# --- Start ---
|
||||
|
||||
TicketDepartments: true
|
||||
|
||||
AllowStaff: true
|
||||
# If set to true users with the "Staff" role will not be able to view tickets
|
||||
# without a valid department role set below.
|
||||
|
||||
# Set to false to allow "Staff" to see tickets whether its a department for them or not.
|
||||
|
||||
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 Messages Configuration
|
||||
# --------------------------------
|
||||
|
||||
# Available Placeholders:
|
||||
# %guildname% - This displays the name of the discord server.
|
||||
|
||||
SystemMessages: true
|
||||
SystemMessage_EmbedFooter: false
|
||||
|
||||
SystemMessage_Channel: "system-messages"
|
||||
SystemMessage_Type: "embed"
|
||||
# There are 2 types of how you can send system messages, 'normal' or 'embed'
|
||||
|
||||
SystemMessage_Icon: "USER"
|
||||
# USER - This will display the user's icon of who joins.
|
||||
# BOT - This will display the bot's icon when a someone joins.
|
||||
|
||||
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.
|
||||
|
||||
# -------------------------
|
||||
# Links Configuration
|
||||
# -------------------------
|
||||
|
||||
LinksTitle: "Server Links"
|
||||
|
||||
LINKS:
|
||||
"Website": "https://www.example.com"
|
||||
"Store": "https://store.example.com"
|
||||
"Discord": "https://discord.gg/example"
|
||||
# "Twitter": "https://twitter.com/example"
|
||||
# "Add More": "Just follow this format!"
|
||||
|
||||
# --------------------------
|
||||
# Suggestion 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 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"
|
||||
|
||||
BlacklistTitle: "Blacklisted User"
|
||||
BlacklistColour: "#000000"
|
||||
|
||||
# --------------------------
|
||||
# Command Configuration
|
||||
# --------------------------
|
||||
|
||||
# --- User Commands ---
|
||||
|
||||
HelpCommand: "help"
|
||||
LinksCommand: "links"
|
||||
PingCommand: "ping"
|
||||
SuggestCommand: "suggest"
|
||||
|
||||
# --- Ticket Commands ---
|
||||
|
||||
NewTicket: "ticket"
|
||||
CloseTicket: "close"
|
||||
AddUser: "add"
|
||||
RemoveUser: "remove"
|
||||
RenameTicket: "rename"
|
||||
|
||||
# --- Staff/Admin Commands ---
|
||||
|
||||
BotSay: "say"
|
||||
PurgeMessage: "purge"
|
||||
|
||||
AnnounceCommand: "announce"
|
||||
BanUser: "ban"
|
||||
KickUser: "kick"
|
||||
BlacklistUser: "blacklist"
|
||||
|
||||
# --------------------------
|
||||
# Messages Configuration
|
||||
# --------------------------
|
||||
|
||||
# --- Command Messages ---
|
||||
|
||||
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."
|
||||
BlacklistDesc: "Decline a member to open a ticket"
|
||||
|
||||
# Error / Warning 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!"
|
||||
Generated
+519
@@ -0,0 +1,519 @@
|
||||
{
|
||||
"name": "supportbot",
|
||||
"version": "7.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@discordjs/collection": {
|
||||
"version": "0.1.6",
|
||||
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.6.tgz",
|
||||
"integrity": "sha512-utRNxnd9kSS2qhyivo9lMlt5qgAUasH2gb7BEOn6p0efFh24gjGomHzWKMAPn2hEReOPQZCJaRKoURwRotKucQ=="
|
||||
},
|
||||
"@discordjs/form-data": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz",
|
||||
"integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==",
|
||||
"requires": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"mime-types": "^2.1.12"
|
||||
}
|
||||
},
|
||||
"@tootallnate/once": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz",
|
||||
"integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw=="
|
||||
},
|
||||
"abab": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz",
|
||||
"integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q=="
|
||||
},
|
||||
"abort-controller": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
|
||||
"requires": {
|
||||
"event-target-shim": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"acorn": {
|
||||
"version": "8.4.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz",
|
||||
"integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA=="
|
||||
},
|
||||
"acorn-globals": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz",
|
||||
"integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==",
|
||||
"requires": {
|
||||
"acorn": "^7.1.1",
|
||||
"acorn-walk": "^7.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"acorn": {
|
||||
"version": "7.4.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
|
||||
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"acorn-walk": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz",
|
||||
"integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA=="
|
||||
},
|
||||
"agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||
"requires": {
|
||||
"debug": "4"
|
||||
}
|
||||
},
|
||||
"argparse": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
|
||||
},
|
||||
"asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
||||
},
|
||||
"browser-process-hrtime": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz",
|
||||
"integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow=="
|
||||
},
|
||||
"combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"requires": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"cssom": {
|
||||
"version": "0.4.4",
|
||||
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz",
|
||||
"integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw=="
|
||||
},
|
||||
"cssstyle": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz",
|
||||
"integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==",
|
||||
"requires": {
|
||||
"cssom": "~0.3.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"cssom": {
|
||||
"version": "0.3.8",
|
||||
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz",
|
||||
"integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"data-urls": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz",
|
||||
"integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==",
|
||||
"requires": {
|
||||
"abab": "^2.0.3",
|
||||
"whatwg-mimetype": "^2.3.0",
|
||||
"whatwg-url": "^8.0.0"
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
|
||||
"integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
}
|
||||
},
|
||||
"decimal.js": {
|
||||
"version": "10.3.1",
|
||||
"resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz",
|
||||
"integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ=="
|
||||
},
|
||||
"deep-is": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
|
||||
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
|
||||
},
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
|
||||
},
|
||||
"discord.js": {
|
||||
"version": "12.5.3",
|
||||
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.5.3.tgz",
|
||||
"integrity": "sha512-D3nkOa/pCkNyn6jLZnAiJApw2N9XrIsXUAdThf01i7yrEuqUmDGc7/CexVWwEcgbQR97XQ+mcnqJpmJ/92B4Aw==",
|
||||
"requires": {
|
||||
"@discordjs/collection": "^0.1.6",
|
||||
"@discordjs/form-data": "^3.0.1",
|
||||
"abort-controller": "^3.0.0",
|
||||
"node-fetch": "^2.6.1",
|
||||
"prism-media": "^1.2.9",
|
||||
"setimmediate": "^1.0.5",
|
||||
"tweetnacl": "^1.0.3",
|
||||
"ws": "^7.4.4"
|
||||
}
|
||||
},
|
||||
"domexception": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz",
|
||||
"integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==",
|
||||
"requires": {
|
||||
"webidl-conversions": "^5.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"webidl-conversions": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz",
|
||||
"integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"escodegen": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz",
|
||||
"integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==",
|
||||
"requires": {
|
||||
"esprima": "^4.0.1",
|
||||
"estraverse": "^5.2.0",
|
||||
"esutils": "^2.0.2",
|
||||
"optionator": "^0.8.1",
|
||||
"source-map": "~0.6.1"
|
||||
}
|
||||
},
|
||||
"esprima": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
||||
},
|
||||
"estraverse": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
|
||||
"integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ=="
|
||||
},
|
||||
"esutils": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
||||
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
|
||||
},
|
||||
"event-target-shim": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
|
||||
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
|
||||
},
|
||||
"fast-levenshtein": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
|
||||
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
|
||||
},
|
||||
"form-data": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
|
||||
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
|
||||
"requires": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"mime-types": "^2.1.12"
|
||||
}
|
||||
},
|
||||
"html-encoding-sniffer": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz",
|
||||
"integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==",
|
||||
"requires": {
|
||||
"whatwg-encoding": "^1.0.5"
|
||||
}
|
||||
},
|
||||
"http-proxy-agent": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz",
|
||||
"integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==",
|
||||
"requires": {
|
||||
"@tootallnate/once": "1",
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
}
|
||||
},
|
||||
"https-proxy-agent": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",
|
||||
"integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==",
|
||||
"requires": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
}
|
||||
},
|
||||
"iconv-lite": {
|
||||
"version": "0.4.24",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||
"requires": {
|
||||
"safer-buffer": ">= 2.1.2 < 3"
|
||||
}
|
||||
},
|
||||
"is-potential-custom-element-name": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
|
||||
"integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="
|
||||
},
|
||||
"js-yaml": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
|
||||
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
|
||||
"requires": {
|
||||
"argparse": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"jsdom": {
|
||||
"version": "16.7.0",
|
||||
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz",
|
||||
"integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==",
|
||||
"requires": {
|
||||
"abab": "^2.0.5",
|
||||
"acorn": "^8.2.4",
|
||||
"acorn-globals": "^6.0.0",
|
||||
"cssom": "^0.4.4",
|
||||
"cssstyle": "^2.3.0",
|
||||
"data-urls": "^2.0.0",
|
||||
"decimal.js": "^10.2.1",
|
||||
"domexception": "^2.0.1",
|
||||
"escodegen": "^2.0.0",
|
||||
"form-data": "^3.0.0",
|
||||
"html-encoding-sniffer": "^2.0.1",
|
||||
"http-proxy-agent": "^4.0.1",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"is-potential-custom-element-name": "^1.0.1",
|
||||
"nwsapi": "^2.2.0",
|
||||
"parse5": "6.0.1",
|
||||
"saxes": "^5.0.1",
|
||||
"symbol-tree": "^3.2.4",
|
||||
"tough-cookie": "^4.0.0",
|
||||
"w3c-hr-time": "^1.0.2",
|
||||
"w3c-xmlserializer": "^2.0.0",
|
||||
"webidl-conversions": "^6.1.0",
|
||||
"whatwg-encoding": "^1.0.5",
|
||||
"whatwg-mimetype": "^2.3.0",
|
||||
"whatwg-url": "^8.5.0",
|
||||
"ws": "^7.4.6",
|
||||
"xml-name-validator": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"levn": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
|
||||
"integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
|
||||
"requires": {
|
||||
"prelude-ls": "~1.1.2",
|
||||
"type-check": "~0.3.2"
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
||||
},
|
||||
"mime-db": {
|
||||
"version": "1.48.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz",
|
||||
"integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ=="
|
||||
},
|
||||
"mime-types": {
|
||||
"version": "2.1.31",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz",
|
||||
"integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==",
|
||||
"requires": {
|
||||
"mime-db": "1.48.0"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
||||
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
|
||||
},
|
||||
"nwsapi": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz",
|
||||
"integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ=="
|
||||
},
|
||||
"optionator": {
|
||||
"version": "0.8.3",
|
||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
|
||||
"integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
|
||||
"requires": {
|
||||
"deep-is": "~0.1.3",
|
||||
"fast-levenshtein": "~2.0.6",
|
||||
"levn": "~0.3.0",
|
||||
"prelude-ls": "~1.1.2",
|
||||
"type-check": "~0.3.2",
|
||||
"word-wrap": "~1.2.3"
|
||||
}
|
||||
},
|
||||
"parse5": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
|
||||
"integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw=="
|
||||
},
|
||||
"prelude-ls": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
|
||||
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
|
||||
},
|
||||
"prism-media": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.3.1.tgz",
|
||||
"integrity": "sha512-nyYAa3KB4qteJIqdguKmwxTJgy55xxUtkJ3uRnOvO5jO+frci+9zpRXw6QZVcfDeva3S654fU9+26P2OSTzjHw=="
|
||||
},
|
||||
"psl": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
|
||||
"integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
|
||||
},
|
||||
"punycode": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
|
||||
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
},
|
||||
"saxes": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz",
|
||||
"integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==",
|
||||
"requires": {
|
||||
"xmlchars": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"setimmediate": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
|
||||
"integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU="
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"optional": true
|
||||
},
|
||||
"symbol-tree": {
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
|
||||
"integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
|
||||
},
|
||||
"tough-cookie": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz",
|
||||
"integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==",
|
||||
"requires": {
|
||||
"psl": "^1.1.33",
|
||||
"punycode": "^2.1.1",
|
||||
"universalify": "^0.1.2"
|
||||
}
|
||||
},
|
||||
"tr46": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz",
|
||||
"integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==",
|
||||
"requires": {
|
||||
"punycode": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"tweetnacl": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz",
|
||||
"integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw=="
|
||||
},
|
||||
"type-check": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
|
||||
"integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
|
||||
"requires": {
|
||||
"prelude-ls": "~1.1.2"
|
||||
}
|
||||
},
|
||||
"universalify": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
||||
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
|
||||
},
|
||||
"w3c-hr-time": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz",
|
||||
"integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==",
|
||||
"requires": {
|
||||
"browser-process-hrtime": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"w3c-xmlserializer": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz",
|
||||
"integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==",
|
||||
"requires": {
|
||||
"xml-name-validator": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"webidl-conversions": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz",
|
||||
"integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w=="
|
||||
},
|
||||
"whatwg-encoding": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz",
|
||||
"integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==",
|
||||
"requires": {
|
||||
"iconv-lite": "0.4.24"
|
||||
}
|
||||
},
|
||||
"whatwg-mimetype": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz",
|
||||
"integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g=="
|
||||
},
|
||||
"whatwg-url": {
|
||||
"version": "8.7.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz",
|
||||
"integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==",
|
||||
"requires": {
|
||||
"lodash": "^4.7.0",
|
||||
"tr46": "^2.1.0",
|
||||
"webidl-conversions": "^6.1.0"
|
||||
}
|
||||
},
|
||||
"word-wrap": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
|
||||
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ=="
|
||||
},
|
||||
"ws": {
|
||||
"version": "7.5.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.1.tgz",
|
||||
"integrity": "sha512-2c6faOUH/nhoQN6abwMloF7Iyl0ZS2E9HGtsiLrWn0zOOMWlhtDmdf/uihDt6jnuCxgtwGBNy6Onsoy2s2O2Ow=="
|
||||
},
|
||||
"xml-name-validator": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",
|
||||
"integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw=="
|
||||
},
|
||||
"xmlchars": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
|
||||
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
|
||||
}
|
||||
}
|
||||
}
|
||||
+12
-6
@@ -1,15 +1,21 @@
|
||||
{
|
||||
"name": "supportbot",
|
||||
"version": "5.1.0",
|
||||
"description": "a discord dbot that can you help with your servers support",
|
||||
"version": "7.1",
|
||||
"description": "SupportBot, a free open-source discord ticket application with ease of use.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "-help"
|
||||
"supportbot": "node index.js"
|
||||
},
|
||||
"author": "Emerald SRV",
|
||||
"keywords": [
|
||||
"supportbot"
|
||||
],
|
||||
"author": "Emerald Services",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"discord.js": "^11.5.1",
|
||||
"js-yaml": "^3.13.1"
|
||||
"@discordjs/rest": "^0.1.0-canary.0",
|
||||
"discord-api-types": "^0.23.1",
|
||||
"discord.js": "^13.1.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsdom": "^16.7.0"
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
// SupportBot Addons
|
||||
// Default Addon
|
||||
|
||||
const Discord = require("discord.js");
|
||||
const bot = new Discord.Client()
|
||||
const someaddon = new Discord.Client()
|
||||
|
||||
someaddon.settings = require("./settings/someaddon.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: someaddon.settings.Addon_Example_Command,
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
|
||||
"Addon_Example_Command": "addonexample"
|
||||
|
||||
}
|
||||
Regular → Executable
File renamed without changes.
Executable
+8
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"854057237495676938": {
|
||||
"id": 21
|
||||
},
|
||||
"597779408295821323": {
|
||||
"id": 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
ReactionMessage_ID: ''
|
||||
Regular → Executable
+317
-89
@@ -1,115 +1,343 @@
|
||||
# _________ __ __________ __
|
||||
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||
# \/ |__| |__| \/
|
||||
# ___ _ ___ _
|
||||
# / __> _ _ ___ ___ ___ _ _ _| |_ | . > ___ _| |_
|
||||
# \__ \| | || . \| . \/ . \| '_> | | | . \/ . \ | |
|
||||
# <___/`___|| _/| _/\___/|_| |_| |___/\___/ |_|
|
||||
# |_| |_|
|
||||
#
|
||||
# SupportBot v5.1.1
|
||||
# Created by © 2020 Emerald Services
|
||||
# License: MIT
|
||||
# SupportBot created by Emerald Services
|
||||
# Installed with MIT License
|
||||
#
|
||||
# Discord Support: https://emeraldsrv.dev/discord
|
||||
|
||||
#Bot Indentification
|
||||
Token: "Bot_Token_Here"
|
||||
Prefix: "!"
|
||||
SupportBot_Version: "7.2"
|
||||
|
||||
# -------------------------
|
||||
# General Configuration
|
||||
# -------------------------
|
||||
|
||||
Token: "BOT_TOKEN"
|
||||
Prefix: "-"
|
||||
Bot_Name: "SupportBot"
|
||||
|
||||
BotActivity: "SupportBot v5.1"
|
||||
DeleteMessages: true
|
||||
# Should the bot delete command messages after executed?
|
||||
|
||||
# -------------------------
|
||||
# Activity Configuration
|
||||
# -------------------------
|
||||
|
||||
BotActivity: "Need Help? -ticket"
|
||||
|
||||
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
|
||||
# Set The ActivityType to "STREAMING" for a streaming status!
|
||||
|
||||
ActivityType: "PLAYING"
|
||||
# Activity status can either be PLAYING, WATCHING, LISTENING or STREAMING.
|
||||
|
||||
EmbedColour: "#4bbf5c"
|
||||
EmbedFooter: "SupportBot | The #1 Supportive Discord Bot"
|
||||
# -------------------------
|
||||
# Embed Configuration
|
||||
# -------------------------
|
||||
|
||||
# Role Settings
|
||||
AutoRole: "Member"
|
||||
StaffRole: "Support"
|
||||
EmbedColour: "#f74343"
|
||||
EmbedFooter: "SupportBot | An Advanced Ticket System"
|
||||
|
||||
locked_role: "@everyone"
|
||||
everyone: "@everyone"
|
||||
ErrorColour: "#d12519"
|
||||
SuccessColour: "#04b545"
|
||||
WarningColour: "#fca117"
|
||||
|
||||
Department_Role_1: "Support"
|
||||
Department_Role_2: "Security"
|
||||
Department_Role_3: "Sales"
|
||||
# -------------------------
|
||||
# Help Configuration
|
||||
# -------------------------
|
||||
|
||||
# Welcome & Leave
|
||||
WelcomeChannel: "welcome"
|
||||
WelcomeMessage: "Welcome to the server!"
|
||||
HelpMenu: true # Do not change!
|
||||
SendHelpPage: "channel" # Set to channel or dm
|
||||
|
||||
LeaveChannel: "welcome"
|
||||
LeaveMessage: "Thank you for visiting us!"
|
||||
# -------------------------
|
||||
# Role Configuration
|
||||
# -------------------------
|
||||
|
||||
# Ticket Settings
|
||||
category: "Tickets"
|
||||
Ticket_Colour: "#000e42"
|
||||
Ticket_Channel_Name: "ticket"
|
||||
Ticket_Logs: "ticket-logs"
|
||||
AutoRole: true
|
||||
AutoRole_Role: "Member"
|
||||
LockdownRole: "@everyone"
|
||||
|
||||
Transcript_Log: "ticket-data"
|
||||
Transcript_Title: "Support Transcript"
|
||||
Staff: "Server Staff"
|
||||
Admin: "Server Admin"
|
||||
TicketBlackListRole: "Blacklisted"
|
||||
# -------------------------
|
||||
# Tickets Configuration
|
||||
# -------------------------
|
||||
|
||||
Ticket_Closing: "⚠ Your ticket is now closing!"
|
||||
Ticket_Closure: "Looks like you have come to the end of your support ticket\nPlease confirm that you want to close your ticket."
|
||||
Closure_Confirm_Word: "confirm"
|
||||
TicketCategory: "Support Tickets"
|
||||
TicketChannel: "ticket"
|
||||
|
||||
Ticket_Message: "Your support ticket has been opened successfully\nPlease allow us some time to reach out to you."
|
||||
Default_Ticket_Reason: "No Subject"
|
||||
TicketLog: "ticket-logs"
|
||||
TranscriptLog: "transcripts"
|
||||
|
||||
# Ticket Department Settings
|
||||
Ticket_Department_1: "Support"
|
||||
Ticket_Department_2: "Security"
|
||||
Ticket_Department_3: "Sales"
|
||||
TranscriptTitle: "Ticket Transcript"
|
||||
TicketLog_Title: "Ticket Log"
|
||||
TicketBlackListMessage: "You are not allowed to open a ticket"
|
||||
|
||||
Ticket_Department_Emoji_1: "🎧"
|
||||
Ticket_Department_Emoji_2: "🔐"
|
||||
Ticket_Department_Emoji_3: "💵"
|
||||
TicketSubject: "description"
|
||||
# "description" will displays the ticket reason within the channel description
|
||||
# "embed" will displays the ticket reason within the ticket embed
|
||||
|
||||
# Announcement Settings
|
||||
Announcement_Title: "SupportBot Announcement"
|
||||
Announcement_Channel: "announcements"
|
||||
Announcement_Tag_Role: "@everyone"
|
||||
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.
|
||||
|
||||
# Poll Settings
|
||||
Poll_Channel": "polls"
|
||||
Poll_Title": "📊 Polls"
|
||||
# --- Panel Config ---
|
||||
# --- Start ---
|
||||
|
||||
Reaction_Poll_1": "✅"
|
||||
Reaction_Poll_2": "❎"
|
||||
ReactionChannel: "create-ticket"
|
||||
ReactionEmoji: "📩"
|
||||
# For cusomt emojis: <:emoji_name:EMOJI_ID>
|
||||
|
||||
# Suggestion Settings
|
||||
Suggestion_Title: "SupportBot Suggestions"
|
||||
Suggestion_Channel: "suggestions"
|
||||
ReactionTickets: true
|
||||
ReactionMessage: "React with %reaction_emoji% to create a Support Ticket!"
|
||||
|
||||
suggestyes: "✅"
|
||||
suggestno: "❎"
|
||||
ReactionPanel_Description: true
|
||||
ReactionDescription: "Create a support ticket to contact a member of staff."
|
||||
|
||||
# Report Settings
|
||||
Report_Channel: "reports"
|
||||
Report_Title: "SupportBot Report"
|
||||
ReactionPanel_Thumbnail: true
|
||||
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
|
||||
|
||||
# Link Settings
|
||||
LINKS_TITLE: "SupportBot Links"
|
||||
ReactionPanel_Image: true
|
||||
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
|
||||
|
||||
LINKS:
|
||||
"Discord": "https://discord.gg/"
|
||||
"Twitter": "https://twitter.com/"
|
||||
"Website": "https://example.com/"
|
||||
"AddMore": "AddMoreIfYouWant"
|
||||
# --- Creation Config ---
|
||||
# --- Start ---
|
||||
|
||||
# Bot Command Settings
|
||||
Add_Command: "add"
|
||||
Remove_Command: "remove"
|
||||
Ticket_Command: "ticket"
|
||||
Close_Command: "close"
|
||||
Forceclose_Command: "forceclose"
|
||||
Rename_Command: "rename"
|
||||
Lockchat_Command: "lock"
|
||||
UnLockchat_Command: "unlock"
|
||||
Announcement_Command: "announce"
|
||||
Say_Command: "say"
|
||||
Suggest_Command: "suggest"
|
||||
Ping_Command: "ping"
|
||||
Help_Command: "help"
|
||||
Link_Command: "links"
|
||||
Poll_Command: "poll"
|
||||
Report_Command: "report"
|
||||
Setup_Command: "setup"
|
||||
# Available Placeholders:
|
||||
|
||||
# %ticketusername% - User who created the ticket.
|
||||
# <@%ticketauthor%> - Tags the user who created the ticket.
|
||||
# <#%ticketid%> - Mentions the ticket channel.
|
||||
|
||||
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."
|
||||
|
||||
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
|
||||
NoTicketSubject: "No Reason Provided!"
|
||||
|
||||
TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%>"
|
||||
|
||||
AddedUser: "👍 <@%user%> has been added to this ticket"
|
||||
RemovedUser: "👍 <@%user%> has been removed from this ticket"
|
||||
|
||||
|
||||
# --- Buttons Config ---
|
||||
# --- Start ---
|
||||
|
||||
# Discord Button Colour Selection
|
||||
# PRIMARY - Blurple
|
||||
# DANGER - Red
|
||||
# SUCCESS - Green
|
||||
# Secondary - Grey
|
||||
|
||||
TicketLockReaction: "🔒"
|
||||
TicketDeleteReaction: "⛔"
|
||||
LockTicketCategory: "Archive"
|
||||
|
||||
TicketCloseEmoji: "❌"
|
||||
TicketDeleteEmoji: "⛔"
|
||||
TicketLockEmoji: "🔒"
|
||||
|
||||
TicketCloseColour: "DANGER"
|
||||
TicketDeleteColour: "DANGER"
|
||||
TicketLockColour: "PRIMARY"
|
||||
|
||||
TicketDept1Colour: "PRIMARY"
|
||||
TicketDept2Colour: "PRIMARY"
|
||||
TicketDept3Colour: "PRIMARY"
|
||||
|
||||
TicketDept1Emoji: "1️⃣"
|
||||
TicketDept2Emoji: "2️⃣"
|
||||
TicketDept3Emoji: "3️⃣"
|
||||
|
||||
TranscriptSavedMessage: "📝 **Transcript Saved!**"
|
||||
TicketLockMessage: "❌ **Ticket Locked!**"
|
||||
TicketDeleteMessage: "⚠ **Ticket Deleting!**" # Tickets deleting after 5 seconds by default.
|
||||
TicketDeleteTime: 5000 # Time must be set in miliseconds.
|
||||
|
||||
# --- Departments Config ---
|
||||
# --- Start ---
|
||||
|
||||
TicketDepartments: true
|
||||
|
||||
AllowStaff: true
|
||||
# If set to false users with the "Staff" role will not be able to view tickets
|
||||
# without a valid department role set below.
|
||||
|
||||
# Set to false to allow "Staff" to see tickets whether its a department for them or not.
|
||||
|
||||
DepartmentTitle_1: "Support"
|
||||
DepartmentTitle_2: "Billing"
|
||||
DepartmentTitle_3: "Marketing"
|
||||
# Ticket department title, This is the title for a ticket department to help users know what is available.
|
||||
|
||||
DepartmentRole_1: "Support Team"
|
||||
DepartmentRole_2: "Billing Team"
|
||||
DepartmentRole_3: "Marketing Team"
|
||||
# Ticket roles are the roles that will be able to gain access to tickets depending on what department has been choosen.
|
||||
|
||||
# --- Closing Config ---
|
||||
# --- Start ---
|
||||
|
||||
ClosingTicket: ":warning: You have requested to close your support ticket."
|
||||
ClosingConfirmation_Word: "confirm"
|
||||
CloseConfirmation: false
|
||||
|
||||
# --------------------------------
|
||||
# System Messages Configuration
|
||||
# --------------------------------
|
||||
|
||||
# Available Placeholders:
|
||||
# %guildname% - This displays the name of the discord server.
|
||||
|
||||
SystemMessages: true
|
||||
SystemMessage_EmbedFooter: false
|
||||
|
||||
SystemMessage_Channel: "system-messages"
|
||||
SystemMessage_Type: "embed"
|
||||
# There are 2 types of how you can send system messages, 'normal' or 'embed'
|
||||
|
||||
SystemMessage_Icon: "USER"
|
||||
# USER - This will display the user's icon of who joins.
|
||||
# BOT - This will display the bot's icon when a someone joins.
|
||||
# CUSTOM - This will allow you to use a custom image, set this below!
|
||||
SystemMessageIcon_URL: "https://imgur.com/example.png"
|
||||
|
||||
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.
|
||||
|
||||
# -------------------------
|
||||
# Links Configuration
|
||||
# -------------------------
|
||||
|
||||
LinksTitle: "Server Links"
|
||||
|
||||
LINKS:
|
||||
"Website": "https://www.example.com"
|
||||
"Store": "https://store.example.com"
|
||||
"Discord": "https://discord.gg/example"
|
||||
# "Twitter": "https://twitter.com/example"
|
||||
# "Add More": "Just follow this format!"
|
||||
|
||||
# --------------------------
|
||||
# Suggestion Configuration
|
||||
# --------------------------
|
||||
|
||||
SuggestionChannel: "suggestions"
|
||||
SuggestionTitle: "Suggestion"
|
||||
|
||||
SuggestionStarter: "What would you like to suggest?"
|
||||
SuggestReact_1: 👍
|
||||
SuggestReact_2: 👎
|
||||
|
||||
SuggestionMessage_Icon: "USER"
|
||||
# USER - This will display the user's icon of who joins.
|
||||
# BOT - This will display the bot's icon when a someone joins.
|
||||
# CUSTOM - This will allow you to use a custom image, set this below!
|
||||
SuggestionIcon_URL: "https://imgur.com/example.png"
|
||||
|
||||
# ----------------------------
|
||||
# Announcement Configuration
|
||||
# ----------------------------
|
||||
|
||||
AnnouncementChannel: "announcements"
|
||||
AnnouncementTitle: "Servername Announcement"
|
||||
AnnouncementIcon: "https://i.imgur.com/HbkZyB7.png"
|
||||
|
||||
AnnouncementStarter: "What would you like to announce?"
|
||||
|
||||
# --------------------------
|
||||
# Moderation Configuration
|
||||
# --------------------------
|
||||
|
||||
ChatLog_Title: "Chat Log"
|
||||
ChatLogChannel: "chat-logs"
|
||||
ChatLogColour: "#1BA30C"
|
||||
ChatLog_Thumbnail: "https://cdn.iconscout.com/icon/free/png-256/chat-2639493-2187526.png"
|
||||
ChatLogSavedMessage: "📝 **Channel Transcript Saved!**"
|
||||
|
||||
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"
|
||||
|
||||
BlacklistTitle: "Blacklisted User"
|
||||
BlacklistColour: "#000000"
|
||||
|
||||
# --------------------------
|
||||
# Command Configuration
|
||||
# --------------------------
|
||||
|
||||
# --- User Commands ---
|
||||
|
||||
HelpCommand: "help"
|
||||
LinksCommand: "links"
|
||||
PingCommand: "ping"
|
||||
SuggestCommand: "suggest"
|
||||
|
||||
# --- Ticket Commands ---
|
||||
|
||||
NewTicket: "ticket"
|
||||
CloseTicket: "close"
|
||||
AddUser: "add"
|
||||
RemoveUser: "remove"
|
||||
RenameTicket: "rename"
|
||||
|
||||
# --- Staff/Admin Commands ---
|
||||
|
||||
ChatLog: "transcript"
|
||||
BotSay: "say"
|
||||
PurgeMessage: "purge"
|
||||
|
||||
AnnounceCommand: "announce"
|
||||
BanUser: "ban"
|
||||
KickUser: "kick"
|
||||
BlacklistUser: "blacklist"
|
||||
|
||||
# --------------------------
|
||||
# Messages Configuration
|
||||
# --------------------------
|
||||
|
||||
# --- Command Messages ---
|
||||
|
||||
BotSayDesc: "Say something with the bot"
|
||||
ChatLogDesc: "Get a transcript of a channel"
|
||||
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"
|
||||
BanDesc: "Ban a member from this server."
|
||||
KickDesc: "Kick a member from this server."
|
||||
PurgeDesc: "Purge messages from the chat."
|
||||
BlacklistDesc: "Decline a member to open a ticket"
|
||||
|
||||
# Error / Warning 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!"
|
||||
Regular → Executable
+8
-8
@@ -1,4 +1,4 @@
|
||||
// SupportBot Utility
|
||||
// SupportBot Utils
|
||||
// Ticket Numbers
|
||||
|
||||
const discord = require("discord.js")
|
||||
@@ -21,14 +21,14 @@ class TicketNumberID {
|
||||
|
||||
static get(guildId) {
|
||||
|
||||
let ticketnumberID = JSON.parse(fs.readFileSync("./storage/tickets.json", "utf8"));
|
||||
let ticketnumberID = JSON.parse(fs.readFileSync("./storage/TicketID.json", "utf8"));
|
||||
|
||||
if (!ticketnumberID[guildId]) {
|
||||
ticketnumberID[guildId] = {
|
||||
id: 0
|
||||
}
|
||||
|
||||
fs.writeFileSync("./storage/tickets.json", JSON.stringify(ticketnumberID, null, 4), err => {
|
||||
fs.writeFileSync("./storage/TicketID.json", JSON.stringify(ticketnumberID, null, 4), err => {
|
||||
if (err) console.log(err);
|
||||
});
|
||||
|
||||
@@ -41,13 +41,13 @@ class TicketNumberID {
|
||||
}
|
||||
|
||||
static set(guildId, value) {
|
||||
let ticketnumberID = JSON.parse(fs.readFileSync("./storage/tickets.json", "utf8"));
|
||||
let ticketnumberID = JSON.parse(fs.readFileSync("./storage/TicketID.json", "utf8"));
|
||||
|
||||
ticketnumberID[guildId] = {
|
||||
id: value
|
||||
}
|
||||
|
||||
fs.writeFileSync("./storage/tickets.json", JSON.stringify(ticketnumberID, null, 4), err => {
|
||||
fs.writeFileSync("./storage/TicketID.json", JSON.stringify(ticketnumberID, null, 4), err => {
|
||||
if (err) console.log(err);
|
||||
});
|
||||
|
||||
@@ -55,13 +55,13 @@ class TicketNumberID {
|
||||
}
|
||||
|
||||
static reset(guildId) {
|
||||
let ticketnumberID = JSON.parse(fs.readFileSync("./storage/tickets.json", "utf8"));
|
||||
let ticketnumberID = JSON.parse(fs.readFileSync("./storage/TicketID.json", "utf8"));
|
||||
|
||||
ticketnumberID[guildId] = {
|
||||
id: 0
|
||||
}
|
||||
|
||||
fs.writeFileSync("./storage/tickets.json", JSON.stringify(ticketnumberID, null, 4), err => {
|
||||
fs.writeFileSync("./storage/TicketID.json", JSON.stringify(ticketnumberID, null, 4), err => {
|
||||
if (err) console.log(err);
|
||||
});
|
||||
|
||||
@@ -69,4 +69,4 @@ class TicketNumberID {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = TicketNumberID;
|
||||
module.exports = TicketNumberID;
|
||||
Reference in new issue
Block a user