Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0827f55d43 | ||
|
|
ba6ff8c342 | ||
|
|
c0b7dc2737 | ||
|
|
ab6abd453b | ||
|
|
77921aca75 | ||
|
|
a8f91c4814 | ||
|
|
7780fa792c | ||
|
|
41e4c376ec | ||
|
|
09aad61cfe | ||
|
|
31ac81428f | ||
|
|
60daab82d2 | ||
|
|
e7a0544004 | ||
|
|
ff0364bba8 | ||
|
|
a3b64be351 | ||
|
|
eae370e346 | ||
|
|
0d86b50a83 | ||
|
|
543b9028a3 | ||
|
|
867f12d11f | ||
|
|
462781ea6a | ||
|
|
c300ab6459 | ||
|
|
448d8f3007 | ||
|
|
faa53b0af1 | ||
|
|
8e53b8d9a6 | ||
|
|
5678567baa | ||
|
|
1c30f73bb1 | ||
|
|
bd3dbc3033 | ||
|
|
3c312ab8d3 | ||
|
|
7284785db0 | ||
|
|
4e543ea490 | ||
|
|
4d3540126f | ||
|
|
6c29f0d792 | ||
|
|
c85df7c40f | ||
|
|
4f6ff575ce | ||
|
|
aaf3890f71 | ||
|
|
4f9837d991 | ||
|
|
2e2eb008c6 | ||
|
|
fa7074bb59 | ||
|
|
18a7def050 | ||
|
|
40e9cf5fe5 | ||
|
|
6ce049a57e | ||
|
|
d4c4eac710 | ||
|
|
28ec96e5e8 | ||
|
|
a20fe8eb06 | ||
|
|
7d1d9b881d | ||
|
|
c116e6cbb0 | ||
|
|
a3ebf0a33b | ||
|
|
ea6ef022e7 | ||
|
|
683e29196a | ||
|
|
71694d7082 | ||
|
|
c5d5656fb6 | ||
|
|
b1fdbee5f8 | ||
|
|
70405a1cd0 | ||
|
|
3d7e81169f | ||
|
|
fa7c8c7219 | ||
|
|
358a25f522 | ||
|
|
690169a409 | ||
|
|
0ec4cc5a51 | ||
|
|
0b7dbaf368 | ||
|
|
940c445182 | ||
|
|
d8a90c9aa5 | ||
|
|
89ee8fceca | ||
|
|
68b55a2d33 | ||
|
|
8cc2e7747f | ||
|
|
4e6ac3a294 | ||
|
|
732e22ea7b | ||
|
|
ac0d9981f8 | ||
|
|
23f7310760 | ||
|
|
02a9ce6bac | ||
|
|
069665358f | ||
|
|
2cf6d69127 | ||
|
|
870435061d | ||
|
|
53ad906491 | ||
|
|
01399e343b | ||
|
|
a0bdec4c42 | ||
|
|
914f2057d8 | ||
|
|
ed9b9dca79 | ||
|
|
f6d4383ff6 | ||
|
|
b6ccf30ae4 | ||
|
|
48e44a0d38 | ||
|
|
735998b48c | ||
|
|
d94eefddb7 | ||
|
|
5a65b4df17 | ||
|
|
15a839a310 | ||
|
|
9730c61962 | ||
|
|
1805c041a6 | ||
|
|
f0bde93d5f | ||
|
|
1ed7412f92 | ||
|
|
1f5ea2d25b | ||
|
|
ff4c8f0e85 | ||
|
|
5c3dd878b8 | ||
|
|
20f0d91c75 | ||
|
|
894e48756f | ||
|
|
aef199b292 | ||
|
|
9b884cd941 | ||
|
|
b22d813cee | ||
|
|
0981566cbe | ||
|
|
0647aa435a | ||
|
|
58179f98e9 | ||
|
|
05fe62536b | ||
|
|
241d41e220 | ||
|
|
34d6134c24 | ||
|
|
702d1d1998 | ||
|
|
e43a5fd5a3 | ||
|
|
4ed9a7b7f5 | ||
|
|
d8ba76e395 | ||
|
|
448004abca | ||
|
|
7b0db34fb1 | ||
|
|
a7e7d5b372 | ||
|
|
9768628e8b | ||
|
|
6c0328b2fd | ||
|
|
6bf7d879e2 | ||
|
|
f25490f1ad | ||
|
|
31eee78535 | ||
|
|
4ed2aff1b7 | ||
|
|
6f05545be6 | ||
|
|
dfec8a0e4f | ||
|
|
47b730111b | ||
|
|
59ba27c36f | ||
|
|
b501164c38 | ||
|
|
1b795087bf | ||
|
|
7063edc10f | ||
|
|
c02abcb760 | ||
|
|
2d1a20dcc6 | ||
|
|
65156d4b20 | ||
|
|
951cedb190 | ||
|
|
11442f320d | ||
|
|
33df21f656 | ||
|
|
19ab208678 | ||
|
|
59b9651575 | ||
|
|
c1c1f1767a | ||
|
|
dda8a5180c | ||
|
|
34d558412f | ||
|
|
be77ee1903 | ||
|
|
fc571d6c73 | ||
|
|
7ca5a97535 | ||
|
|
730239ba8d | ||
|
|
9069e23188 | ||
|
|
366203fe21 | ||
|
|
f23f15c972 | ||
|
|
8432290a70 | ||
|
|
ceddd503f8 | ||
|
|
51ad35f72b | ||
|
|
5631b24a14 | ||
|
|
f9da25643d | ||
|
|
75bed3f5dd | ||
|
|
d4576dfc21 | ||
|
|
31bad3c2e5 | ||
|
|
a3c0e81e04 | ||
|
|
b5cf721efb | ||
|
|
95063398aa | ||
|
|
2da25c5566 | ||
|
|
a72c1ab380 | ||
|
|
87b9301e20 | ||
|
|
d0a6bed727 | ||
|
|
29881fbf28 | ||
|
|
4f05ad6546 | ||
|
|
36fc9aae6c | ||
|
|
fb3f87c685 | ||
|
|
a4c0eeb9b3 | ||
|
|
c64f249fd0 | ||
|
|
48b542293f | ||
|
|
95e92970c9 | ||
|
|
afdb16da07 | ||
|
|
0a230cfab9 | ||
|
|
c752a07ad0 | ||
|
|
cc5a6b7317 | ||
|
|
d93991ad86 | ||
|
|
5c98376a8c | ||
|
|
28699f0ff0 | ||
|
|
e3576b17b1 | ||
|
|
17c49b2b03 | ||
|
|
dcc00d8d1f | ||
|
|
05a772eee2 | ||
|
|
59dd291dc6 | ||
|
|
f0a791e354 | ||
|
|
94db6cff7b | ||
|
|
72a02bf6d2 | ||
|
|
cf99209887 | ||
|
|
ff7ed49905 | ||
|
|
ecd17a51df | ||
|
|
63b08f8c12 | ||
|
|
3077772aff | ||
|
|
f40aa9ed14 | ||
|
|
4ae6dc3a69 | ||
|
|
bdb8389d8d | ||
|
|
f7254c7ec7 | ||
|
|
3701156362 | ||
|
|
575d25f5ad | ||
|
|
698b82c7d3 | ||
|
|
eaa9da6d2e | ||
|
|
ca7294a0e3 | ||
|
|
5281ffce60 | ||
|
|
2f84fd3b33 | ||
|
|
bef270da74 | ||
|
|
bdf839ffca | ||
|
|
b1b2ead0d8 | ||
|
|
0b74473c64 | ||
|
|
2fb189cf5c | ||
|
|
24a29639e9 | ||
|
|
50258dc359 | ||
|
|
d9c6b7698f | ||
|
|
f042f34ae2 | ||
|
|
c087edc14f |
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
|
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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
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
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
<h1 align="center">SupportBot</h1>
|
> #### SupportBot
|
||||||
<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>
|
> - SupportBot is a free to use discord ticket system that is highly customisable to your own brand,
|
||||||
Version 5.2
|
Why use a branded ticket bot when you have the ability to match your ticket bot with your servers name.
|
||||||
<hr>
|
>
|
||||||
|
> - Our Support team is over at [Discord](https://discord.com/invite/jspKFcE) ready to assist with any questions, concerns or setup information regarding SupportBot.
|
||||||
|
>
|
||||||
|
> - [Download via Polymart](https://polymart.org/resource/supportbot-1-discord-ticket-bot.518)
|
||||||
|
> - [Download via MC-Market](https://www.mc-market.org/resources/8940/)
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
theme: jekyll-theme-cayman
|
|
||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Help Command
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
// location for the addons configuration, to keep it simple we generate a settings folder within the addons directory.
|
||||||
|
const example = yaml.load(fs.readFileSync('./addons/settings/exampleaddon.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: example.ExampleAddonCommand,
|
||||||
|
description: example.ExampleAddonDesc,
|
||||||
|
|
||||||
|
execute(message, args) {
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
message.channel.send(example.ExampleAddonMessage)
|
||||||
|
}
|
||||||
|
};
|
||||||
Vendored
BIN
Binary file not shown.
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
#
|
||||||
|
# SupportBot, Created by Emerald Services
|
||||||
|
# Example Addon
|
||||||
|
#
|
||||||
|
|
||||||
|
ExampleAddonCommand: "exampleaddon"
|
||||||
|
ExampleAddonDesc: "This is the default/example addon for SupportBot."
|
||||||
|
|
||||||
|
ExampleAddonMessage: "> :white_check_mark: This is the **default** addon for SupportBot. You can download addons from our website, https://emeraldservices.xyz/"
|
||||||
@@ -1,52 +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.cache.find(staffRole => staffRole.name === supportbot.StaffRole);
|
|
||||||
|
|
||||||
const rolerequired = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
|
|
||||||
|
|
||||||
const outsideticket = new Discord.MessageEmbed()
|
|
||||||
.setTitle("Incorrect Channel")
|
|
||||||
.setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`)
|
|
||||||
.setColor(supportbot.WarningColour);
|
|
||||||
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.cache.get(args[0]));
|
|
||||||
|
|
||||||
const cantfinduser = new Discord.MessageEmbed()
|
|
||||||
.setTitle("Invalid User!")
|
|
||||||
.setDescription(`:warning: This user doesn't exist, Are they in this server?\n\nTry Again:\`${supportbot.Prefix}${supportbot.Add_Command} <user#0000>\``)
|
|
||||||
.setColor(supportbot.WarningColour);
|
|
||||||
if(!rUser) return message.channel.send({embed: cantfinduser});
|
|
||||||
|
|
||||||
message.channel.updateOverwrite(rUser, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
|
|
||||||
|
|
||||||
const useradded = new Discord.MessageEmbed()
|
|
||||||
.setColor(supportbot.SuccessColour)
|
|
||||||
.setTitle("User Added")
|
|
||||||
.setDescription(`👍 ${rUser} has been added to this ticket`)
|
|
||||||
.setTimestamp();
|
|
||||||
message.channel.send({embed: useradded});
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: supportbot.Add_Command,
|
|
||||||
};
|
|
||||||
Executable
+65
@@ -0,0 +1,65 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Add User
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: supportbot.AddUser,
|
||||||
|
description: supportbot.AddUserDesc,
|
||||||
|
|
||||||
|
execute(message, args) {
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.AddUser}!`);
|
||||||
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff)
|
||||||
|
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin)
|
||||||
|
|
||||||
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Permissions!")
|
||||||
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${supportbot.Staff}\` or \`${supportbot.Admin}\``)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (message.member.roles.cache.has(SupportStaff.id) || message.member.roles.cache.has(Admins.id)) {
|
||||||
|
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
||||||
|
const Exists = new Discord.MessageEmbed()
|
||||||
|
.setTitle("No Ticket Found!")
|
||||||
|
.setDescription(`${supportbot.NoValidTicket}`)
|
||||||
|
.setColor(supportbot.WarningColour);
|
||||||
|
message.channel.send({ embed: Exists });
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
|
||||||
|
const UserNotExist = new Discord.MessageEmbed()
|
||||||
|
.setTitle("User Not Found!")
|
||||||
|
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${supportbot.AddUser} <user#0000>\``)
|
||||||
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
|
if (!rUser) return message.channel.send({ embed: UserNotExist });
|
||||||
|
|
||||||
|
message.channel.updateOverwrite(rUser, {
|
||||||
|
VIEW_CHANNEL: true,
|
||||||
|
CREATE_INVITE: false,
|
||||||
|
SEND_MESSAGES: true,
|
||||||
|
READ_MESSAGES: true
|
||||||
|
});
|
||||||
|
|
||||||
|
const Complete = new Discord.MessageEmbed()
|
||||||
|
.setTitle("User Added!")
|
||||||
|
.setDescription(supportbot.AddedUser.replace(/%user%/g, rUser.id))
|
||||||
|
.setTimestamp()
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({ embed: Complete });
|
||||||
|
} else {
|
||||||
|
|
||||||
|
return message.channel.send({ embed: NoPerms });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
Regular → Executable
+65
-47
@@ -1,55 +1,73 @@
|
|||||||
// SupportBot
|
// SupportBot, Created by Emerald Services
|
||||||
// Created by © 2020 Emerald Services
|
// Announce
|
||||||
// Command: Announce (including @everyone)
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client();
|
const fs = require("fs");
|
||||||
|
|
||||||
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'));
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
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 == "true") message.delete();
|
||||||
|
|
||||||
|
let locateChannel = message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.name === supportbot.AnnouncementChannel);
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.AnnounceCommand}!`);
|
||||||
|
|
||||||
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Channel")
|
||||||
|
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.AnnouncementChannel}`)
|
||||||
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
|
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
||||||
|
|
||||||
|
let Admins = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin);
|
||||||
|
|
||||||
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Permissions!")
|
||||||
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${Admins.name}\``)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (!message.member.roles.cache.has(Admins.id))
|
||||||
|
return message.channel.send({ embed: NoPerms });
|
||||||
|
|
||||||
|
|
||||||
|
const embed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> **${supportbot.AnnouncementStarter}**`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({ embed: embed });
|
||||||
|
|
||||||
|
let announcement = []
|
||||||
|
message.channel.awaitMessages(response => response.content.length > 2, {
|
||||||
|
max: 1,
|
||||||
|
time: 500000,
|
||||||
|
errors: ['time'],
|
||||||
|
}).then((collected) => {
|
||||||
|
announcement.push(collected.map(r => r.content));
|
||||||
|
|
||||||
|
locateChannel.send('@everyone')
|
||||||
|
const AnnouncementEmbed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.AnnouncementTitle)
|
||||||
|
.setThumbnail(supportbot.AnnouncementIcon)
|
||||||
|
.setDescription(announcement)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL());
|
||||||
|
|
||||||
|
locateChannel.send({ embed: AnnouncementEmbed }).then(async function(msg) {
|
||||||
|
const AnnouncementComplete = new Discord.MessageEmbed()
|
||||||
|
.setColor(supportbot.SuccessColour)
|
||||||
|
.setDescription(`:white_check_mark: You have successfully created an announcement. <#${locateChannel.id}>`)
|
||||||
|
message.channel.send({ embed: AnnouncementComplete })
|
||||||
|
})
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.StaffRole);
|
};
|
||||||
|
|
||||||
const rolerequired = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
|
|
||||||
|
|
||||||
const embed = new Discord.MessageEmbed()
|
|
||||||
.setTitle(`${supportbot.Announcement_Title}`)
|
|
||||||
.setDescription(args.join(" "))
|
|
||||||
.setTimestamp()
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL)
|
|
||||||
|
|
||||||
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Announcement_Channel}`)
|
|
||||||
|
|
||||||
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.Announcement_Channel}\`\n\nError Code: \`SB-03\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
if(!locateChannel) return message.channel.send(errornochannel);
|
|
||||||
|
|
||||||
locateChannel.send(supportbot.everyone).then((msg) => {
|
|
||||||
locateChannel.send(embed);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
const AccSuccessEmbed = new Discord.MessageEmbed()
|
|
||||||
.setTitle("Announcement Created")
|
|
||||||
.setDescription(`👍 Successfully sent your announcement to <#${locateChannel.id}>`)
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
message.channel.send({embed: AccSuccessEmbed});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: supportbot.Announcement_Command,
|
|
||||||
}
|
|
||||||
+110
@@ -0,0 +1,110 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Say Command
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const { execute } = require("./help");
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: supportbot.BanUser,
|
||||||
|
description: supportbot.BanDesc,
|
||||||
|
|
||||||
|
execute(message, args, member) {
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin);
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.BanUser}!`);
|
||||||
|
|
||||||
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Permissions!")
|
||||||
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (!message.member.roles.cache.has(SupportStaff.id))
|
||||||
|
return message.channel.send({ embed: NoPerms });
|
||||||
|
|
||||||
|
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel);
|
||||||
|
|
||||||
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Channel")
|
||||||
|
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
|
||||||
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
|
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
||||||
|
|
||||||
|
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
|
||||||
|
|
||||||
|
const embed1 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :x: Please provide a reason to ban.\n\n`Try Again!`")
|
||||||
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
|
if (!args[0]) return message.channel.send({
|
||||||
|
embed: embed1
|
||||||
|
});
|
||||||
|
|
||||||
|
const embed2 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :detective: **Hmm!** Can\'t seem tp find this user.\n\n`Are they in the server?`")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if (!user) return message.channel.send({
|
||||||
|
embed: embed2
|
||||||
|
})
|
||||||
|
|
||||||
|
const embed3 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :x: **Err No!** Cannot punish this user!\n\n`Reason: Their permissions and or roles are greater than mine.`")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if(!user.bannable) return message.channel.send({
|
||||||
|
embed: embed3
|
||||||
|
});
|
||||||
|
|
||||||
|
const embed4 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :joy: **OML!** Did you really just try to ban yourself!")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if(user.id === message.author.id) return message.channel.send({
|
||||||
|
embed: embed4
|
||||||
|
});
|
||||||
|
|
||||||
|
let reason = args.slice(1).join(" ");
|
||||||
|
|
||||||
|
if(!reason) reason = 'No Reason Provided.';
|
||||||
|
|
||||||
|
const embed5 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :thinking: **Hmm** Something seems to have gone wrong.\n\n`Check your system for errors!`")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
user.ban({ days: supportbot.DaysBannedFor, reason: `${reason}` }).catch(err => {
|
||||||
|
message.channel.send({ embed: embed5 })
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const successEmbed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> :white_check_mark: **OOF!** ${user} has been banned!`)
|
||||||
|
.setColor(supportbot.SuccessColour)
|
||||||
|
message.channel.send({
|
||||||
|
embed: successEmbed
|
||||||
|
})
|
||||||
|
|
||||||
|
const logEmbed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.BanTitle)
|
||||||
|
.setThumbnail(supportbot.ModThumbnail)
|
||||||
|
.addField('Banned User:', user)
|
||||||
|
.addField('Staff Member', message.author)
|
||||||
|
.addField('Reason:', reason)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
.setColor(supportbot.BanLogColour)
|
||||||
|
.setTimestamp()
|
||||||
|
|
||||||
|
locateChannel.send({ embed: logEmbed })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
Executable
+53
@@ -0,0 +1,53 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Say Command
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const { execute } = require("./help");
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: supportbot.BotSay,
|
||||||
|
description: supportbot.BotSayDesc,
|
||||||
|
|
||||||
|
execute(message, args) {
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff);
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.BotSay}!`);
|
||||||
|
|
||||||
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Permissions!")
|
||||||
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (!message.member.roles.cache.has(SupportStaff.id))
|
||||||
|
return message.channel.send({ embed: NoPerms });
|
||||||
|
|
||||||
|
|
||||||
|
const embed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> **What would you like me to say!**`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({ embed: embed });
|
||||||
|
|
||||||
|
let announcement = []
|
||||||
|
message.channel.awaitMessages(response => response.content.length > 2, {
|
||||||
|
max: 1,
|
||||||
|
time: 500000,
|
||||||
|
errors: ['time'],
|
||||||
|
}).then((collected) => {
|
||||||
|
announcement.push(collected.map(r => r.content));
|
||||||
|
|
||||||
|
const AnnouncementEmbed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(announcement)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
message.channel.send({ embed: AnnouncementEmbed })
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
Regular → Executable
+105
-72
@@ -1,71 +1,68 @@
|
|||||||
// SupportBot
|
// SupportBot, Created by Emerald Services
|
||||||
// Created by © 2020 Emerald Services
|
// Close Command
|
||||||
// Command: Close
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client();
|
|
||||||
|
|
||||||
const fs = require("fs");
|
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'));
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
/**
|
module.exports = {
|
||||||
* @param {Discord.Message} message
|
name: supportbot.CloseTicket,
|
||||||
*/
|
description: supportbot.CloseTicketDesc,
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
execute(message, args) {
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.CloseTicket}!`);
|
||||||
|
|
||||||
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}`);
|
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 });
|
||||||
|
|
||||||
if ( !message.channel.name.startsWith( `${supportbot.Ticket_Channel_Name}-` ) ) {
|
return;
|
||||||
const embed = new Discord.MessageEmbed()
|
|
||||||
.setTitle("Incorrect Channel")
|
|
||||||
.setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`)
|
|
||||||
.setColor(supportbot.WarningColour);
|
|
||||||
message.channel.send(embed);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const closeRequestEmbed = new Discord.MessageEmbed()
|
}
|
||||||
.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)
|
|
||||||
|
|
||||||
|
if (supportbot.CloseConfirmation === "true") {
|
||||||
|
const CloseTicketRequest = new Discord.MessageEmbed()
|
||||||
|
.setTitle(`**${supportbot.ClosingTicket}**`)
|
||||||
|
.setDescription(`Please confirm by repeating the following word.. \`${supportbot.ClosingConfirmation_Word}\` `)
|
||||||
|
.setColor(supportbot.EmbedColour);
|
||||||
|
|
||||||
message.channel.send(closeRequestEmbed).then( m => {
|
message.channel.send(CloseTicketRequest).then(m => {
|
||||||
message.channel.awaitMessages( response => response.content.toLowerCase() === supportbot.Closure_Confirm_Word, {
|
message.channel.awaitMessages( response => response.content.toLowerCase() === supportbot.ClosingConfirmation_Word, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 20000,
|
time: 20000,
|
||||||
errors: [ 'time' ],
|
errors: [ 'time' ],
|
||||||
|
|
||||||
} ).then( collected => {
|
|
||||||
let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.Transcript_Log);
|
}).then( collected => {
|
||||||
|
let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog);
|
||||||
|
let user = message.author;
|
||||||
|
let reason = args.join(" ") || "No Reason Provided.";
|
||||||
|
|
||||||
let user = message.author;
|
let name = message.channel.name;
|
||||||
|
let ticketChannel = message.channel;
|
||||||
|
|
||||||
let reason = args.join(" ") || "No reason provided.";
|
message.channel.send(`**${supportbot.ClosingTicket}**`)
|
||||||
|
|
||||||
let name = message.channel.name;
|
.then(() => {
|
||||||
let ticketChannel = message.channel;
|
const logEmbed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.TranscriptTitle)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
.addField("Closed By", message.author.tag)
|
||||||
|
.addField("Reason", reason);
|
||||||
|
|
||||||
message.channel.send(`**${supportbot.Ticket_Closing}**`)
|
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
|
||||||
.then(() => {
|
|
||||||
const logEmbed = new Discord.MessageEmbed()
|
|
||||||
.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.messages.fetch({ limit: 100 })
|
|
||||||
.then( msgs => {
|
|
||||||
let txt = '';
|
let txt = '';
|
||||||
|
|
||||||
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
|
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
|
||||||
|
|
||||||
txt += `${message.guild.name}\n`;
|
txt += `${message.guild.name}\n`;
|
||||||
txt += `#${ticketChannel.name}\n`;
|
txt += `#${ticketChannel.name}\n`;
|
||||||
txt += `${msgs.size} messages\n\n\n`;
|
txt += `${msgs.size} messages\n\n\n`;
|
||||||
@@ -76,41 +73,77 @@ exports.run = (bot, message, args) => {
|
|||||||
txt += `${msg.content}\n`;
|
txt += `${msg.content}\n`;
|
||||||
txt += `-----\n\n`;
|
txt += `-----\n\n`;
|
||||||
}
|
}
|
||||||
} );
|
});
|
||||||
|
|
||||||
// message.author.send( `A transcript has been generated for the ticket you closed.` );
|
|
||||||
// message.author.send( new Discord.Attachment( Buffer.from( txt ), `${name}.txt` ) );
|
|
||||||
|
|
||||||
logChannel.send(logEmbed).catch(err => {
|
logChannel.send(logEmbed).catch(err => {
|
||||||
message.reply(err)
|
message.reply(err)
|
||||||
})
|
})
|
||||||
|
|
||||||
logChannel.send( new Discord.MessageAttachment( Buffer.from( txt ), `${name}.txt` ) );
|
logChannel.send( new Discord.MessageAttachment( Buffer.from( txt ), `${name}.txt` ) );
|
||||||
|
|
||||||
message.channel.delete();
|
message.channel.delete();
|
||||||
|
|
||||||
// message.channel.messages.fetch( { limit: 100, before: msgs.last().id } )
|
})
|
||||||
|
})
|
||||||
|
|
||||||
// .then( msg => {
|
|
||||||
// const merged = msgs.concat( msg );
|
|
||||||
// const output = merged.reduce( ( out, msg ) => {
|
|
||||||
// out += `[${message.createdAt}] ${message.author.tag}: ${message.cleanContent ? message.cleanContent.replace( /\n/g, '\r\n' ) : ''}\r\n`;
|
|
||||||
// return out;
|
|
||||||
// }, '' );
|
|
||||||
|
|
||||||
// log.send( { files: [ { attachment: Buffer.from( output, 'utf8' ), name: `${name}.txt` } ] } ).then( c.delete() ).catch( console.error ); // sends the file to logs
|
|
||||||
// return log.send( embed1 ).catch( console.error );
|
|
||||||
// } )
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}).catch( () => {
|
}).catch( () => {
|
||||||
m.edit('The request to close the ticket has timed out.').then( m2 => m2.delete( 3000 ) );
|
m.edit('The request to close the ticket has timed out.').then( m2 => m2.delete( 3000 ) );
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (supportbot.CloseConfirmation === "false") {
|
||||||
|
|
||||||
exports.help = {
|
let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog);
|
||||||
name: supportbot.Close_Command,
|
let user = message.author;
|
||||||
}
|
let reason = args.join(" ") || "No Reason Provided.";
|
||||||
|
|
||||||
|
let name = message.channel.name;
|
||||||
|
let ticketChannel = message.channel;
|
||||||
|
|
||||||
|
message.channel.send(`**${supportbot.ClosingTicket}**`)
|
||||||
|
|
||||||
|
.then(() => {
|
||||||
|
const logEmbed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.TranscriptTitle)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
.addField("Closed By", message.author.tag)
|
||||||
|
.addField("Reason", reason);
|
||||||
|
|
||||||
|
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
|
||||||
|
let txt = '';
|
||||||
|
|
||||||
|
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
|
||||||
|
txt += `${message.guild.name}\n`;
|
||||||
|
txt += `#${ticketChannel.name}\n`;
|
||||||
|
txt += `${msgs.size} messages\n\n\n`;
|
||||||
|
|
||||||
|
msgs.forEach( msg => {
|
||||||
|
if ( msg.content ) {
|
||||||
|
txt += `----- ${msg.author.tag} at ${msg.createdAt}\n`;
|
||||||
|
txt += `${msg.content}\n`;
|
||||||
|
txt += `-----\n\n`;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
logChannel.send(logEmbed).catch(err => {
|
||||||
|
message.reply(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
logChannel.send( new Discord.MessageAttachment( Buffer.from( txt ), `${name}.txt` ) );
|
||||||
|
|
||||||
|
message.channel.delete();
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}).catch( () => {
|
||||||
|
m.edit('The request to close the ticket has timed out.').then( m2 => m2.delete( 3000 ) );
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1,70 +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.cache.find(staffRole => staffRole.name === supportbot.StaffRole);
|
|
||||||
|
|
||||||
const rolerequired = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
|
|
||||||
|
|
||||||
const outsideticket = new Discord.MessageEmbed()
|
|
||||||
.setTitle("Incorrect Channel")
|
|
||||||
.setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`)
|
|
||||||
.setColor(supportbot.WarningColour);
|
|
||||||
if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket});
|
|
||||||
|
|
||||||
const log = message.guild.channels.cache.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.MessageEmbed()
|
|
||||||
.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.messages.fetch({ limit: 100 })
|
|
||||||
|
|
||||||
.then(msgs => {
|
|
||||||
message.channel.messages.fetch({ 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,
|
|
||||||
}
|
|
||||||
+50
-39
@@ -1,52 +1,63 @@
|
|||||||
// SupportBot
|
// SupportBot, Created by Emerald Services
|
||||||
// Created by © 2020 Emerald Services
|
// Help Command
|
||||||
// Command: Help
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const fs = require("fs");
|
||||||
|
|
||||||
const fs = require("fs")
|
|
||||||
const yaml = require('js-yaml');
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
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 == "true") message.delete();
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.HelpCommand}!`);
|
||||||
|
|
||||||
|
if (supportbot.helpmenu_withkey = "true") {
|
||||||
|
let generalCommands = "";
|
||||||
|
generalCommands += `**${supportbot.Prefix}${supportbot.HelpCommand}** ${supportbot.HelpDesc}\n`;
|
||||||
|
generalCommands += `**${supportbot.Prefix}${supportbot.LinksCommand}** ${supportbot.LinkDesc}\n`;
|
||||||
|
generalCommands += `**${supportbot.Prefix}${supportbot.SuggestCommand}** ${supportbot.SuggestionDesc}\n`;
|
||||||
|
generalCommands += `**${supportbot.Prefix}${supportbot.PingCommand}** ${supportbot.PingDesc}\n`;
|
||||||
|
|
||||||
|
let supportCommands = "";
|
||||||
|
supportCommands += `**${supportbot.Prefix}${supportbot.NewTicket} [reason]** ${supportbot.NewTicketDesc}\n`
|
||||||
|
supportCommands += `**${supportbot.Prefix}${supportbot.CloseTicket} [reason]** ${supportbot.CloseTicketDesc}\n`
|
||||||
|
|
||||||
|
let staffCommands = "";
|
||||||
|
staffCommands += `**${supportbot.Prefix}${supportbot.AddUser} <user#0000>** ${supportbot.AddUserDesc}\n`
|
||||||
|
staffCommands += `**${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>** ${supportbot.RemoveUserDesc}\n`
|
||||||
|
staffCommands += `**${supportbot.Prefix}${supportbot.BotSay}** ${supportbot.BotSayDesc}\n`
|
||||||
|
staffCommands += `**${supportbot.Prefix}${supportbot.PurgeMessage}** ${supportbot.PurgeDesc}\n`
|
||||||
|
staffCommands += `**${supportbot.Prefix}${supportbot.AnnounceCommand}** ${supportbot.AnnounceDesc} \`Admin Only\`\n`
|
||||||
|
staffCommands += `**${supportbot.Prefix}${supportbot.BanUser}** ${supportbot.BanDesc} \`Admin Only\` \n`
|
||||||
|
staffCommands += `**${supportbot.Prefix}${supportbot.KickUser}** ${supportbot.KickDesc} \`Admin Only\` \n`
|
||||||
|
|
||||||
|
const HelpEmbed1 = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.Bot_Name)
|
||||||
|
.setThumbnail(message.author.displayAvatarURL())
|
||||||
|
|
||||||
let userCommands = "";
|
.addFields(
|
||||||
userCommands += `**${supportbot.Prefix}${supportbot.Ticket_Command} <reason>**: Create a support ticket\n`;
|
{ name: '🖥️ General Commands\n', value: `${generalCommands}\n`, inline: false },
|
||||||
userCommands += `**${supportbot.Prefix}${supportbot.Close_Command}**: Close your support ticket\n`;
|
{ name: '🎫 Support Commands\n', value: `${supportCommands}\n`, inline: false },
|
||||||
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 staffCommands = "";
|
.setColor(supportbot.EmbedColour)
|
||||||
staffCommands += `**${supportbot.Prefix}${supportbot.Announcement_Command} <message>**: Create a bot announcement\n`;
|
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL());
|
||||||
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`;
|
|
||||||
|
|
||||||
const embed = new Discord.MessageEmbed()
|
if (message.member.roles.cache.some(role => role.name === supportbot.Staff || supportbot.Admin)) {
|
||||||
.setTitle(supportbot.Bot_Name)
|
HelpEmbed1.addFields(
|
||||||
.addField("🟨 User Commands", userCommands)
|
{ name: '🔐 Staff Commands\n', value: `${staffCommands}\n`, inline: false },
|
||||||
.addField("🎫 Support Commands", supportCommands)
|
)
|
||||||
.addField("🔐 Staff Commands", staffCommands)
|
}
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL);
|
|
||||||
|
|
||||||
message.channel.send(embed);
|
message.channel.send({
|
||||||
|
embed: HelpEmbed1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: supportbot.Help_Command,
|
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Say Command
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const { execute } = require("./help");
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: supportbot.KickUser,
|
||||||
|
description: supportbot.KickDesc,
|
||||||
|
|
||||||
|
execute(message, args, member) {
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin);
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.BanUser}!`);
|
||||||
|
|
||||||
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Permissions!")
|
||||||
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (!message.member.roles.cache.has(SupportStaff.id))
|
||||||
|
return message.channel.send({ embed: NoPerms });
|
||||||
|
|
||||||
|
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel);
|
||||||
|
|
||||||
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Channel")
|
||||||
|
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
|
||||||
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
|
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
||||||
|
|
||||||
|
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
|
||||||
|
|
||||||
|
const embed1 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :x: Please provide a reason to kick.\n\n`Try Again!`")
|
||||||
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
|
if (!args[0]) return message.channel.send({
|
||||||
|
embed: embed1
|
||||||
|
});
|
||||||
|
|
||||||
|
const embed2 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :detective: **Hmm!** Can\'t seem tp find this user.\n\n`Are they in the server?`")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if (!user) return message.channel.send({
|
||||||
|
embed: embed2
|
||||||
|
})
|
||||||
|
|
||||||
|
const embed3 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :x: **Err No!** Cannot punish this user!\n\n`Reason: Their permissions and or roles are greater than mine.`")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if(!user.kickable) return message.channel.send({
|
||||||
|
embed: embed3
|
||||||
|
});
|
||||||
|
|
||||||
|
const embed4 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :joy: **OML!** Did you really just try to kick yourself!")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if(user.id === message.author.id) return message.channel.send({
|
||||||
|
embed: embed4
|
||||||
|
});
|
||||||
|
|
||||||
|
let reason = args.slice(1).join(" ");
|
||||||
|
|
||||||
|
if(!reason) reason = 'No Reason Provided.';
|
||||||
|
|
||||||
|
const embed5 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :thinking: **Hmm** Something seems to have gone wrong.\n\n`Check your system for errors!`")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
user.kick({ reason: `${reason}` }).catch(err => {
|
||||||
|
message.channel.send({ embed: embed5 })
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const successEmbed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> :white_check_mark: **OOF!** ${user} has been kicked!`)
|
||||||
|
.setColor(supportbot.SuccessColour)
|
||||||
|
|
||||||
|
message.channel.send({
|
||||||
|
embed: successEmbed
|
||||||
|
})
|
||||||
|
|
||||||
|
const logEmbed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.KickTitle)
|
||||||
|
.setThumbnail(supportbot.ModThumbnail)
|
||||||
|
.addField('Kicked User:', user)
|
||||||
|
.addField('Staff Member', message.author)
|
||||||
|
.addField('Reason:', reason)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
.setColor(supportbot.KickLogColour)
|
||||||
|
.setTimestamp()
|
||||||
|
|
||||||
|
locateChannel.send({ embed: logEmbed })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
Regular → Executable
+23
-23
@@ -1,36 +1,36 @@
|
|||||||
// SupportBot
|
// SupportBot, Created by Emerald Services
|
||||||
// Created by © 2020 Emerald Services
|
// Links Command
|
||||||
// Command: Links
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client();
|
|
||||||
|
|
||||||
const fs = require("fs");
|
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'));
|
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 == "true") message.delete();
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.LinksCommand}!`);
|
||||||
|
|
||||||
let botLinks = supportbot.LINKS;
|
const LinksEmbed = new Discord.MessageEmbed()
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
let links = '';
|
let botLinks = supportbot.LINKS;
|
||||||
|
|
||||||
|
let links = '';
|
||||||
|
|
||||||
|
for ( let name in botLinks ) {
|
||||||
|
links += `[${name}](${botLinks[ name ]})\n`;
|
||||||
|
};
|
||||||
|
|
||||||
for ( let name in botLinks ) {
|
LinksEmbed.addField(supportbot.LinksTitle, links)
|
||||||
links += `[${name}](${botLinks[ name ]})\n`;
|
|
||||||
};
|
|
||||||
|
|
||||||
let embed = new Discord.MessageEmbed()
|
message.channel.send({ embed: LinksEmbed });
|
||||||
.setTitle(supportbot.LINKS_TITLE)
|
|
||||||
.setDescription(links)
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
.setFooter(supportbot.EmbedFooter);
|
|
||||||
message.channel.send(embed);
|
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: supportbot.Link_Command,
|
|
||||||
};
|
};
|
||||||
@@ -1,38 +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.cache.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
|
||||||
let lockedRole = message.guild.roles.cache.find(lc => lc.name === `${supportbot.locked_role}`)
|
|
||||||
|
|
||||||
const rolerequired = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
|
|
||||||
|
|
||||||
message.channel.overwritePermissions(lockedRole, { READ_MESSAGES: false, SEND_MESSAGES: false });
|
|
||||||
message.channel.overwritePermissions(staffGroup, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
|
||||||
|
|
||||||
const lockmsg = new Discord.MessageEmbed()
|
|
||||||
.setDescription(":white_check_mark: **Chat Locked**")
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
message.channel.send(lockmsg);
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: supportbot.Lockchat_Command,
|
|
||||||
};
|
|
||||||
Executable
+272
@@ -0,0 +1,272 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Ticket Command
|
||||||
|
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const bot = new Discord.Client()
|
||||||
|
|
||||||
|
const fs = require("fs")
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
const TicketNumberID = require('../utils/TicketNumber.js');
|
||||||
|
|
||||||
|
const reacted = [];
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: supportbot.NewTicket,
|
||||||
|
description: supportbot.NewTicketDesc,
|
||||||
|
|
||||||
|
execute(message, args) {
|
||||||
|
if (!message.channel.name === supportbot.ReactionChannel) {
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.NewTicket}!`);
|
||||||
|
|
||||||
|
// Ticket ID
|
||||||
|
let ticketNumberID = TicketNumberID.pad(message.guild.id);
|
||||||
|
|
||||||
|
// Ticket Subject
|
||||||
|
const TicketSubject = args || supportbot.NoTicketSubject;
|
||||||
|
|
||||||
|
// Ticket Exists
|
||||||
|
const TicketExists = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Ticket Exists!")
|
||||||
|
.setDescription(`${supportbot.TicketExists}`)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (message.guild.channels.cache.find(SupportTicket => SupportTicket.name === `${supportbot.TicketChannel}-${ticketNumberID}`))
|
||||||
|
return message.channel.send({ embed: TicketExists });
|
||||||
|
|
||||||
|
message.guild.channels.create(`${supportbot.TicketChannel}-${ticketNumberID}`, {
|
||||||
|
type: "text",
|
||||||
|
}).then(SupportTicket => {
|
||||||
|
|
||||||
|
let AllUsers = message.guild.roles.cache.find(everyone => everyone.name === '@everyone')
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff)
|
||||||
|
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin)
|
||||||
|
|
||||||
|
let DeptRole1 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_1}`)
|
||||||
|
let DeptRole2 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_2}`)
|
||||||
|
let DeptRole3 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_3}`)
|
||||||
|
|
||||||
|
SupportTicket.updateOverwrite(AllUsers, {
|
||||||
|
VIEW_CHANNEL: false,
|
||||||
|
READ_MESSAGES: false,
|
||||||
|
SEND_MESSAGES: false,
|
||||||
|
})
|
||||||
|
|
||||||
|
SupportTicket.updateOverwrite(message.author, {
|
||||||
|
VIEW_CHANNEL: true,
|
||||||
|
READ_MESSAGES: true,
|
||||||
|
SEND_MESSAGES: true,
|
||||||
|
})
|
||||||
|
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, {
|
||||||
|
VIEW_CHANNEL: true,
|
||||||
|
READ_MESSAGES: true,
|
||||||
|
SEND_MESSAGES: true,
|
||||||
|
})
|
||||||
|
|
||||||
|
SupportTicket.updateOverwrite(Admins, {
|
||||||
|
VIEW_CHANNEL: true,
|
||||||
|
READ_MESSAGES: true,
|
||||||
|
SEND_MESSAGES: true,
|
||||||
|
})
|
||||||
|
|
||||||
|
// Ticket Category
|
||||||
|
let TicketCategory = message.guild.channels.cache.find(category => category.name === supportbot.TicketCategory)
|
||||||
|
|
||||||
|
if (TicketCategory) {
|
||||||
|
SupportTicket.setParent(TicketCategory.id)
|
||||||
|
} else {
|
||||||
|
if (message.guild.channels.cache.get(supportbot.TicketCategory)) {
|
||||||
|
SupportTicket.setParent(message.guild.channels.cache.get(supportbot.TicketCategory).id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ticket Created, Message Sent
|
||||||
|
|
||||||
|
if (supportbot.AllowTicketMentions === "true") {
|
||||||
|
SupportTicket.send(`<@${message.author.id}>`)
|
||||||
|
}
|
||||||
|
|
||||||
|
const TicketMessage = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.Ticket_Title.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username))
|
||||||
|
.setDescription(supportbot.TicketMessage.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username))
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if (supportbot.TicketSubject === "embed") {
|
||||||
|
|
||||||
|
if (TicketSubject != 'No Reason Provided.') {
|
||||||
|
TicketMessage.addFields({ name: 'Reason', value: TicketSubject })
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.TicketSubject === "description") {
|
||||||
|
|
||||||
|
if (TicketSubject != 'No Reason Provided.') {
|
||||||
|
SupportTicket.setTopic(`Reason: ${TicketSubject} - User ID: ${message.author.id} - Ticket: ${SupportTicket.name}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.TicketDepartments === "true") {
|
||||||
|
TicketMessage.addFields({ name: 'Departments', value: `${supportbot.DepartmentEmoji_1} **${supportbot.DepartmentTitle_1}**\n${supportbot.DepartmentEmoji_2} **${supportbot.DepartmentTitle_2}**\n${supportbot.DepartmentEmoji_3} **${supportbot.DepartmentTitle_3}**` })
|
||||||
|
}
|
||||||
|
|
||||||
|
SupportTicket.send({ embed: TicketMessage }).then( async function(msg) {
|
||||||
|
|
||||||
|
const Emoji_1 = supportbot.DepartmentEmoji_1;
|
||||||
|
const Emoji_2 = supportbot.DepartmentEmoji_2;
|
||||||
|
const Emoji_3 = supportbot.DepartmentEmoji_3;
|
||||||
|
|
||||||
|
reacted[ticketNumberID] = false;
|
||||||
|
|
||||||
|
if (supportbot.TicketDepartments === "true") {
|
||||||
|
await msg.react(Emoji_1);
|
||||||
|
await msg.react(Emoji_2);
|
||||||
|
await msg.react(Emoji_3);
|
||||||
|
let filter = (reaction, user) => {
|
||||||
|
if (user.id !== message.author.id) return;
|
||||||
|
if (typeof reacted[ticketNumberID] !== "boolean") return;
|
||||||
|
delete reacted[ticketNumberID];
|
||||||
|
if (reaction.emoji.name === Emoji_1) {
|
||||||
|
SupportTicket.updateOverwrite(message.author.id, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
SupportTicket.updateOverwrite(Admins, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
SupportTicket.updateOverwrite(DeptRole1, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
|
||||||
|
if (supportbot.AllowStaff === "true") {
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.AllowStaff === "false") {
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: false, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
}
|
||||||
|
|
||||||
|
const Department1 = new Discord.MessageEmbed()
|
||||||
|
.setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_1} Department**. Please provide us information regarding your query.`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
SupportTicket.send({ embed: Department1 });
|
||||||
|
|
||||||
|
if (supportbot.AllowTicketMentions === "true") {
|
||||||
|
SupportTicket.send(`@here`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reaction.emoji.name === Emoji_2) {
|
||||||
|
SupportTicket.updateOverwrite(message.author.id, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
SupportTicket.updateOverwrite(Admins, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
SupportTicket.updateOverwrite(DeptRole2, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
|
||||||
|
if (supportbot.AllowStaff === "true") {
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.AllowStaff === "false") {
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: false, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
}
|
||||||
|
|
||||||
|
const Department2 = new Discord.MessageEmbed()
|
||||||
|
.setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_2} Department**. Please provide us information regarding your query.`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
SupportTicket.send({ embed: Department2 });
|
||||||
|
|
||||||
|
if (supportbot.AllowTicketMentions === "true") {
|
||||||
|
SupportTicket.send(`@here`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reaction.emoji.name === `${Emoji_3}`) {
|
||||||
|
SupportTicket.updateOverwrite(message.author.id, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
SupportTicket.updateOverwrite(Admins, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
SupportTicket.updateOverwrite(DeptRole3, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: false, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
|
||||||
|
if (supportbot.AllowStaff === "true") {
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.AllowStaff === "false") {
|
||||||
|
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: false, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
||||||
|
}
|
||||||
|
|
||||||
|
const Department3 = new Discord.MessageEmbed()
|
||||||
|
.setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_3} Department**. Please provide us information regarding your query.`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
SupportTicket.send({ embed: Department3 });
|
||||||
|
|
||||||
|
if (supportbot.AllowTicketMentions === "true") {
|
||||||
|
SupportTicket.send(`@here`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return [Emoji_1, Emoji_2, Emoji_3].includes(reaction.emoji.name) && user.id !== message.author.id;
|
||||||
|
}
|
||||||
|
msg.awaitReactions(filter, {
|
||||||
|
max: 4,
|
||||||
|
time: 60000,
|
||||||
|
errors: ['time']
|
||||||
|
}).then(async collected => {
|
||||||
|
});
|
||||||
|
|
||||||
|
setTimeout(async function() {
|
||||||
|
if (typeof reacted[ticketNumberID] == "boolean") {
|
||||||
|
delete reacted[ticketNumberID];
|
||||||
|
//delete channel because didn't react in a minute
|
||||||
|
}
|
||||||
|
}, 60000);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
if (message.channel.name === supportbot.ReactionChannel) {
|
||||||
|
const CreatedTicket = new Discord.MessageEmbed()
|
||||||
|
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username))
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({embed: CreatedTicket}).then((r) => {
|
||||||
|
r.delete({ timeout:5000 })
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
const CreatedTicket = new Discord.MessageEmbed()
|
||||||
|
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username))
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({embed: CreatedTicket});
|
||||||
|
}
|
||||||
|
fs.writeFileSync("./storage/SupportTickets.json", '{\n "ticket": "' + SupportTicket.name + '", \n "id":' + message.author.id + "\n}", (err) => {
|
||||||
|
if (!err) return;
|
||||||
|
console.error(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
// Ticket Logs
|
||||||
|
|
||||||
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
|
.setTitle("SupportBot Error!")
|
||||||
|
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.TicketLog}\`\n\nError Code: \`SB-03\``)
|
||||||
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
|
const TicketLogs = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Ticket Log")
|
||||||
|
.setThumbnail(supportbot.Ticket_Thumbnail)
|
||||||
|
.addFields(
|
||||||
|
{ name: 'Ticket', value: `<#${SupportTicket.id}>` },
|
||||||
|
{ name: 'User', value: `<@${message.author.id}>` },
|
||||||
|
)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
|
||||||
|
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === supportbot.TicketLog)
|
||||||
|
|
||||||
|
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
||||||
|
|
||||||
|
locateChannel.send({ embed: TicketLogs });
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
Regular → Executable
+17
-16
@@ -1,26 +1,27 @@
|
|||||||
// SupportBot
|
// SupportBot, Created by Emerald Services
|
||||||
// Created by © 2020 Emerald Services
|
// Ping Command
|
||||||
// Command: Ping
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client();
|
|
||||||
|
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const yaml = require('js-yaml');
|
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
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}`);
|
execute(message, args) {
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.PingCommand}!`)
|
||||||
|
|
||||||
const embed = new Discord.MessageEmbed()
|
let ping = Date.now() - message.createdTimestamp + " ms";
|
||||||
.setDescription(`:ping_pong: **Pong!** \`${bot.ping}ms\` `)
|
|
||||||
.setColor(supportbot.EmbedColour)
|
const PingCommandEmbed = new Discord.MessageEmbed()
|
||||||
message.channel.send(embed).catch(console.error);
|
.setDescription(`🏓 **Pong!** \`${Date.now() - message.createdTimestamp}ms\``)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
message.channel.send({ embed: PingCommandEmbed });
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: supportbot.Ping_Command,
|
|
||||||
}
|
|
||||||
@@ -1,50 +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.cache.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
|
||||||
|
|
||||||
const rolerequired = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
|
|
||||||
|
|
||||||
const embed = new Discord.MessageEmbed()
|
|
||||||
.setTitle(`${supportbot.Poll_Title}`)
|
|
||||||
.setDescription(args.join(" "))
|
|
||||||
.setTimestamp()
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL)
|
|
||||||
|
|
||||||
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Poll_Channel}`)
|
|
||||||
|
|
||||||
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.Poll_Channel}\`\n\nError Code: \`SB-03\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
if(!locateChannel) return message.channel.send(errornochannel);
|
|
||||||
|
|
||||||
locateChannel.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,82 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Say Command
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const { execute } = require("./help");
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: supportbot.PurgeMessage,
|
||||||
|
description: supportbot.PurgeDesc,
|
||||||
|
|
||||||
|
execute(message, args, member) {
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff);
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.PurgeMessage}!`);
|
||||||
|
|
||||||
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Permissions!")
|
||||||
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (!message.member.roles.cache.has(SupportStaff.id))
|
||||||
|
return message.channel.send({ embed: NoPerms });
|
||||||
|
|
||||||
|
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel);
|
||||||
|
|
||||||
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Channel")
|
||||||
|
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
|
||||||
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
|
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
||||||
|
|
||||||
|
const embed1 = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> :thinking: **Hmm!** Please enter a valid number of message to purge!\n\n\`${supportbot.Prefix}${supportbot.PurgeMessage} <message count>\` `)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (!args[0]) return message.channel.send({
|
||||||
|
embed: embed1
|
||||||
|
});
|
||||||
|
|
||||||
|
const messagePrune = parseInt(args[0])
|
||||||
|
|
||||||
|
const embed2 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :person_facepalming: **Grr!** Can you count? That ain't a number :joy:")
|
||||||
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
|
if (isNaN(messagePrune)) return message.reply({
|
||||||
|
embed: embed2
|
||||||
|
})
|
||||||
|
|
||||||
|
message.channel.bulkDelete(messagePrune).then(() => {
|
||||||
|
|
||||||
|
const embed3 = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> :recycle: \`${args[0]} messages\` **have been purged!** `)
|
||||||
|
.setColor(supportbot.ErrorColour)
|
||||||
|
message.channel.send({
|
||||||
|
embed: embed3
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const logEmbed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.PruneLogTitle)
|
||||||
|
.setThumbnail(supportbot.PruneThumbnail)
|
||||||
|
.addField('Messages Purged', `\`${args[0]} messages\``)
|
||||||
|
.addField('Staff Member', message.author)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
.setColor(supportbot.PruneColour)
|
||||||
|
.setTimestamp()
|
||||||
|
|
||||||
|
locateChannel.send({ embed: logEmbed })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
@@ -1,53 +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.cache.find(staffRole => staffRole.name === supportbot.StaffRole);
|
|
||||||
|
|
||||||
const rolerequired = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
|
|
||||||
|
|
||||||
const outsideticket = new Discord.MessageEmbed()
|
|
||||||
.setTitle("Incorrect Channel")
|
|
||||||
.setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`)
|
|
||||||
.setColor(supportbot.WarningColour);
|
|
||||||
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.cache.get(args[0]));
|
|
||||||
|
|
||||||
const cantfinduser = new Discord.MessageEmbed()
|
|
||||||
.setTitle("Invalid User!")
|
|
||||||
.setDescription(`:warning: This user doesn't exist, Are they in this server?\n\nTry Again:\`${supportbot.Prefix}${supportbot.Remove_Command} <user#0000>\``)
|
|
||||||
.setColor(supportbot.WarningColour);
|
|
||||||
if(!rUser) return message.channel.send({embed: cantfinduser});
|
|
||||||
|
|
||||||
message.channel.updateOverwrite(rUser, { VIEW_CHANNEL: false, CREATE_INVITE: false, SEND_MESSAGES: false, READ_MESSAGES: false });
|
|
||||||
|
|
||||||
const useradded = new Discord.MessageEmbed()
|
|
||||||
.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
+64
@@ -0,0 +1,64 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Remove User
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: supportbot.RemoveUser,
|
||||||
|
description: supportbot.RemoveUserDesc,
|
||||||
|
|
||||||
|
execute(message, args) {
|
||||||
|
if (supportbot.DeleteMessages == "true") message.delete();
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.RemoveUser}!`);
|
||||||
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff)
|
||||||
|
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin)
|
||||||
|
|
||||||
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Permissions!")
|
||||||
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${supportbot.Staff}\` or \`${supportbot.Admin}\``)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (message.member.roles.cache.has(SupportStaff.id) || message.member.roles.cache.has(Admins.id)) {
|
||||||
|
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
||||||
|
const Exists = new Discord.MessageEmbed()
|
||||||
|
.setTitle("No Ticket Found!")
|
||||||
|
.setDescription(`${supportbot.NoValidTicket}`)
|
||||||
|
.setColor(supportbot.WarningColour);
|
||||||
|
message.channel.send({ embed: Exists });
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
|
||||||
|
const UserNotExist = new Discord.MessageEmbed()
|
||||||
|
.setTitle("User Not Found!")
|
||||||
|
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>\``)
|
||||||
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
|
if (!rUser) return message.channel.send({ embed: UserNotExist });
|
||||||
|
|
||||||
|
message.channel.updateOverwrite(rUser, {
|
||||||
|
VIEW_CHANNEL: false,
|
||||||
|
CREATE_INVITE: false,
|
||||||
|
SEND_MESSAGES: false,
|
||||||
|
READ_MESSAGES: false
|
||||||
|
});
|
||||||
|
|
||||||
|
const Complete = new Discord.MessageEmbed()
|
||||||
|
.setTitle("User Removed!")
|
||||||
|
.setDescription(supportbot.RemovedUser.replace(/%user%/g, rUser.id))
|
||||||
|
.setTimestamp()
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({ embed: Complete });
|
||||||
|
} else {
|
||||||
|
return message.channel.send({ embed: NoPerms });
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1,53 +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.cache.find(staffRole => staffRole.name === supportbot.StaffRole);
|
|
||||||
|
|
||||||
const rolerequired = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
|
|
||||||
|
|
||||||
const outsideticket = new Discord.MessageEmbed()
|
|
||||||
.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.MessageEmbed()
|
|
||||||
.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 locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Ticket_Logs}`)
|
|
||||||
|
|
||||||
const errornochannel = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.Ticket_Logs}\`\n\nError Code: \`SB-03\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
if(!locateChannel) return message.channel.send(errornochannel);
|
|
||||||
|
|
||||||
locateChannel.send(logEmbed)
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: supportbot.Rename_Command,
|
|
||||||
}
|
|
||||||
@@ -1,69 +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.cache.find(staffRole => staffRole.name === `${supportbot.StaffRole}`);
|
|
||||||
|
|
||||||
if(!staffGroup) {
|
|
||||||
message.reply(rolemissing).catch(err => {
|
|
||||||
console.error(err);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
const rolerequired = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
|
|
||||||
.setColor(supportbot.ErrorColour)
|
|
||||||
|
|
||||||
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
|
|
||||||
if(!message.member.roles.cache.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.MessageEmbed()
|
|
||||||
.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 locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Report_Channel}`)
|
|
||||||
if(!locateChannel) {
|
|
||||||
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.Report_Channel}\`\n\nError Code: \`SB-03\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
if(!locateChannel) return message.channel.send(errornochannel);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
locateChannel.send(embed);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: supportbot.Report_Command
|
|
||||||
}
|
|
||||||
@@ -1,38 +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.cache.find(staffRole => staffRole.name === supportbot.StaffRole);
|
|
||||||
|
|
||||||
const rolerequired = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
|
|
||||||
|
|
||||||
const embed = new Discord.MessageEmbed()
|
|
||||||
.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
+54
-40
@@ -1,48 +1,62 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
// SupportBot
|
// Suggest Command
|
||||||
// Created by © 2020 Emerald Services
|
|
||||||
// Command: Say
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client();
|
|
||||||
|
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const yaml = require('js-yaml');
|
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
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 == "true") message.delete();
|
||||||
|
|
||||||
|
let locateChannel = message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.name === supportbot.SuggestionChannel);
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.SuggestCommand}!`);
|
||||||
|
|
||||||
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Channel")
|
||||||
|
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.SuggestionChannel}\``)
|
||||||
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
|
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
||||||
|
|
||||||
|
const embed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> **${supportbot.SuggestionStarter}**`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({ embed: embed });
|
||||||
|
|
||||||
|
let suggestion = []
|
||||||
|
message.channel.awaitMessages(response => response.content.length > 2, {
|
||||||
|
max: 1,
|
||||||
|
time: 500000,
|
||||||
|
errors: ['time'],
|
||||||
|
}).then((collected) => {
|
||||||
|
suggestion.push(collected.map(r => r.content));
|
||||||
|
|
||||||
|
const SuggestionMessage = new Discord.MessageEmbed()
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
|
||||||
|
.setTitle(supportbot.SuggestionTitle)
|
||||||
|
.setDescription(`\`\`\`${suggestion}\`\`\``)
|
||||||
|
|
||||||
|
.addFields( { name: "From", value: `<@${message.author.id}>`, inline: false }, )
|
||||||
|
|
||||||
|
locateChannel.send({ embed: SuggestionMessage }).then(async function(msg) {
|
||||||
|
msg.react(supportbot.SuggestReact_1).then(() => msg.react(supportbot.SuggestReact_2));
|
||||||
|
});
|
||||||
|
|
||||||
|
const SuggestionComplete = new Discord.MessageEmbed()
|
||||||
|
.setColor(supportbot.SuccessColour)
|
||||||
|
.setDescription(`:white_check_mark: Your suggestion has been successfully created. <#${locateChannel.id}>`)
|
||||||
|
message.channel.send({ embed: SuggestionComplete })
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
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.MessageEmbed()
|
|
||||||
.setTitle(`${supportbot.Suggestion_Title}`)
|
|
||||||
.setDescription(`\`\`\`${args.join(" ")}\`\`\`\nFrom <@${message.author.id}>`)
|
|
||||||
.setFooter(`${supportbot.EmbedFooter}`, message.author.avatarURL)
|
|
||||||
.setTimestamp(new Date())
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
|
|
||||||
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Suggestion_Channel}`)
|
|
||||||
|
|
||||||
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.Suggestion_Channel}\`\n\nError Code: \`SB-03\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
if(!locateChannel) return message.channel.send(errornochannel);
|
|
||||||
|
|
||||||
locateChannel.send(SuggestionEmbed)
|
|
||||||
|
|
||||||
.then(async function(msg) {
|
|
||||||
msg.react(supportbot.suggestyes).then(() => msg.react(supportbot.suggestno));
|
|
||||||
});
|
|
||||||
|
|
||||||
const SuggestionSuccessEmbed = new Discord.MessageEmbed()
|
|
||||||
.setDescription(`👍 Suggestion has been successfully created\nYou can view your suggestion in <#${locateChannel.id}>`)
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
message.channel.send(SuggestionSuccessEmbed);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: supportbot.Suggest_Command,
|
|
||||||
}
|
|
||||||
@@ -1,166 +0,0 @@
|
|||||||
// SupportBot
|
|
||||||
// Created by © 2020 Emerald Services
|
|
||||||
// Command: Ticket
|
|
||||||
|
|
||||||
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.MessageEmbed()
|
|
||||||
.setDescription(`:x: Cannot create a ticket because **${supportbot.Ticket_Channel_Name}-${ticketNumberID}** already exists.`)
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
|
|
||||||
// Ticket Creation
|
|
||||||
if (message.guild.channels.cache.find(TicketChannel => TicketChannel.name === `${supportbot.Ticket_Channel_Name}-` + message.author.username)) return message.channel.send(alreadyopen);
|
|
||||||
message.guild.channels.create(`${supportbot.Ticket_Channel_Name}-${ticketNumberID}`, {
|
|
||||||
type: 'text',
|
|
||||||
}).then(TicketChannel => {
|
|
||||||
|
|
||||||
// Roles
|
|
||||||
let staff = message.guild.roles.cache.find(supportRole => supportRole.name === `${supportbot.StaffRole}`)
|
|
||||||
let everyone = message.guild.roles.cache.find(everyoneRole => everyoneRole.name === supportbot.everyone)
|
|
||||||
let department = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_1}`)
|
|
||||||
let department2 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_2}`)
|
|
||||||
let department3 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_3}`)
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
TicketChannel.updateOverwrite(everyone, { VIEW_CHANNEL: false });
|
|
||||||
TicketChannel.updateOverwrite(message.author, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: false, READ_MESSAGES: true });
|
|
||||||
TicketChannel.updateOverwrite(staff, { VIEW_CHANNEL: true, CREATE_INVITE: false, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
|
|
||||||
TicketChannel.updateOverwrite(department, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
|
|
||||||
TicketChannel.updateOverwrite(department2, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
|
|
||||||
TicketChannel.updateOverwrite(department3, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
|
|
||||||
|
|
||||||
// Category
|
|
||||||
let category = message.guild.channels.cache.find(c => c.name === supportbot.category);
|
|
||||||
if (category) {
|
|
||||||
TicketChannel.setParent(category.id);
|
|
||||||
} else {
|
|
||||||
if (message.guild.channels.cache.get(supportbot.category)) {
|
|
||||||
TicketChannel.setParent(message.guild.channels.cache.get(supportbot.category).id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const ticketopened = new Discord.MessageEmbed()
|
|
||||||
.setTitle(":white_check_mark: Support Ticket Created")
|
|
||||||
.setDescription(`<@${message.author.id}> your support ticket created successfully`)
|
|
||||||
.addField("Your Ticket:", `<#${TicketChannel.id}>`)
|
|
||||||
.setColor(supportbot.SuccessColour)
|
|
||||||
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.MessageEmbed()
|
|
||||||
.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.updateOverwrite(message.author, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
|
|
||||||
TicketChannel.updateOverwrite(staff, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
|
|
||||||
TicketChannel.updateOverwrite(department, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
|
|
||||||
|
|
||||||
const dept1 = new Discord.MessageEmbed()
|
|
||||||
.setDescription(`You have requested to contact ${department}. Please wait patiently for someone to reach out to you.`)
|
|
||||||
.setColor(supportbot.SuccessColour)
|
|
||||||
TicketChannel.send(dept1)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (reaction.emoji.name === `${Emoji_2}`) {
|
|
||||||
TicketChannel.updateOverwrite(message.author, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
|
|
||||||
TicketChannel.updateOverwrite(staff, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
|
|
||||||
TicketChannel.updateOverwrite(department2, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
|
|
||||||
|
|
||||||
const dept2 = new Discord.MessageEmbed()
|
|
||||||
.setDescription(`You have requested to contact ${department2}. Please wait patiently for someone to reach out to you.`)
|
|
||||||
.setColor(supportbot.SuccessColour)
|
|
||||||
TicketChannel.send(dept2)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (reaction.emoji.name === `${Emoji_3}`) {
|
|
||||||
TicketChannel.updateOverwrite(message.author, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
|
|
||||||
TicketChannel.updateOverwrite(staff, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
|
|
||||||
TicketChannel.updateOverwrite(department3, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
|
|
||||||
|
|
||||||
const dept3 = new Discord.MessageEmbed()
|
|
||||||
.setDescription(`You have requested to contact ${department3}. Please wait patiently for someone to reach out to you.`)
|
|
||||||
.setColor(supportbot.SuccessColour)
|
|
||||||
TicketChannel.send(dept3)
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
// Ticket Logging
|
|
||||||
const logEmbed = new Discord.MessageEmbed()
|
|
||||||
.setTitle(":ticket: Ticket Log")
|
|
||||||
.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 locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Ticket_Logs}`)
|
|
||||||
|
|
||||||
const errornochannel = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.Ticket_Logs}\`\n\nError Code: \`SB-03\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
if(!locateChannel) return message.channel.send(errornochannel);
|
|
||||||
|
|
||||||
locateChannel.send(logEmbed)
|
|
||||||
|
|
||||||
}).catch(err=>{console.error(err)});
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: supportbot.Ticket_Command,
|
|
||||||
};
|
|
||||||
@@ -1,38 +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.cache.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
|
||||||
let lockedRole = message.guild.roles.cache.find(lc => lc.name === `${supportbot.locked_role}`)
|
|
||||||
|
|
||||||
const rolerequired = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
|
|
||||||
|
|
||||||
message.channel.overwritePermissions(lockedRole, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
|
||||||
message.channel.overwritePermissions(staffGroup, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
|
||||||
|
|
||||||
const lockmsg = new Discord.MessageEmbed()
|
|
||||||
.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
+54
@@ -0,0 +1,54 @@
|
|||||||
|
// SupportBot 6.0, Created by Emerald Services
|
||||||
|
// Ready Event
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = async (bot, member) => {
|
||||||
|
|
||||||
|
if (supportbot.SystemMessages === "true") {
|
||||||
|
const SystemChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.SystemMessage_Channel)
|
||||||
|
|
||||||
|
if (!SystemChannel) return;
|
||||||
|
|
||||||
|
console.log(`[${supportbot.Bot_Name}]: ${member.user.username} has joined ${member.guild.name}!`)
|
||||||
|
console.log(supportbot.AutoRole_Role)
|
||||||
|
|
||||||
|
const role = member.guild.roles.cache.find(role => role.name === supportbot.AutoRole_Role)
|
||||||
|
|
||||||
|
member.roles.add(role).catch(console.error);
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Type === "embed") {
|
||||||
|
|
||||||
|
const GuildAddMember = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.Welcome_Title)
|
||||||
|
.setDescription(supportbot.WelcomeMessage.replace(/%member%/g, `<@!${member.user.id}>`).replace(/%guildname%/g, member.guild.name))
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Icon === "BOT") {
|
||||||
|
GuildAddMember.setThumbnail(bot.user.displayAvatarURL())
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Icon === "USER") {
|
||||||
|
GuildAddMember.setThumbnail(member.user.displayAvatarURL())
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_EmbedFooter === "true") {
|
||||||
|
GuildAddMember.setFooter(supportbot.EmbedFooter)
|
||||||
|
}
|
||||||
|
|
||||||
|
SystemChannel.send({ embed: GuildAddMember });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Type === "normal") {
|
||||||
|
SystemChannel.send(supportbot.WelcomeMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
Executable
+48
@@ -0,0 +1,48 @@
|
|||||||
|
// SupportBot 6.0, Created by Emerald Services
|
||||||
|
// Ready Event
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = async (bot, member) => {
|
||||||
|
|
||||||
|
if (supportbot.SystemMessages === "true") {
|
||||||
|
const SystemChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.SystemMessage_Channel)
|
||||||
|
|
||||||
|
if (!SystemChannel) return;
|
||||||
|
|
||||||
|
console.log(`[${supportbot.Bot_Name}]: ${member.user.username} has left ${member.guild.name}!`)
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Type === "embed") {
|
||||||
|
const GuildRemoveMember = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.Leave_Title)
|
||||||
|
.setDescription(supportbot.LeaveMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Icon === "BOT") {
|
||||||
|
GuildRemoveMember.setThumbnail(bot.user.displayAvatarURL())
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Icon === "USER") {
|
||||||
|
GuildRemoveMember.setThumbnail(member.user.displayAvatarURL())
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_EmbedFooter === "true") {
|
||||||
|
GuildRemoveMember.setFooter(supportbot.EmbedFooter)
|
||||||
|
}
|
||||||
|
|
||||||
|
SystemChannel.send({ embed: GuildRemoveMember });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Type === "normal") {
|
||||||
|
SystemChannel.send(supportbot.LeaveMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
Executable
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// SupportBot 6.0, Created by Emerald Services
|
||||||
|
// Message Event
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = async (bot, message) => {
|
||||||
|
if(message.author.bot) return;
|
||||||
|
if(message.channel.type === "dm") return;
|
||||||
|
if (message.content.indexOf(supportbot.Prefix) !== 0) return;
|
||||||
|
|
||||||
|
let messageArray = message.content.split(" ");
|
||||||
|
const args = message.content.slice(supportbot.Prefix.length).trim().split(/ +/g);
|
||||||
|
const command = args.shift().toLowerCase();
|
||||||
|
|
||||||
|
const cmd = bot.commands.get(command);
|
||||||
|
if(!cmd) return;
|
||||||
|
cmd.execute(message, args);
|
||||||
|
};
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
// SupportBot 6.0, Created by Emerald Services
|
||||||
|
// Message Reaction Event
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
const tickets = yaml.load(fs.readFileSync('./storage/ticketreaction.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = async (client, reaction, user) => {
|
||||||
|
|
||||||
|
let message = {
|
||||||
|
guild: reaction.message.channel.guild,
|
||||||
|
author: user,
|
||||||
|
content: "N/A",
|
||||||
|
channel: reaction.message.channel
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.ReactionTickets === true) {
|
||||||
|
if (reaction.message.id === tickets.ReactionMessage_ID) {
|
||||||
|
if (reaction.emoji.name == supportbot.ReactionEmoji || reaction.emoji.id == supportbot.ReactionEmoji) {
|
||||||
|
await reaction.users.remove(user.id)
|
||||||
|
|
||||||
|
try {
|
||||||
|
const cmd = client.commands.get(supportbot.NewTicket);
|
||||||
|
if(!cmd) return;
|
||||||
|
|
||||||
|
cmd.execute(message, message.content);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
// SupportBot 6.0, Created by Emerald Services
|
||||||
|
// Ready Event
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
const tickets = yaml.load(fs.readFileSync('./storage/ticketreaction.yml', 'utf8'));
|
||||||
|
|
||||||
|
|
||||||
|
module.exports = async (bot) => {
|
||||||
|
bot.user.setActivity(supportbot.BotActivity, {
|
||||||
|
type: supportbot.ActivityType,
|
||||||
|
url: supportbot.StreamingURL
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`)
|
||||||
|
console.log(`\u001b[37m`, `${supportbot.Bot_Name} has successfully connected to discord`)
|
||||||
|
console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`)
|
||||||
|
|
||||||
|
if (supportbot.ReactionTickets === true) {
|
||||||
|
let chan1 = bot.channels.cache.find(channel => channel.name === supportbot.ReactionChannel)
|
||||||
|
|
||||||
|
if (!chan1) {
|
||||||
|
console.log('\u001b[33m', "[WARN] Ticket reaction panel is not setup, You can do so via the configuration file!")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
chan1.messages.fetch(tickets.ReactionMessage_ID).catch(r => {
|
||||||
|
let embed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.ReactionMessage.replace(/%reaction_emoji%/g, supportbot.ReactionEmoji))
|
||||||
|
.setColor(supportbot.SuccessColour)
|
||||||
|
.setFooter(supportbot.EmbedFooter);
|
||||||
|
|
||||||
|
if (supportbot.ReactionPanel_Description === true) {
|
||||||
|
embed.setDescription(supportbot.ReactionDescription)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.ReactionPanel_Thumbnail === true) {
|
||||||
|
embed.setThumbnail(supportbot.ReactionThumbnail)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.ReactionPanel_Image === true) {
|
||||||
|
embed.setImage(supportbot.ReactionImage)
|
||||||
|
}
|
||||||
|
|
||||||
|
bot.channels.cache.find(channel => channel.name === supportbot.ReactionChannel).send({
|
||||||
|
embed: embed
|
||||||
|
}).then(r => {
|
||||||
|
let data = {
|
||||||
|
"ReactionMessage_ID": `${r.id}`
|
||||||
|
}
|
||||||
|
let yamlStr = yaml.dump(data);
|
||||||
|
fs.writeFileSync('./storage/ticketreaction.yml', yamlStr, 'utf8');
|
||||||
|
|
||||||
|
r.react(supportbot.ReactionEmoji);
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
@@ -1,12 +1,15 @@
|
|||||||
// ____ _ ____ _
|
// _________ __ __________ __
|
||||||
// / ___| _ _ _ __ _ __ ___ _ __| |_| __ ) ___ | |_
|
// / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||||
// \___ \| | | | '_ \| '_ \ / _ \| '__| __| _ \ / _ \| __|
|
// \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||||
// ___) | |_| | |_) | |_) | (_) | | | |_| |_) | (_) | |_
|
// / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||||
// |____/ \__,_| .__/| .__/ \___/|_| \__|____/ \___/ \__|
|
// /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||||
// |_| |_|
|
// \/ |__| |__| \/
|
||||||
// © 2020 Created by Emerald Services
|
//
|
||||||
// Licnese: MIT
|
// SupportBot version 6.1
|
||||||
// SupportBot v5.2
|
// Created by Emerald Services
|
||||||
|
// Installed with MIT License
|
||||||
|
//
|
||||||
|
// Support Server: discord.gg/jspKFcE
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
@@ -17,141 +20,73 @@ bot.commands = new Discord.Collection();
|
|||||||
const yaml = require('js-yaml');
|
const yaml = require('js-yaml');
|
||||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
fs.readdir("./commands/", (err, files) => {
|
const { promisify } = require("util");
|
||||||
if(err) console.log(err);
|
const readdir = promisify(require("fs").readdir);
|
||||||
|
|
||||||
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);
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
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) => {
|
const init = async () => {
|
||||||
if(err) console.log(err);
|
const evtFiles = await readdir("./events/");
|
||||||
|
|
||||||
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://emeraldservices.xyz/`);
|
|
||||||
|
|
||||||
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`, `${supportbot.Bot_Name} has successfully connected to discord`)
|
|
||||||
console.log(`\u001b[37m`, `You can download additional features from our marketplace https://emeraldservices.xyz/`)
|
|
||||||
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();
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
|
||||||
let autoGroup = message.guild.roles.cache.find(autoRole => autoRole.name === `${supportbot.AutoRole}`)
|
|
||||||
let deptGroup1 = message.guild.roles.cache.find(deptRole1 => deptRole1.name === `${supportbot.Department_Role_1}`)
|
|
||||||
let deptGroup2 = message.guild.roles.cache.find(deptRole2 => deptRole2.name === `${supportbot.Department_Role_2}`)
|
|
||||||
let deptGroup3 = message.guild.roles.cache.find(deptRole3 => deptRole3.name === `${supportbot.Department_Role_3}`)
|
|
||||||
|
|
||||||
const rolemissing = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Staff role missing, You cannot execute any commands as the following role does not exist with this server.\nThis role is configurable via **supportbot-config.yml**\n\nPlease create the role: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-01\``)
|
|
||||||
.setColor(supportbot.ErrorColour)
|
|
||||||
if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)})
|
|
||||||
|
|
||||||
const rolemissing1 = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Auto Role missing, You cannot execute any commands as the following role does not exist with this server.\nThis role is configurable via **supportbot-config.yml**\n\nPlease create the role: \`${supportbot.AutoRole}\`\n\nError Code: \`SB-01\``)
|
|
||||||
.setColor(supportbot.ErrorColour)
|
|
||||||
if (!autoGroup) return message.reply(rolemissing1).catch(err=>{console.error(err)})
|
|
||||||
|
|
||||||
const rolemissing2 = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Department Role missing, You cannot execute any commands as the following role does not exist with this server.\nThis role is configurable via **supportbot-config.yml**\n\nPlease create the role: \`${supportbot.Department_Role_1}\`\n\nError Code: \`SB-01\``)
|
|
||||||
.setColor(supportbot.ErrorColour)
|
|
||||||
if (!deptGroup1) return message.reply(rolemissing2).catch(err=>{console.error(err)})
|
|
||||||
|
|
||||||
const rolemissing3 = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Department Role missing, You cannot execute any commands as the following role does not exist with this server.\nThis role is configurable via **supportbot-config.yml**\n\nPlease create the role: \`${supportbot.Department_Role_2}\`\n\nError Code: \`SB-01\``)
|
|
||||||
.setColor(supportbot.ErrorColour)
|
|
||||||
if (!deptGroup2) return message.reply(rolemissing3).catch(err=>{console.error(err)})
|
|
||||||
|
|
||||||
const rolemissing4 = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Department Role missing, You cannot execute any commands as the following role does not exist with this server.\nThis role is configurable via **supportbot-config.yml**\n\nPlease create the role: \`${supportbot.Department_Role_3}\`\n\nError Code: \`SB-01\` `)
|
|
||||||
.setColor(supportbot.ErrorColour)
|
|
||||||
if (!deptGroup3) return message.reply(rolemissing4).catch(err=>{console.error(err)})
|
|
||||||
|
|
||||||
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.MessageEmbed()
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
.setThumbnail(member.user.avatarURL)
|
|
||||||
.setDescription(`:wave: ${member.user.username}\n${supportbot.WelcomeMessage}`)
|
|
||||||
|
|
||||||
channel.send(WelcomeMsg);
|
|
||||||
member.addRole(autorole).catch(console.error);
|
|
||||||
|
|
||||||
|
evtFiles.forEach((file, i) => {
|
||||||
|
const eventName = file.split(".")[0];
|
||||||
|
const event = require(`./events/${file}`);
|
||||||
|
|
||||||
|
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[31m`, `#${i + 1} Event Loaded: ${eventName.toProperCase()} `);
|
||||||
|
|
||||||
|
bot.on(eventName, event.bind(null, bot));
|
||||||
|
delete require.cache[require.resolve(`./events/${file}`)];
|
||||||
|
});
|
||||||
|
|
||||||
|
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `Successfully loaded ${evtFiles.length} events.`);
|
||||||
|
console.info(`\u001b[37m`, "-----------------------------------------------------------------------------");
|
||||||
|
};
|
||||||
|
|
||||||
|
init();
|
||||||
|
|
||||||
|
fs.readdir("./commands/", (err, files) => {
|
||||||
|
if (err) console.info(err, "error");
|
||||||
|
|
||||||
|
let jsfiles = files.filter((f) => f.split(".").pop() === "js");
|
||||||
|
|
||||||
|
if (jsfiles.length <= 0) {
|
||||||
|
console.log(`[${supportbot.Bot_Name}]: No commands found. Try to Re-download the resource`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
jsfiles.forEach((f, i) => {
|
||||||
|
let props = require(`./commands/${f}`);
|
||||||
|
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[31m`, `#${i + 1} Command Loaded: ${props.name.toProperCase()}`);
|
||||||
|
bot.commands.set(props.name, props);
|
||||||
|
});
|
||||||
|
|
||||||
|
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `Loaded ${jsfiles.length} commands!`);
|
||||||
|
console.info(`\u001b[37m`, "-----------------------------------------------------------------------------");
|
||||||
});
|
});
|
||||||
|
|
||||||
// [SupportBot] Leave Message
|
fs.readdir("./addons/", (err, files) => {
|
||||||
|
if (err) console.info(err, "error");
|
||||||
|
|
||||||
|
let jsfiles = files.filter((f) => f.split(".").pop() === "js");
|
||||||
|
|
||||||
bot.on("guildMemberRemove", (member) => {
|
if (jsfiles.length <= 0) {
|
||||||
let channel = member.guild.channels.find(channel => channel.name === `${supportbot.LeaveChannel}`)
|
console.log(`[${supportbot.Bot_Name}]: No addons found. You can download addons from https://emeraldservices.xyz`);
|
||||||
|
return;
|
||||||
const LeaveMsg= new Discord.MessageEmbed()
|
}
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
.setThumbnail(member.user.avatarURL)
|
jsfiles.forEach((f, i) => {
|
||||||
.setDescription(`:wave: ${member.user.username}\n${supportbot.LeaveMessage}`)
|
let props = require(`./addons/${f}`);
|
||||||
|
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[31m`, `#${i + 1} Command Loaded: ${props.name.toProperCase()}`);
|
||||||
channel.send(LeaveMsg);
|
bot.commands.set(props.name, props);
|
||||||
|
});
|
||||||
|
|
||||||
|
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `Loaded ${jsfiles.length} commands!`);
|
||||||
|
console.info(`\u001b[37m`, "-----------------------------------------------------------------------------");
|
||||||
});
|
});
|
||||||
|
|
||||||
bot.login(supportbot.Token);
|
bot.login(supportbot.Token);
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
SupportBot Language Compatibility
|
||||||
|
|
||||||
|
In order to switch languages simple remove the current existig configuration file and replace it with one of the files here renamnig the file to "supportbot-config.yml" from (for example) "supportbot-config_es.yml" to home directory of SupportBot.
|
||||||
|
|
||||||
|
-> Delete the existing supportbot-config.yml file
|
||||||
|
-> Download the new file for whatever language
|
||||||
|
-> Upload the file to SupportBot and rename it to supportbot-config.yml
|
||||||
|
-> Job Done, restart the bot :wink:
|
||||||
@@ -0,0 +1,229 @@
|
|||||||
|
# _________ __ __________ __
|
||||||
|
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||||
|
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||||
|
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||||
|
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||||
|
# \/ |__| |__| \/
|
||||||
|
#
|
||||||
|
# SupportBot version 6.1
|
||||||
|
# Created by Emerald Services
|
||||||
|
# Installed with MIT License
|
||||||
|
#
|
||||||
|
# Support Server: discord.gg/jspKFcE
|
||||||
|
|
||||||
|
# General Bot Configuration
|
||||||
|
|
||||||
|
Token: "BOT_TOKEN_HERE"
|
||||||
|
Prefix: "-"
|
||||||
|
Bot_Name: "SupportBot"
|
||||||
|
|
||||||
|
BotActivity: "-help | SupportBot"
|
||||||
|
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
|
||||||
|
# Must set ActivityType to STREAMING in order for Streaming URL to work in the bots status.
|
||||||
|
|
||||||
|
ActivityType: "PLAYING"
|
||||||
|
# Activity status can either be PLAYING, WATCHING, LISTENING or STREAMING.
|
||||||
|
|
||||||
|
DeleteMessages: "true"
|
||||||
|
|
||||||
|
# Embed Configuration
|
||||||
|
|
||||||
|
EmbedColour: "#04b545"
|
||||||
|
EmbedFooter: "SupportBot | The #1 Supportive Discord Bot"
|
||||||
|
|
||||||
|
ErrorColour: "#d12519"
|
||||||
|
SuccessColour: "#04b545"
|
||||||
|
WarningColour: "#fca117"
|
||||||
|
|
||||||
|
# Role Configuration
|
||||||
|
|
||||||
|
AutoRole: "true"
|
||||||
|
# By setting "AutoRole to 'true' the bot will automatically apply the role below when members joins. Set to 'false' to disable this feature.
|
||||||
|
AutoRole_Role: "Member"
|
||||||
|
LockdownRole: "@everyone"
|
||||||
|
|
||||||
|
Staff: "Staff"
|
||||||
|
Admin: "Admin"
|
||||||
|
|
||||||
|
# Help Configuration
|
||||||
|
|
||||||
|
HelpMenu_withKey: "false"
|
||||||
|
# If set to true, emojis will be used as a key to define the access level of commands.
|
||||||
|
|
||||||
|
|
||||||
|
# Ticket Configuration
|
||||||
|
|
||||||
|
TicketChannel: "ticket"
|
||||||
|
TicketCategory: "Tickets"
|
||||||
|
TicketLog: "ticket-logs"
|
||||||
|
TranscriptLog: "transcripts"
|
||||||
|
TicketSubject: "description"
|
||||||
|
# TicketSubject: "description" means that the subject (reason) of the ticket will be displayed upon the channel description if set to "embed" it will be displayed within the embed.
|
||||||
|
|
||||||
|
AllowTicketMentions: "true"
|
||||||
|
# Set to "true" to allow the ticket to mention the author and the support team.
|
||||||
|
# Set to "false" to dis-allow mentions within tickets.
|
||||||
|
|
||||||
|
# Ticket Panel (Ticket Reaction Create)
|
||||||
|
|
||||||
|
ReactionTickets: true
|
||||||
|
ReactionMessage: "React with %reaction_emoji% to create a Support Ticket!"
|
||||||
|
ReactionPanel_Description: true
|
||||||
|
ReactionDescription: "Create a support ticket to contact a member of staff."
|
||||||
|
ReactionChannel: "create-ticket"
|
||||||
|
ReactionEmoji: "📩"
|
||||||
|
# Custom Emojis: <:test:EMOJI_ID>
|
||||||
|
ReactionPanel_Thumbnail: true
|
||||||
|
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
|
||||||
|
ReactionPanel_Image: true
|
||||||
|
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
|
||||||
|
|
||||||
|
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
|
||||||
|
Ticket_Title: "Server Support | %ticketusername%"
|
||||||
|
TicketMessage: "Hello <@%ticketauthor%>, Thank you for creating a support ticket\nPlease wait patiently whilst a member of our team reaches out to you."
|
||||||
|
NoTicketSubject: "No Reason Provided!"
|
||||||
|
TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%>"
|
||||||
|
TranscriptTitle: "Ticket Transcript"
|
||||||
|
|
||||||
|
AddedUser: "👍 <@%user%> has been added to this ticket"
|
||||||
|
RemovedUser: "👍 <@%user%> has been removed from this ticket"
|
||||||
|
|
||||||
|
ClosingTicket: ":warning: You have requested to close your support ticket."
|
||||||
|
ClosingConfirmation_Word: "confirm"
|
||||||
|
CloseConfirmation: "true"
|
||||||
|
# CloseConfirmation to true will make users confirm that they want to close a their ticket, settings to false will just close the ticket.
|
||||||
|
|
||||||
|
# Ticket Department Configuration
|
||||||
|
|
||||||
|
TicketDepartments: "true"
|
||||||
|
# This option enable or disable the ticket departments. If set false Ticket Departments will not work
|
||||||
|
|
||||||
|
AllowStaff: "true"
|
||||||
|
# AllowStaff is an option to whether or not you want the users with the "Staff" role to be able to view inside tickets. If set false "Staff" will not view tickets.
|
||||||
|
|
||||||
|
DepartmentEmoji_1: "🙋"
|
||||||
|
DepartmentEmoji_2: "💸"
|
||||||
|
DepartmentEmoji_3: "📗"
|
||||||
|
# Ticket emojis, the emojis are what users will need to react with inorder to proceed furthur if departments are enabled.
|
||||||
|
|
||||||
|
DepartmentTitle_1: "Support"
|
||||||
|
DepartmentTitle_2: "Billing"
|
||||||
|
DepartmentTitle_3: "Other"
|
||||||
|
# Ticket department title, This is the title for a ticket department to help users know what is available.
|
||||||
|
|
||||||
|
DepartmentRole_1: "Support"
|
||||||
|
DepartmentRole_2: "Admin"
|
||||||
|
DepartmentRole_3: "Support"
|
||||||
|
# Ticket roles are the roles that will be able to gain access to tickets depending on what department has been choosen.
|
||||||
|
|
||||||
|
# System Message Configuration
|
||||||
|
|
||||||
|
SystemMessages: "true"
|
||||||
|
|
||||||
|
SystemMessage_Channel: "system-messages"
|
||||||
|
SystemMessage_Type: "embed"
|
||||||
|
# There are 2 types of how you can send system messages, 'normal' or 'embed'
|
||||||
|
SystemMessage_Icon: "USER"
|
||||||
|
|
||||||
|
Welcome_Title: "User Joined!"
|
||||||
|
WelcomeMessage: "Hello %member%, Welcome to %guildname%!"
|
||||||
|
# %member% define the user who joined and %guildnamne% defines the server name.
|
||||||
|
|
||||||
|
Leave_Title: "User Left!"
|
||||||
|
LeaveMessage: "Goodbye %member%, Thank you for visting %guildname%!"
|
||||||
|
# %member% define the user who left and %guildnamne% defines the server name.
|
||||||
|
|
||||||
|
SystemMessage_EmbedFooter: "false"
|
||||||
|
|
||||||
|
# LINKS Configuration
|
||||||
|
|
||||||
|
LinksTitle: "Quick Links"
|
||||||
|
|
||||||
|
LINKS:
|
||||||
|
"Website": "https://www.example.com"
|
||||||
|
"Store": "https://store.example.com"
|
||||||
|
"Discord": "https://discord.gg/example"
|
||||||
|
# "Twitter": "https://twitter.com/example"
|
||||||
|
|
||||||
|
# Suggestions Configuration
|
||||||
|
|
||||||
|
SuggestionChannel: "suggestions"
|
||||||
|
SuggestionTitle: "Suggestion"
|
||||||
|
SuggestionStarter: "What would you like to suggest?"
|
||||||
|
SuggestReact_1: 👍
|
||||||
|
SuggestReact_2: 👎
|
||||||
|
|
||||||
|
# Announcement Configuration
|
||||||
|
|
||||||
|
AnnouncementChannel: "announcements"
|
||||||
|
AnnouncementTitle: "Servername Announcement"
|
||||||
|
AnnouncementIcon: "https://i.imgur.com/HbkZyB7.png"
|
||||||
|
|
||||||
|
AnnouncementStarter: "What would you like to announce?"
|
||||||
|
|
||||||
|
# Moderation System Configuration
|
||||||
|
|
||||||
|
BanTitle: "User Banned!"
|
||||||
|
DaysBannedFor: 7
|
||||||
|
BanLogColour: "#D911B4"
|
||||||
|
|
||||||
|
KickTitle: "User Kicked!"
|
||||||
|
KickLogColour: "#D9B111"
|
||||||
|
|
||||||
|
ModThumbnail: "https://i.imgur.com/l6P3DF6.png"
|
||||||
|
ModLogChannel: "mod-logs"
|
||||||
|
|
||||||
|
PruneLogTitle: "Bulk Delete"
|
||||||
|
PruneThumbnail: "https://i.imgur.com/OAgW2vR.png"
|
||||||
|
PruneColour: "#1BA30C"
|
||||||
|
|
||||||
|
|
||||||
|
# General Command Configuration
|
||||||
|
|
||||||
|
HelpCommand: "help"
|
||||||
|
LinksCommand: "links"
|
||||||
|
PingCommand: "ping"
|
||||||
|
SuggestCommand: "suggest"
|
||||||
|
|
||||||
|
# Support Command Configuration
|
||||||
|
|
||||||
|
NewTicket: "ticket"
|
||||||
|
CloseTicket: "close"
|
||||||
|
AddUser: "add"
|
||||||
|
RemoveUser: "remove"
|
||||||
|
RenameTicket: "rename"
|
||||||
|
|
||||||
|
# Staff Command Configuration
|
||||||
|
|
||||||
|
BotSay: "say"
|
||||||
|
PurgeMessage: "purge"
|
||||||
|
|
||||||
|
# Admin Command Configuration
|
||||||
|
|
||||||
|
AnnounceCommand: "announce"
|
||||||
|
BanUser: "ban"
|
||||||
|
KickUser: "kick"
|
||||||
|
|
||||||
|
# Commmand Descriptions
|
||||||
|
|
||||||
|
NewTicketDesc: "Create a new support ticket"
|
||||||
|
AnnounceDesc: "Create a server announcement"
|
||||||
|
CloseTicketDesc: "Close your support ticket"
|
||||||
|
LinksDesc: "View some important links"
|
||||||
|
PingDesc: "Get the bot's latency"
|
||||||
|
HelpDesc: "Get a list of all the commands"
|
||||||
|
RemoveUserDesc: "Remove a user from a support ticket"
|
||||||
|
AddUserDesc: "Add a user to a support ticket"
|
||||||
|
SuggestionDesc: "Create a server suggestion"
|
||||||
|
BotSayDesc: "Say something with the bot"
|
||||||
|
BanDesc: "Ban a member from this server."
|
||||||
|
KickDesc: "Kick a member from this server."
|
||||||
|
PurgeDesc: "Purge messages from the chat."
|
||||||
|
|
||||||
|
# Error / Warining Messages
|
||||||
|
|
||||||
|
IncorrectPerms: ":x: **Err!** You do not have the correct permissions to use this command."
|
||||||
|
InvalidChannel: ":x: **Err!** Channel not found. Please create it!"
|
||||||
|
UserNotFound: ":x: **Err!** This user doesn't exist, Are they in this server?"
|
||||||
|
NoValidTicket: ":warning: You cannot execute this command here. This command is used when closing a ticket."
|
||||||
|
TicketExists: ":warning: This ticket cannot be opened, It already exists!"
|
||||||
@@ -0,0 +1,222 @@
|
|||||||
|
# _________ __ __________ __
|
||||||
|
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||||
|
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||||
|
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||||
|
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||||
|
# \/ |__| |__| \/
|
||||||
|
#
|
||||||
|
# SupportBot version 6.2
|
||||||
|
# Created by Emerald Services
|
||||||
|
# Installed with MIT License
|
||||||
|
#
|
||||||
|
# Support Server: discord.gg/jspKFcE
|
||||||
|
|
||||||
|
# General Bot Configuration
|
||||||
|
|
||||||
|
Token: "BOT_TOKEN_HERE"
|
||||||
|
Prefix: "-"
|
||||||
|
Bot_Name: "SupportBot"
|
||||||
|
|
||||||
|
BotActivity: "-help | SupportBot"
|
||||||
|
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
|
||||||
|
# Debe establecer ActivityType en STREAMING para que la dirección URL de streaming funcione en el estado de los bots.
|
||||||
|
|
||||||
|
ActivityType: "PLAYING"
|
||||||
|
# El estado de la actividad puede ser
|
||||||
|
|
||||||
|
DeleteMessages: "true"
|
||||||
|
|
||||||
|
# Embed Configuration
|
||||||
|
|
||||||
|
EmbedColour: "#04b545"
|
||||||
|
EmbedFooter: "SupportBot El #1 bot de discordia de apoyo"
|
||||||
|
|
||||||
|
ErrorColour: "#d12519"
|
||||||
|
SuccessColour: "#04b545"
|
||||||
|
WarningColour: "#fca117"
|
||||||
|
|
||||||
|
# Role Configuration
|
||||||
|
|
||||||
|
AutoRole: "true"
|
||||||
|
# Estableciendo "AutoRole para 'true' el bot aplicará automáticamente el rol siguiente cuando los miembros se unan. Establecer en 'false' para desactivar esta función.
|
||||||
|
AutoRole_Role: "Miembro"
|
||||||
|
LockdownRole: "@everyone"
|
||||||
|
|
||||||
|
Staff: "Personal"
|
||||||
|
Admin: "Admin"
|
||||||
|
|
||||||
|
# Ticket Configuration
|
||||||
|
|
||||||
|
TicketChannel: "ticket"
|
||||||
|
TicketCategory: "Tickets"
|
||||||
|
TicketLog: "ticket-logs"
|
||||||
|
TranscriptLog: "transcripts"
|
||||||
|
TicketSubject: "description"
|
||||||
|
# TicketSubject: "description" significa que el sujeto (motivo) del billete se mostrará en la descripción del canal si se establece en "embed" se mostrará dentro de la incrustación.
|
||||||
|
|
||||||
|
AllowTicketMentions: "true"
|
||||||
|
# Establecer en "true" para permitir que el boleto mencione al autor y al equipo de apoyo.
|
||||||
|
# Establecer en "false" para desautorizar las menciones dentro de los boletos.
|
||||||
|
|
||||||
|
# Ticket Panel (Ticket Reaction Create)
|
||||||
|
|
||||||
|
ReactionTickets: "true"
|
||||||
|
ReactionMessage: "React with %reaction_emoji% para crear un Ticket de Soporte!"
|
||||||
|
ReactionChannel: "crear-ticket"
|
||||||
|
ReactionPanel_Description: "true"
|
||||||
|
ReactionDescription: "Cree un ticket de soporte para contactar a un miembro del personal."
|
||||||
|
ReactionEmoji: "📩"
|
||||||
|
# Custom Emojis: <:test:EMOJI_ID>
|
||||||
|
ReactionPanel_Thumbnail: true
|
||||||
|
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
|
||||||
|
ReactionPanel_Image: true
|
||||||
|
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
|
||||||
|
|
||||||
|
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
|
||||||
|
Ticket_Title: "Server Support | %ticketusername%"
|
||||||
|
TicketMessage: "Hola <@%ticketauthor%>, Gracias por crear un ticket de apoyo\nPor favor, espere pacientemente mientras un miembro de nuestro equipo se acerca a usted."
|
||||||
|
NoTicketSubject: "No Reason Provided!"
|
||||||
|
TicketCreatedAlert: ":ticket: Se ha creado su ticket de soporte: <#%ticketid%>"
|
||||||
|
TranscriptTitle: "Transcripción de entradas"
|
||||||
|
|
||||||
|
AddedUser: "👍 <@%user%> se ha añadido a este billete"
|
||||||
|
RemovedUser: "👍 <@%user%> ha sido retirado de este boleto"
|
||||||
|
|
||||||
|
ClosingTicket: ":warning: Ha solicitado cerrar su ticket de soporte."
|
||||||
|
ClosingConfirmation_Word: "confirm"
|
||||||
|
CloseConfirmation: "true"
|
||||||
|
# CloseConfirmation a true hará que los usuarios confirmen que quieren cerrar un billete, la configuración a false simplemente cerrará el ticket.
|
||||||
|
|
||||||
|
# Ticket Department Configuration
|
||||||
|
|
||||||
|
TicketDepartments: "true"
|
||||||
|
# Esta opción habilite o deshabilite los departamentos de tickets. Compensar "false" Los departamentos de entradas no funcionarán.
|
||||||
|
|
||||||
|
AllowStaff: "true"
|
||||||
|
# AllowStaff es una opción para si desea o no que los usuarios con el rol "Personal" puedan ver dentro de los tickets. Si se establece falso "Personal" no verá los boletos.
|
||||||
|
|
||||||
|
DepartmentEmoji_1: "🙋"
|
||||||
|
DepartmentEmoji_2: "💸"
|
||||||
|
DepartmentEmoji_3: "📗"
|
||||||
|
# Ticket emojis, los emojis son lo que los usuarios tendrán que reaccionar con orden para proceder furthur si los departamentos están habilitados.
|
||||||
|
|
||||||
|
DepartmentTitle_1: "Apoyo"
|
||||||
|
DepartmentTitle_2: "Facturación"
|
||||||
|
DepartmentTitle_3: "Otro"
|
||||||
|
# Ticket department title, Este es el título de un departamento de tickets para ayudar a los usuarios a saber lo que está disponible.
|
||||||
|
|
||||||
|
DepartmentRole_1: "Apoyo"
|
||||||
|
DepartmentRole_2: "Admin"
|
||||||
|
DepartmentRole_3: "Apoyo"
|
||||||
|
# Los roles de tickets son los roles que podrán acceder a los boletos dependiendo del departamento que se haya elegido.
|
||||||
|
|
||||||
|
# System Message Configuration
|
||||||
|
|
||||||
|
SystemMessages: "true"
|
||||||
|
|
||||||
|
SystemMessage_Channel: "smensajes-del-sistema"
|
||||||
|
SystemMessage_Type: "embed"
|
||||||
|
# Hay 2 tipos de cómo puede enviar mensajes del sistema, 'normal' or 'embed'
|
||||||
|
SystemMessage_Icon: "USER"
|
||||||
|
|
||||||
|
Welcome_Title: "Usuario unido!"
|
||||||
|
WelcomeMessage: "Hola %member%, Bienvenido a %guildname%!"
|
||||||
|
# %member% definir el usuario que se unió y %guildnamne% define el nombre del servidor.
|
||||||
|
|
||||||
|
Leave_Title: "¡Usuario a la izquierda!"
|
||||||
|
LeaveMessage: "Adios %member%, Gracias por visting %guildname%!"
|
||||||
|
# %member% definir el usuario que se unió y %guildnamne% define el nombre del servidor.
|
||||||
|
|
||||||
|
SystemMessage_EmbedFooter: "false"
|
||||||
|
|
||||||
|
# LINKS Configuration
|
||||||
|
|
||||||
|
LinksTitle: "Enlaces rápidos"
|
||||||
|
|
||||||
|
LINKS:
|
||||||
|
"Website": "https://www.example.com"
|
||||||
|
"Store": "https://store.example.com"
|
||||||
|
"Discord": "https://discord.gg/example"
|
||||||
|
# "Twitter": "https://twitter.com/example"
|
||||||
|
|
||||||
|
# Suggestions Configuration
|
||||||
|
|
||||||
|
SuggestionChannel: "Sugerencias"
|
||||||
|
SuggestionTitle: "Sugerencia"
|
||||||
|
SuggestionStarter: "¿Qué te gustaría sugerir?"
|
||||||
|
SuggestReact_1: 👍
|
||||||
|
SuggestReact_2: 👎
|
||||||
|
|
||||||
|
# Announcement Configuration
|
||||||
|
|
||||||
|
AnnouncementChannel: "anuncios"
|
||||||
|
AnnouncementTitle: "Anuncio de nombre de servidor"
|
||||||
|
AnnouncementIcon: "https://i.imgur.com/HbkZyB7.png"
|
||||||
|
|
||||||
|
AnnouncementStarter: "¿Qué te gustaría anunciar?"
|
||||||
|
|
||||||
|
# Moderation System Configuration
|
||||||
|
|
||||||
|
BanTitle: "User Banned!"
|
||||||
|
DaysBannedFor: 7
|
||||||
|
BanLogColour: "#D911B4"
|
||||||
|
|
||||||
|
KickTitle: "User Kicked!"
|
||||||
|
KickLogColour: "#D9B111"
|
||||||
|
|
||||||
|
ModThumbnail: "https://i.imgur.com/l6P3DF6.png"
|
||||||
|
ModLogChannel: "mod-logs"
|
||||||
|
|
||||||
|
PruneLogTitle: "Bulk Delete"
|
||||||
|
PruneThumbnail: "https://i.imgur.com/OAgW2vR.png"
|
||||||
|
PruneColour: "#1BA30C"
|
||||||
|
|
||||||
|
# General Command Configuration
|
||||||
|
|
||||||
|
HelpCommand: "ayuda"
|
||||||
|
LinksCommand: "enlaces"
|
||||||
|
PingCommand: "senal"
|
||||||
|
SuggestCommand: "cugerir"
|
||||||
|
|
||||||
|
# Support Command Configuration
|
||||||
|
|
||||||
|
NewTicket: "boleto"
|
||||||
|
CloseTicket: "cerca"
|
||||||
|
AddUser: "anadir"
|
||||||
|
RemoveUser: "eliminar"
|
||||||
|
RenameTicket: "renombrar"
|
||||||
|
|
||||||
|
# Staff Command Configuration
|
||||||
|
|
||||||
|
BotSay: "decir"
|
||||||
|
PurgeMessage: "purge"
|
||||||
|
|
||||||
|
# Admin Command Configuration
|
||||||
|
|
||||||
|
AnnounceCommand: "anunciar"
|
||||||
|
BanUser: "ban"
|
||||||
|
KickUser: "kick"
|
||||||
|
|
||||||
|
# Commmand Descriptions
|
||||||
|
|
||||||
|
NewTicketDesc: "Crear un nuevo ticket de soporte"
|
||||||
|
AnnounceDesc: "Crear un anuncio de servidor"
|
||||||
|
CloseTicketDesc: "Cierre su ticket de soporte"
|
||||||
|
LinksDesc: "Ver algunos enlaces importantes"
|
||||||
|
PingDesc: "Obtener la latencia del bot"
|
||||||
|
HelpDesc: "Obtener una lista de todos los comandoss"
|
||||||
|
RemoveUserDesc: "Eliminar un usuario de un ticket de soporte"
|
||||||
|
AddUserDesc: "Add un usuario a un ticket de soporte"
|
||||||
|
SuggestionDesc: "Crear una sugerencia de servidor"
|
||||||
|
BotSayDesc: "Di algo con el bot"
|
||||||
|
BanDesc: "Prohibir a un/una miembro de este servidor."
|
||||||
|
KickDesc: "Patea a un/una miembro de este servidor."
|
||||||
|
PurgeDesc: "Purga los mensajes del chat."
|
||||||
|
|
||||||
|
# Error / Warining Messages
|
||||||
|
|
||||||
|
IncorrectPerms: ":x: **Err!** No tiene los permisos correctos para utilizar este comando."
|
||||||
|
InvalidChannel: ":x: **Err!** Canal no encontrado. ¡Por favor, créalo!"
|
||||||
|
UserNotFound: ":x: **Err!** Este usuario no existe, ¿están en este servidor?"
|
||||||
|
NoValidTicket: ":warning: No puede ejecutar este comando aquí. Este comando se utiliza al cerrar un vale."
|
||||||
|
TicketExists: ":warning: Este billete no se puede abrir, ¡Ya existe!"
|
||||||
@@ -0,0 +1,224 @@
|
|||||||
|
# _________ __ __________ __
|
||||||
|
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||||
|
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||||
|
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||||
|
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||||
|
# \/ |__| |__| \/
|
||||||
|
#
|
||||||
|
# SupportBot version 6.1
|
||||||
|
# Created by Emerald Services
|
||||||
|
# Installed with MIT License
|
||||||
|
#
|
||||||
|
# Support Server: discord.gg/jspKFcE
|
||||||
|
|
||||||
|
# General Bot Configuration
|
||||||
|
|
||||||
|
Token: "BOT_TOKEN_HERE"
|
||||||
|
Prefix: "-"
|
||||||
|
Bot_Name: "SupportBot"
|
||||||
|
|
||||||
|
BotActivity: "-help | SupportBot"
|
||||||
|
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
|
||||||
|
# Doit définir ActivityType a STREAMING afin que l’URL de streaming fonctionne dans le statut bots.
|
||||||
|
|
||||||
|
ActivityType: "PLAYING"
|
||||||
|
# L’état d’activité peut être PLAYING, WATCHING, LISTENING ou STREAMING.
|
||||||
|
|
||||||
|
DeleteMessages: "true"
|
||||||
|
|
||||||
|
# Embed Configuration
|
||||||
|
|
||||||
|
EmbedColour: "#04b545"
|
||||||
|
EmbedFooter: "SupportBot | The #1 Supportive Discord Bot"
|
||||||
|
|
||||||
|
ErrorColour: "#d12519"
|
||||||
|
SuccessColour: "#04b545"
|
||||||
|
WarningColour: "#fca117"
|
||||||
|
|
||||||
|
# Role Configuration
|
||||||
|
|
||||||
|
AutoRole: "true"
|
||||||
|
# En parametre "AutoRole a 'true' le bot appliquera automatiquement le rôle ci-dessous lorsque les membres se joindra. Mis à 'false' désactiver cette fonctionnalite.
|
||||||
|
AutoRole_Role: "Membre"
|
||||||
|
LockdownRole: "@everyone"
|
||||||
|
|
||||||
|
Staff: "Personnel"
|
||||||
|
Admin: "Admin"
|
||||||
|
|
||||||
|
# Ticket Configuration
|
||||||
|
|
||||||
|
TicketChannel: "ticket"
|
||||||
|
TicketCategory: "Tickets"
|
||||||
|
TicketLog: "ticket-logs"
|
||||||
|
TranscriptLog: "transcripts"
|
||||||
|
TicketSubject: "description"
|
||||||
|
# TicketSubject: "description" signifie que le sujet (reason) du billet sera affiché sur la description du canal s’il est défini pour "embed" il sera affiché dans l’intégration.
|
||||||
|
|
||||||
|
AllowTicketMentions: "true"
|
||||||
|
# Mis a "true" pour permettre au billet de mentionner l’auteur et l’équipe de soutien.
|
||||||
|
# Mis a "false" pour désa autoriser les mentions dans les billets.
|
||||||
|
|
||||||
|
|
||||||
|
# Ticket Panel (Ticket Reaction Create)
|
||||||
|
|
||||||
|
ReactionTickets: "true"
|
||||||
|
ReactionMessage: "Réagissez avec %reaction_emoji% pour créer un ticket de support !"
|
||||||
|
ReactionChannel: "creer-billet"
|
||||||
|
ReactionPanel_Description: "true"
|
||||||
|
ReactionDescription: "Créez un ticket de support pour contacter un membre du personnel."
|
||||||
|
ReactionEmoji: "📩"
|
||||||
|
# Custom Emojis: <:test:EMOJI_ID>
|
||||||
|
ReactionPanel_Thumbnail: true
|
||||||
|
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
|
||||||
|
ReactionPanel_Image: true
|
||||||
|
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
|
||||||
|
|
||||||
|
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
|
||||||
|
Ticket_Title: "Prise en charge du serveur | %ticketusername%"
|
||||||
|
TicketMessage: "Bonjour <@%ticketauthor%>, Merci d’avoir créé un billet de support\nS’il vous plaît attendre patiemment pendant qu’un membre de notre équipe vous tend la main."
|
||||||
|
NoTicketSubject: "Aucune raison fournie!"
|
||||||
|
TicketCreatedAlert: ":ticket: Votre ticket de support a été créé : <#%ticketid%>"
|
||||||
|
TranscriptTitle: "Transcription du billet"
|
||||||
|
|
||||||
|
AddedUser: "👍 <@%user%> a ete ajoute a ce billet"
|
||||||
|
RemovedUser: "👍 <@%user%> a ete retiré de ce billet"
|
||||||
|
|
||||||
|
ClosingTicket: ":warning: Vous avez demandé de fermer votre billet de soutien."
|
||||||
|
ClosingConfirmation_Word: "confirm"
|
||||||
|
CloseConfirmation: "true"
|
||||||
|
# CloseConfirmation a vrai fera confirmer aux utilisateurs qu’ils veulent fermer un leur billet, les paramètres à faux va juste fermer le billet.
|
||||||
|
|
||||||
|
# Ticket Department Configuration
|
||||||
|
|
||||||
|
TicketDepartments: "true"
|
||||||
|
# Cette option permet ou désactive les départements de billetterie. Si définissez faux départements de billets ne fonctionnera pas
|
||||||
|
|
||||||
|
AllowStaff: "true"
|
||||||
|
# AllowStaff est une option pour savoir si oui ou non vous voulez les utilisateurs avec le "Staff" rôle pour être en mesure de voir à l’intérieur des billets. S’il est mis faux "Staff" ne affichera pas les billets.
|
||||||
|
|
||||||
|
DepartmentEmoji_1: "🙋"
|
||||||
|
DepartmentEmoji_2: "💸"
|
||||||
|
DepartmentEmoji_3: "📗"
|
||||||
|
# Emojis billet, les emojis sont ce que les utilisateurs devront réagir avec inorder pour procéder furthur si les départements sont activés.
|
||||||
|
|
||||||
|
DepartmentTitle_1: "Soutien"
|
||||||
|
DepartmentTitle_2: "Facturation"
|
||||||
|
DepartmentTitle_3: "Autres"
|
||||||
|
# Titre du département des billets, C’est le titre d’un service de billetterie pour aider les utilisateurs à savoir ce qui est disponible.
|
||||||
|
|
||||||
|
DepartmentRole_1: "Soutien"
|
||||||
|
DepartmentRole_2: "Admin"
|
||||||
|
DepartmentRole_3: "Soutien"
|
||||||
|
# Les rôles de billets sont les rôles qui seront en mesure d’accéder aux billets en fonction du ministère qui a été choisi.
|
||||||
|
|
||||||
|
# System Message Configuration
|
||||||
|
|
||||||
|
SystemMessages: "true"
|
||||||
|
|
||||||
|
SystemMessage_Channel: "messages-systeme"
|
||||||
|
SystemMessage_Type: "embed"
|
||||||
|
# Il existe 2 types de la façon dont vous pouvez envoyer des messages système, 'normal' or 'embed'
|
||||||
|
SystemMessage_Icon: "USER"
|
||||||
|
|
||||||
|
Welcome_Title: "Utilisateur rejoint!"
|
||||||
|
WelcomeMessage: "Bonjour %member%, Bienvenue à %guildname%!"
|
||||||
|
# %member% définir l’utilisateur qui a rejoint et %guildnamne% définit le nom du serveur.
|
||||||
|
|
||||||
|
Leave_Title: "Utilisateur à gauche!"
|
||||||
|
LeaveMessage: "Au revoir %member%, Merci d’avoir visting %guildname%!"
|
||||||
|
# %member% définir l’utilisateur qui est parti et %guildnamne% définit le nom du serveur.
|
||||||
|
|
||||||
|
SystemMessage_EmbedFooter: "false"
|
||||||
|
|
||||||
|
# LINKS Configuration
|
||||||
|
|
||||||
|
LinksTitle: "Liens rapides"
|
||||||
|
|
||||||
|
LINKS:
|
||||||
|
"Website": "https://www.example.com"
|
||||||
|
"Store": "https://store.example.com"
|
||||||
|
"Discord": "https://discord.gg/example"
|
||||||
|
# "Twitter": "https://twitter.com/example"
|
||||||
|
|
||||||
|
# Suggestions Configuration
|
||||||
|
|
||||||
|
SuggestionChannel: "suggestions"
|
||||||
|
SuggestionTitle: "Suggestion"
|
||||||
|
SuggestionStarter: "Qu’aimeriez-vous suggérer?"
|
||||||
|
SuggestReact_1: 👍
|
||||||
|
SuggestReact_2: 👎
|
||||||
|
|
||||||
|
# Announcement Configuration
|
||||||
|
|
||||||
|
AnnouncementChannel: "annonces"
|
||||||
|
AnnouncementTitle: "Annonce servername"
|
||||||
|
AnnouncementIcon: "https://i.imgur.com/HbkZyB7.png"
|
||||||
|
|
||||||
|
AnnouncementStarter: "Qu’aimeriez-vous annoncer?"
|
||||||
|
|
||||||
|
# Moderation System Configuration
|
||||||
|
|
||||||
|
BanTitle: "User Banned!"
|
||||||
|
DaysBannedFor: 7
|
||||||
|
BanLogColour: "#D911B4"
|
||||||
|
|
||||||
|
KickTitle: "User Kicked!"
|
||||||
|
KickLogColour: "#D9B111"
|
||||||
|
|
||||||
|
ModThumbnail: "https://i.imgur.com/l6P3DF6.png"
|
||||||
|
ModLogChannel: "mod-logs"
|
||||||
|
|
||||||
|
PruneLogTitle: "Bulk Delete"
|
||||||
|
PruneThumbnail: "https://i.imgur.com/OAgW2vR.png"
|
||||||
|
PruneColour: "#1BA30C"
|
||||||
|
|
||||||
|
|
||||||
|
# General Command Configuration
|
||||||
|
|
||||||
|
HelpCommand: "aide"
|
||||||
|
LinksCommand: "liens"
|
||||||
|
PingCommand: "ping"
|
||||||
|
SuggestCommand: "suggerer"
|
||||||
|
|
||||||
|
# Support Command Configuration
|
||||||
|
|
||||||
|
NewTicket: "billet"
|
||||||
|
CloseTicket: "proche"
|
||||||
|
AddUser: "ajouter"
|
||||||
|
RemoveUser: "retirer"
|
||||||
|
RenameTicket: "renommer"
|
||||||
|
|
||||||
|
# Staff Command Configuration
|
||||||
|
|
||||||
|
BotSay: "dire"
|
||||||
|
PurgeMessage: "purge"
|
||||||
|
|
||||||
|
# Admin Command Configuration
|
||||||
|
|
||||||
|
AnnounceCommand: "annoncer"
|
||||||
|
BanUser: "ban"
|
||||||
|
KickUser: "kick"
|
||||||
|
|
||||||
|
# Commmand Descriptions
|
||||||
|
|
||||||
|
NewTicketDesc: "Créer un nouveau ticket de support"
|
||||||
|
AnnounceDesc: "Créer une annonce de serveur"
|
||||||
|
CloseTicketDesc: "Fermez votre billet de support"
|
||||||
|
LinksDesc: "View some important links"
|
||||||
|
PingDesc: "Obtenez la latence du bot"
|
||||||
|
HelpDesc: "Obtenez une liste de toutes les commandes"
|
||||||
|
RemoveUserDesc: "Supprimer un utilisateur d’un ticket de support"
|
||||||
|
AddUserDesc: "Ajouter un utilisateur à un ticket de support"
|
||||||
|
SuggestionDesc: "Créer une suggestion de serveur"
|
||||||
|
BotSayDesc: "Dites quelque chose avec le bot"
|
||||||
|
BanDesc: "Bannir un membre de ce serveur."
|
||||||
|
KickDesc: "Kick un membre de ce serveur."
|
||||||
|
PurgeDesc: "Purgez les messages du chat."
|
||||||
|
|
||||||
|
# Error / Warining Messages
|
||||||
|
|
||||||
|
IncorrectPerms: ":x: **Err!** Vous n’avez pas les autorisations correctes pour utiliser cette commande."
|
||||||
|
InvalidChannel: ":x: **Err!** Canal ina pas trouvé. S’il vous plaît le créer!"
|
||||||
|
UserNotFound: ":x: **Err!** Vous ne pouvez pas exécuter cette commande ici. Cette commande est utilisée lors de la fermeture d’un billet. ..."
|
||||||
|
NoValidTicket: ":warning: Vous ne pouvez pas exécuter cette commande ici. Cette commande est utilisée lors de la fermeture d’un billet."
|
||||||
|
TicketExists: ":warning: Ce billet ne peut pas être ouvert, il existe déjà!"
|
||||||
@@ -0,0 +1,222 @@
|
|||||||
|
# _________ __ __________ __
|
||||||
|
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||||
|
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||||
|
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||||
|
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||||
|
# \/ |__| |__| \/
|
||||||
|
#
|
||||||
|
# SupportBot version 6.2
|
||||||
|
# Erstellt von Emerald Services
|
||||||
|
# Installiert unter MIT License
|
||||||
|
#
|
||||||
|
# Support Server: discord.gg/jspKFcE
|
||||||
|
|
||||||
|
# Generelle Bot Konfiguration
|
||||||
|
|
||||||
|
Token: "BOT_TOKEN_HERE"
|
||||||
|
Prefix: "-"
|
||||||
|
Bot_Name: "SupportBot"
|
||||||
|
|
||||||
|
BotActivity: "-help | SupportBot"
|
||||||
|
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
|
||||||
|
# ActivityType muss auf STREAMING gesetzt werden, damit die Streaming-URL im Bot-Status funktioniert
|
||||||
|
ActivityType: "PLAYING"
|
||||||
|
# Der Aktivitätsstatus kann entweder PLAYING, WATCHING, LISTENING oder STREAMING sein.
|
||||||
|
|
||||||
|
DeleteMessages: "true"
|
||||||
|
|
||||||
|
# Embed Konfiguration
|
||||||
|
|
||||||
|
EmbedColour: "#04b545"
|
||||||
|
EmbedFooter: "SupportBot | Der #1 Support Discord Bot"
|
||||||
|
|
||||||
|
ErrorColour: "#d12519"
|
||||||
|
SuccessColour: "#04b545"
|
||||||
|
WarningColour: "#fca117"
|
||||||
|
|
||||||
|
# Rollen Konfiguration
|
||||||
|
|
||||||
|
AutoRole: "true"
|
||||||
|
# Wenn Sie "AutoRole" auf "true" setzen, vergibt der Bot automatisch die folgende Rolle, wenn Mitglieder deinem Discord Server beitreten. Setze dies auf "false", um diese Funktion zu deaktivieren.
|
||||||
|
AutoRole_Role: "Member"
|
||||||
|
LockdownRole: "@everyone"
|
||||||
|
|
||||||
|
Staff: "Staff"
|
||||||
|
Admin: "Admin"
|
||||||
|
|
||||||
|
# Ticket Konfiguration
|
||||||
|
|
||||||
|
TicketChannel: "ticket"
|
||||||
|
TicketCategory: "Tickets"
|
||||||
|
TicketLog: "ticket-logs"
|
||||||
|
TranscriptLog: "transcripts"
|
||||||
|
TicketSubject: "description"
|
||||||
|
# TicketSubject: "description" bedeutet, dass der Grund des Tickets in der Kanalbeschreibung steht, "embed" bedeutet, dass der Grund im Embed steht.
|
||||||
|
|
||||||
|
AllowTicketMentions: "true"
|
||||||
|
# Setze dies auf "true" damit das Ticket den Ersteller und das Support-Team pingt.
|
||||||
|
# Setze dies auf "false" um Pings in Tickets zu deaktivieren
|
||||||
|
|
||||||
|
|
||||||
|
# Ticket Panel (Per Reaktion ein Ticket erstellen)
|
||||||
|
|
||||||
|
ReactionTickets: "true"
|
||||||
|
ReactionMessage: "Reagiere mit %reaction_emoji% um ein Ticket zu erstellen!"
|
||||||
|
ReactionPanel_Description: "true"
|
||||||
|
ReactionDescription: "Erstellen Sie ein Support-Ticket, um einen Mitarbeiter zu kontaktieren."
|
||||||
|
ReactionChannel: "create-ticket"
|
||||||
|
ReactionEmoji: "📩"
|
||||||
|
# Custom Emojis: <:test:EMOJI_ID>
|
||||||
|
ReactionPanel_Thumbnail: true
|
||||||
|
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
|
||||||
|
ReactionPanel_Image: true
|
||||||
|
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
|
||||||
|
|
||||||
|
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
|
||||||
|
Ticket_Title: "Server Support | %ticketusername%"
|
||||||
|
TicketMessage: "Hallo <@%ticketauthor%>, Vielen Dank das du ein Ticket erstellt hast\nBitte warte, bis sich ein Mitglied unseres Teams meldet!"
|
||||||
|
NoTicketSubject: "Keinen Grund angegeben!"
|
||||||
|
TicketCreatedAlert: ":ticket: Dein Ticket wurde erstellt: <#%ticketid%>"
|
||||||
|
TranscriptTitle: "Ticket Transcript"
|
||||||
|
|
||||||
|
AddedUser: "👍 <@%user%> wurde zu dem Ticket hinzugefügt"
|
||||||
|
RemovedUser: "👍 <@%user%> wurde aus dem Ticket entfernt"
|
||||||
|
|
||||||
|
ClosingTicket: ":warning: Du hast angefragt, dein Ticket zu schließen"
|
||||||
|
ClosingConfirmation_Word: "confirm"
|
||||||
|
CloseConfirmation: "true"
|
||||||
|
# CloseConfirmation "true" erwartet von Usern eine Bestätigung zum schließen des Ticket, setze dies auf "false" damit das Ticket einfach geschlossen wird.
|
||||||
|
|
||||||
|
# Ticket Abteilungskonfiguration
|
||||||
|
|
||||||
|
TicketDepartments: "true"
|
||||||
|
# Diese Option aktiviert oder deaktiviert die verschiedenen Ticket Abteilungen, setze dies auf "false" um keine Ticket Abteilungen zu haben.
|
||||||
|
|
||||||
|
AllowStaff: "true"
|
||||||
|
# Allowstaff ist eine Option welche der Rolle "Staff" ermöglicht, im Ticket mitzulesen, setze dies auf "false" damit die Rolle "Staff" nicht mitlesen kann.
|
||||||
|
|
||||||
|
DepartmentEmoji_1: "🙋"
|
||||||
|
DepartmentEmoji_2: "💸"
|
||||||
|
DepartmentEmoji_3: "📗"
|
||||||
|
# Ticket Emojis, auf welche die User reagieren um ein Ticket für die verschiedenen Abteilungen zu erstellen, natürlich nur wenn die Abteilungen aktiviert sind.
|
||||||
|
|
||||||
|
DepartmentTitle_1: "Support"
|
||||||
|
DepartmentTitle_2: "Billing"
|
||||||
|
DepartmentTitle_3: "Other"
|
||||||
|
# Ticket Abteilungstitel, dies ist der Titel einer Ticketabteilung, um Nutzern zu helfen, damit diese wissen welche Abteilungen vorhanden sind.
|
||||||
|
|
||||||
|
DepartmentRole_1: "Support"
|
||||||
|
DepartmentRole_2: "Admin"
|
||||||
|
DepartmentRole_3: "Support"
|
||||||
|
# Ticketrollen sind die Rollen, welche abhängig von der Abteilung Zugriff auf Tickets erhalten.
|
||||||
|
|
||||||
|
# System Nachrichten Konfiguration
|
||||||
|
|
||||||
|
SystemMessages: "true"
|
||||||
|
|
||||||
|
SystemMessage_Channel: "System-Nachrichten"
|
||||||
|
SystemMessage_Type: "embed"
|
||||||
|
# Es gibt 2 Arten wie Sie System Nachrichten senden können, "normal" oder "embed"
|
||||||
|
SystemMessage_Icon: "USER"
|
||||||
|
|
||||||
|
Welcome_Title: "User hat den Server betreten!"
|
||||||
|
WelcomeMessage: "Herzlich Willkommen %member%, Willkommen auf %guildname%!"
|
||||||
|
# %member% definiert den Nutzer welcher gerade gejoint ist, %guildnamne% den Server Namen.
|
||||||
|
|
||||||
|
Leave_Title: "User hat den Server verlassen!"
|
||||||
|
LeaveMessage: "Es war schön dich zu sehen %member%, Danke dir für den Besuch auf %guildname%!"
|
||||||
|
# %member% definiert den Nutzer, welcher den Server verlassen hat, %guildname% den Server Namen.
|
||||||
|
|
||||||
|
SystemMessage_EmbedFooter: "false"
|
||||||
|
|
||||||
|
# LINKS Konfiguration
|
||||||
|
|
||||||
|
LinksTitle: "Quick Links"
|
||||||
|
|
||||||
|
LINKS:
|
||||||
|
"Website": "https://www.example.com"
|
||||||
|
"Store": "https://store.example.com"
|
||||||
|
"Discord": "https://discord.gg/example"
|
||||||
|
# "Twitter": "https://twitter.com/example"
|
||||||
|
|
||||||
|
# Suggestions Konfiguration
|
||||||
|
|
||||||
|
SuggestionChannel: "suggestions"
|
||||||
|
SuggestionTitle: "Suggestion"
|
||||||
|
SuggestionStarter: "Was möchtest du vorschlagen?"
|
||||||
|
SuggestReact_1: 👍
|
||||||
|
SuggestReact_2: 👎
|
||||||
|
|
||||||
|
# Announcement Konfiguration
|
||||||
|
|
||||||
|
AnnouncementChannel: "announcements"
|
||||||
|
AnnouncementTitle: "Servername Announcement"
|
||||||
|
AnnouncementIcon: "https://i.imgur.com/HbkZyB7.png"
|
||||||
|
|
||||||
|
AnnouncementStarter: "Was möchtest du ankündigen?"
|
||||||
|
|
||||||
|
# Moderation System Configuration
|
||||||
|
|
||||||
|
BanTitle: "User Banned!"
|
||||||
|
DaysBannedFor: 7
|
||||||
|
BanLogColour: "#D911B4"
|
||||||
|
|
||||||
|
KickTitle: "User Kicked!"
|
||||||
|
KickLogColour: "#D9B111"
|
||||||
|
|
||||||
|
ModThumbnail: "https://i.imgur.com/l6P3DF6.png"
|
||||||
|
ModLogChannel: "mod-logs"
|
||||||
|
|
||||||
|
PruneLogTitle: "Bulk Delete"
|
||||||
|
PruneThumbnail: "https://i.imgur.com/OAgW2vR.png"
|
||||||
|
PruneColour: "#1BA30C"
|
||||||
|
|
||||||
|
# General Command Konfiguration
|
||||||
|
|
||||||
|
HelpCommand: "help"
|
||||||
|
LinksCommand: "links"
|
||||||
|
PingCommand: "ping"
|
||||||
|
SuggestCommand: "suggest"
|
||||||
|
|
||||||
|
# Support Command Konfiguration
|
||||||
|
|
||||||
|
NewTicket: "ticket"
|
||||||
|
CloseTicket: "close"
|
||||||
|
AddUser: "add"
|
||||||
|
RemoveUser: "remove"
|
||||||
|
RenameTicket: "rename"
|
||||||
|
|
||||||
|
# Staff Command Konfiguration
|
||||||
|
|
||||||
|
BotSay: "say"
|
||||||
|
PurgeMessage: "purge"
|
||||||
|
|
||||||
|
# Admin Command Konfiguration
|
||||||
|
|
||||||
|
AnnounceCommand: "announce"
|
||||||
|
BanUser: "ban"
|
||||||
|
KickUser: "kick"
|
||||||
|
|
||||||
|
# Commmand Beschreibungen (help)
|
||||||
|
|
||||||
|
NewTicketDesc: "Erstelle ein neues Support Ticket"
|
||||||
|
AnnounceDesc: "Erstelle eine neue Server Ankündigung"
|
||||||
|
CloseTicketDesc: "Schließe dein Support Ticket"
|
||||||
|
LinksDesc: "Zeigt wichtige Links an"
|
||||||
|
PingDesc: "Bekomme die Bot Latenz"
|
||||||
|
HelpDesc: "Erhalte eine Liste der verfügbaren Befehle"
|
||||||
|
RemoveUserDesc: "Entferne einen Nutzer aus einem Ticket"
|
||||||
|
AddUserDesc: "Füge einen Nutzer einem Ticket hinzu"
|
||||||
|
SuggestionDesc: "Erstelle einen Server Vorschlag"
|
||||||
|
BotSayDesc: "Sage etwas mit dem Bot"
|
||||||
|
BanDesc: "Verbannen Sie ein Mitglied von diesem Server."
|
||||||
|
KickDesc: "Treten Sie ein Mitglied von diesem Server."
|
||||||
|
PurgeDesc: "Nachrichten aus dem Chat löschen."
|
||||||
|
|
||||||
|
# Error / Warning Nachrichten
|
||||||
|
|
||||||
|
IncorrectPerms: ":x: **Error!** Du hast nicht die benötigten Berechtigungen um diesen Befehl auszuführen."
|
||||||
|
InvalidChannel: ":x: **Error!** Channel nicht gefunden. Bitte erstelle diesen Channel!"
|
||||||
|
UserNotFound: ":x: **Error!** Dieser Nutzer existiert nicht, ist er auf diesem Server?"
|
||||||
|
NoValidTicket: ":warning: Du kannst diesen Befehl hier nicht verwenden. Dieser Befehl wird zum schließen eines Tickets verwendet."
|
||||||
|
TicketExists: ":warning: Dieses Ticket kann nicht erstellt werden, es existiert bereits."
|
||||||
Regular → Executable
+21
-10
@@ -1,15 +1,26 @@
|
|||||||
{
|
{
|
||||||
"name": "supportbot",
|
"name": "supportbot",
|
||||||
"version": "5.1.0",
|
"version": "6.1",
|
||||||
"description": "a discord dbot that can you help with your servers support",
|
"description": "SupportBot | #1 Self-Hosted Ticket Bot",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
|
||||||
"test": "-help"
|
|
||||||
},
|
|
||||||
"author": "Emerald SRV",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"discord.js": "^12.1.1",
|
"discord.js": "^12.5.1",
|
||||||
"js-yaml": "^3.13.1"
|
"js-yaml": "^4.0.0"
|
||||||
}
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"node-fetch": ">=2.6.1"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "help"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/1tzemerald/SupportBot.git"
|
||||||
|
},
|
||||||
|
"author": "Emerald Services",
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/1tzemerald/SupportBot/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://emeraldsrv.dev"
|
||||||
}
|
}
|
||||||
@@ -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**\nYou can download addons from our marketplace. https://emeraldservices.xyz/")
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
|
||||||
name: someaddon.settings.Addon_Example_Command,
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
|
|
||||||
"Addon_Example_Command": "addonexample"
|
|
||||||
|
|
||||||
}
|
|
||||||
Regular → Executable
File renamed without changes.
Executable
+1
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ReactionMessage_ID: ''
|
||||||
Regular → Executable
+194
-91
@@ -1,120 +1,223 @@
|
|||||||
# _________ __ __________ __
|
# _________ __ __________ __
|
||||||
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||||
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||||
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||||
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||||
# \/ |__| |__| \/
|
# \/ |__| |__| \/
|
||||||
#
|
#
|
||||||
# SupportBot v5.2
|
# SupportBot version 6.1
|
||||||
# Created by © 2020 Emerald Services
|
# Created by Emerald Services
|
||||||
# License: MIT
|
# Installed with MIT License
|
||||||
|
#
|
||||||
|
# Support Server: discord.gg/jspKFcE
|
||||||
|
|
||||||
|
# General Bot Configuration
|
||||||
|
|
||||||
#Bot Indentification
|
|
||||||
Token: "BOT_TOKEN_HERE"
|
Token: "BOT_TOKEN_HERE"
|
||||||
Prefix: "!"
|
Prefix: "-"
|
||||||
Bot_Name: "SupportBot"
|
Bot_Name: "SupportBot"
|
||||||
|
|
||||||
BotActivity: "SupportBot v5.2"
|
BotActivity: "-help | SupportBot"
|
||||||
ActivityType: "PLAYING"
|
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
|
||||||
|
# Must set ActivityType to STREAMING in order for Streaming URL to work in the bots status.
|
||||||
|
|
||||||
EmbedColour: "#4bbf5c"
|
ActivityType: "PLAYING"
|
||||||
|
# Activity status can either be PLAYING, WATCHING, LISTENING or STREAMING.
|
||||||
|
|
||||||
|
DeleteMessages: "true"
|
||||||
|
|
||||||
|
# Embed Configuration
|
||||||
|
|
||||||
|
EmbedColour: "#04b545"
|
||||||
EmbedFooter: "SupportBot | The #1 Supportive Discord Bot"
|
EmbedFooter: "SupportBot | The #1 Supportive Discord Bot"
|
||||||
|
|
||||||
# Colour Settings
|
ErrorColour: "#d12519"
|
||||||
ErrorColour: "#ff3030"
|
SuccessColour: "#04b545"
|
||||||
SuccessColour: "#4bbf5c"
|
|
||||||
WarningColour: "#fca117"
|
WarningColour: "#fca117"
|
||||||
|
|
||||||
# Role Settings
|
# Role Configuration
|
||||||
AutoRole: "Member"
|
|
||||||
StaffRole: "Support"
|
|
||||||
|
|
||||||
locked_role: "@everyone"
|
AutoRole: "true"
|
||||||
everyone: "@everyone"
|
# By setting "AutoRole to 'true' the bot will automatically apply the role below when members joins. Set to 'false' to disable this feature.
|
||||||
|
AutoRole_Role: "Member"
|
||||||
|
LockdownRole: "@everyone"
|
||||||
|
|
||||||
Department_Role_1: "Support"
|
Staff: "Staff"
|
||||||
Department_Role_2: "Sales"
|
Admin: "Administration"
|
||||||
Department_Role_3: "Support"
|
|
||||||
|
|
||||||
# Ticket Department Settings
|
# Ticket Configuration
|
||||||
Ticket_Department_1: "Support"
|
|
||||||
Ticket_Department_2: "Sales"
|
|
||||||
Ticket_Department_3: "Other"
|
|
||||||
|
|
||||||
Ticket_Department_Emoji_1: "🟢"
|
TicketChannel: "ticket"
|
||||||
Ticket_Department_Emoji_2: "🔵"
|
TicketCategory: "Tickets"
|
||||||
Ticket_Department_Emoji_3: "🔴"
|
TicketLog: "ticket-logs"
|
||||||
|
TranscriptLog: "transcripts"
|
||||||
|
TicketSubject: "description"
|
||||||
|
# TicketSubject: "description" means that the subject (reason) of the ticket will be displayed upon the channel description if set to "embed" it will be displayed within the embed.
|
||||||
|
|
||||||
# Ticket Settings
|
AllowTicketMentions: "true"
|
||||||
category: "Tickets"
|
# Set to "true" to allow the ticket to mention the author and the support team.
|
||||||
Ticket_Colour: "#4bbf5c"
|
# Set to "false" to dis-allow mentions within tickets.
|
||||||
Ticket_Channel_Name: "ticket"
|
|
||||||
Ticket_Logs: "ticket-logs"
|
|
||||||
|
|
||||||
Transcript_Log: "ticket-data"
|
# Ticket Panel (Ticket Reaction Create)
|
||||||
Transcript_Title: "Support Transcript"
|
|
||||||
|
|
||||||
Ticket_Closing: "⚠ Your ticket is now closing!"
|
ReactionTickets: true
|
||||||
Ticket_Closure: "Looks like you have come to the end of your support ticket\nPlease confirm that you want to close your ticket."
|
ReactionMessage: "React with %reaction_emoji% to create a Support Ticket!"
|
||||||
Closure_Confirm_Word: "confirm"
|
ReactionPanel_Description: true
|
||||||
|
ReactionDescription: "Create a support ticket to contact a member of staff."
|
||||||
|
ReactionChannel: "create-ticket"
|
||||||
|
ReactionEmoji: "📩"
|
||||||
|
# Custom Emojis: <:test:EMOJI_ID>
|
||||||
|
ReactionPanel_Thumbnail: true
|
||||||
|
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
|
||||||
|
ReactionPanel_Image: true
|
||||||
|
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
|
||||||
|
|
||||||
Ticket_Message: "Your support ticket has been opened successfully\nPlease allow us some time to reach out to you."
|
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
|
||||||
Default_Ticket_Reason: "No Subject"
|
Ticket_Title: "Server Support | %ticketusername%"
|
||||||
|
TicketMessage: "Hello <@%ticketauthor%>, Thank you for creating a support ticket\nPlease wait patiently whilst a member of our team reaches out to you."
|
||||||
|
NoTicketSubject: "No Reason Provided!"
|
||||||
|
TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%>"
|
||||||
|
TranscriptTitle: "Ticket Transcript"
|
||||||
|
|
||||||
# Welcome & Leave
|
AddedUser: "👍 <@%user%> has been added to this ticket"
|
||||||
WelcomeChannel: "welcome"
|
RemovedUser: "👍 <@%user%> has been removed from this ticket"
|
||||||
WelcomeMessage: "Welcome to the server!"
|
|
||||||
|
|
||||||
LeaveChannel: "welcome"
|
ClosingTicket: ":warning: You have requested to close your support ticket."
|
||||||
LeaveMessage: "Thank you for visiting us!"
|
ClosingConfirmation_Word: "confirm"
|
||||||
|
CloseConfirmation: "true"
|
||||||
|
# CloseConfirmation to true will make users confirm that they want to close a their ticket, settings to false will just close the ticket.
|
||||||
|
|
||||||
# Announcement Settings
|
# Ticket Department Configuration
|
||||||
Announcement_Title: "SupportBot Announcement"
|
|
||||||
Announcement_Channel: "announcements"
|
|
||||||
Announcement_Tag_Role: "@everyone"
|
|
||||||
|
|
||||||
# Poll Settings
|
TicketDepartments: "true"
|
||||||
Poll_Channel: "polls"
|
# This option enable or disable the ticket departments. If set false Ticket Departments will not work
|
||||||
Poll_Title: "📊 Polls"
|
|
||||||
|
|
||||||
Reaction_Poll_1: "✅"
|
AllowStaff: "true"
|
||||||
Reaction_Poll_2: "❎"
|
# AllowStaff is an option to whether or not you want the users with the "Staff" role to be able to view inside tickets. If set false "Staff" will not view tickets.
|
||||||
|
|
||||||
# Suggestion Settings
|
DepartmentEmoji_1: "🙋"
|
||||||
Suggestion_Title: "SupportBot Suggestions"
|
DepartmentEmoji_2: "💸"
|
||||||
Suggestion_Channel: "suggestions"
|
DepartmentEmoji_3: "📗"
|
||||||
|
# Ticket emojis, the emojis are what users will need to react with inorder to proceed furthur if departments are enabled.
|
||||||
|
|
||||||
suggestyes: "✅"
|
DepartmentTitle_1: "Support"
|
||||||
suggestno: "❎"
|
DepartmentTitle_2: "Billing"
|
||||||
|
DepartmentTitle_3: "Other"
|
||||||
|
# Ticket department title, This is the title for a ticket department to help users know what is available.
|
||||||
|
|
||||||
# Report Settings
|
DepartmentRole_1: "Support"
|
||||||
Report_Channel: "reports"
|
DepartmentRole_2: "Admin"
|
||||||
Report_Title: "SupportBot Report"
|
DepartmentRole_3: "Support"
|
||||||
|
# Ticket roles are the roles that will be able to gain access to tickets depending on what department has been choosen.
|
||||||
|
|
||||||
# Link Settings
|
# System Message Configuration
|
||||||
LINKS_TITLE: "SupportBot Links"
|
|
||||||
|
|
||||||
LINKS:
|
SystemMessages: "true"
|
||||||
"Discord": "https://discord.gg/"
|
|
||||||
"Twitter": "https://twitter.com/"
|
|
||||||
"Website": "https://example.com/"
|
|
||||||
"AddMore": "AddMoreIfYouWant"
|
|
||||||
|
|
||||||
# Bot Command Settings
|
SystemMessage_Channel: "system-messages"
|
||||||
Add_Command: "add"
|
SystemMessage_Type: "embed"
|
||||||
Remove_Command: "remove"
|
# There are 2 types of how you can send system messages, 'normal' or 'embed'
|
||||||
Ticket_Command: "ticket"
|
SystemMessage_Icon: "USER"
|
||||||
Close_Command: "close"
|
|
||||||
Forceclose_Command: "forceclose"
|
Welcome_Title: "User Joined!"
|
||||||
Rename_Command: "rename"
|
WelcomeMessage: "Hello %member%, Welcome to %guildname%!"
|
||||||
Lockchat_Command: "lock"
|
# %member% define the user who joined and %guildnamne% defines the server name.
|
||||||
UnLockchat_Command: "unlock"
|
|
||||||
Announcement_Command: "announce"
|
Leave_Title: "User Left!"
|
||||||
Say_Command: "say"
|
LeaveMessage: "Goodbye %member%, Thank you for visting %guildname%!"
|
||||||
Suggest_Command: "suggest"
|
# %member% define the user who left and %guildnamne% defines the server name.
|
||||||
Ping_Command: "ping"
|
|
||||||
Help_Command: "help"
|
SystemMessage_EmbedFooter: "false"
|
||||||
Link_Command: "links"
|
|
||||||
Poll_Command: "poll"
|
# LINKS Configuration
|
||||||
Report_Command: "report"
|
|
||||||
Setup_Command: "setup"
|
LinksTitle: "Quick Links"
|
||||||
|
|
||||||
|
LINKS:
|
||||||
|
"Website": "https://www.example.com"
|
||||||
|
"Store": "https://store.example.com"
|
||||||
|
"Discord": "https://discord.gg/example"
|
||||||
|
# "Twitter": "https://twitter.com/example"
|
||||||
|
|
||||||
|
# Suggestions Configuration
|
||||||
|
|
||||||
|
SuggestionChannel: "suggestions"
|
||||||
|
SuggestionTitle: "Suggestion"
|
||||||
|
SuggestionStarter: "What would you like to suggest?"
|
||||||
|
SuggestReact_1: 👍
|
||||||
|
SuggestReact_2: 👎
|
||||||
|
|
||||||
|
# Announcement Configuration
|
||||||
|
|
||||||
|
AnnouncementChannel: "announcements"
|
||||||
|
AnnouncementTitle: "Servername Announcement"
|
||||||
|
AnnouncementIcon: "https://i.imgur.com/HbkZyB7.png"
|
||||||
|
|
||||||
|
AnnouncementStarter: "What would you like to announce?"
|
||||||
|
|
||||||
|
# Moderation System Configuration
|
||||||
|
|
||||||
|
BanTitle: "User Banned!"
|
||||||
|
DaysBannedFor: 7
|
||||||
|
BanLogColour: "#D911B4"
|
||||||
|
|
||||||
|
KickTitle: "User Kicked!"
|
||||||
|
KickLogColour: "#D9B111"
|
||||||
|
|
||||||
|
ModThumbnail: "https://i.imgur.com/l6P3DF6.png"
|
||||||
|
ModLogChannel: "mod-logs"
|
||||||
|
|
||||||
|
PruneLogTitle: "Bulk Delete"
|
||||||
|
PruneThumbnail: "https://i.imgur.com/OAgW2vR.png"
|
||||||
|
PruneColour: "#1BA30C"
|
||||||
|
|
||||||
|
|
||||||
|
# General Command Configuration
|
||||||
|
|
||||||
|
HelpCommand: "help"
|
||||||
|
LinksCommand: "links"
|
||||||
|
PingCommand: "ping"
|
||||||
|
SuggestCommand: "suggest"
|
||||||
|
|
||||||
|
# Support Command Configuration
|
||||||
|
|
||||||
|
NewTicket: "ticket"
|
||||||
|
CloseTicket: "close"
|
||||||
|
AddUser: "add"
|
||||||
|
RemoveUser: "remove"
|
||||||
|
RenameTicket: "rename"
|
||||||
|
|
||||||
|
# Staff Command Configuration
|
||||||
|
|
||||||
|
BotSay: "say"
|
||||||
|
PurgeMessage: "purge"
|
||||||
|
|
||||||
|
# Admin Command Configuration
|
||||||
|
|
||||||
|
AnnounceCommand: "announce"
|
||||||
|
BanUser: "ban"
|
||||||
|
KickUser: "kick"
|
||||||
|
|
||||||
|
# Commmand Descriptions
|
||||||
|
|
||||||
|
NewTicketDesc: "Create a new support ticket"
|
||||||
|
AnnounceDesc: "Create a server announcement"
|
||||||
|
CloseTicketDesc: "Close your support ticket"
|
||||||
|
LinksDesc: "View some important links"
|
||||||
|
PingDesc: "Get the bot's latency"
|
||||||
|
HelpDesc: "Get a list of all the commands"
|
||||||
|
RemoveUserDesc: "Remove a user from a support ticket"
|
||||||
|
AddUserDesc: "Add a user to a support ticket"
|
||||||
|
SuggestionDesc: "Create a server suggestion"
|
||||||
|
BotSayDesc: "Say something with the bot"
|
||||||
|
BanDesc: "Ban a member from this server."
|
||||||
|
KickDesc: "Kick a member from this server."
|
||||||
|
PurgeDesc: "Purge messages from the chat."
|
||||||
|
|
||||||
|
# Error / Warining Messages
|
||||||
|
|
||||||
|
IncorrectPerms: ":x: **Err!** You do not have the correct permissions to use this command."
|
||||||
|
InvalidChannel: ":x: **Err!** Channel not found. Please create it!"
|
||||||
|
UserNotFound: ":x: **Err!** This user doesn't exist, Are they in this server?"
|
||||||
|
NoValidTicket: ":warning: You cannot execute this command here. This command is used when closing a ticket."
|
||||||
|
TicketExists: ":warning: This ticket cannot be opened, It already exists!"
|
||||||
Regular → Executable
+8
-8
@@ -1,4 +1,4 @@
|
|||||||
// SupportBot Utility
|
// SupportBot Utils
|
||||||
// Ticket Numbers
|
// Ticket Numbers
|
||||||
|
|
||||||
const discord = require("discord.js")
|
const discord = require("discord.js")
|
||||||
@@ -21,14 +21,14 @@ class TicketNumberID {
|
|||||||
|
|
||||||
static get(guildId) {
|
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]) {
|
if (!ticketnumberID[guildId]) {
|
||||||
ticketnumberID[guildId] = {
|
ticketnumberID[guildId] = {
|
||||||
id: 0
|
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);
|
if (err) console.log(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -41,13 +41,13 @@ class TicketNumberID {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static set(guildId, value) {
|
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] = {
|
ticketnumberID[guildId] = {
|
||||||
id: value
|
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);
|
if (err) console.log(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -55,13 +55,13 @@ class TicketNumberID {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static reset(guildId) {
|
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] = {
|
ticketnumberID[guildId] = {
|
||||||
id: 0
|
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);
|
if (err) console.log(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -69,4 +69,4 @@ class TicketNumberID {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = TicketNumberID;
|
module.exports = TicketNumberID;
|
||||||
Reference in new issue
Block a user