Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44fbe9f2d6 | ||
|
|
29db6c7d67 | ||
|
|
69f0b00ed3 | ||
|
|
c1a1839457 | ||
|
|
dd4b53800e | ||
|
|
1fc94528fc | ||
|
|
bb1a817980 | ||
|
|
53305acbc7 | ||
|
|
d0f1bae0bd | ||
|
|
c0cf3b1bb7 |
No files matched your search
+2
-1
@@ -1 +1,2 @@
|
||||
node_modules/
|
||||
node_modules/
|
||||
.DS_Store
|
||||
+2
-8
@@ -22,42 +22,36 @@ module.exports = new Command({
|
||||
type: "STRING",
|
||||
required: true,
|
||||
},
|
||||
|
||||
{
|
||||
name: "message",
|
||||
description: "Embed Message",
|
||||
type: "STRING",
|
||||
required: true,
|
||||
},
|
||||
|
||||
{
|
||||
name: "color",
|
||||
description: "Embed HEX Color",
|
||||
type: "STRING",
|
||||
required: false,
|
||||
},
|
||||
|
||||
{
|
||||
name: "fieldtitle",
|
||||
description: "Add an additional Embed Field",
|
||||
type: "STRING",
|
||||
required: false,
|
||||
},
|
||||
|
||||
{
|
||||
name: "fieldcontent",
|
||||
description: "Add an additional Embed Field",
|
||||
type: "STRING",
|
||||
required: false,
|
||||
},
|
||||
|
||||
{
|
||||
name: "thumbnail",
|
||||
description: "Embed Thumbnail URL",
|
||||
type: "STRING",
|
||||
required: false,
|
||||
},
|
||||
|
||||
{
|
||||
name: "image",
|
||||
description: "Embed Image URL",
|
||||
@@ -98,10 +92,10 @@ module.exports = new Command({
|
||||
const EmbedMsg = new Discord.MessageEmbed()
|
||||
.setTitle(EmbedTitle)
|
||||
.setDescription(EmbedSubject)
|
||||
.addField(EmbedFieldTitle, EmbedFieldContent)
|
||||
.setColor(EmbedColour)
|
||||
.setThumbnail(EmbedThumbnail)
|
||||
.setImage(EmbedImage);
|
||||
.setImage(EmbedImage)
|
||||
if (EmbedFieldTitle && EmbedFieldContent) { EmbedMsg.addField(EmbedFieldTitle, EmbedFieldContent) };
|
||||
|
||||
interaction.reply({
|
||||
embeds: [EmbedMsg],
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// SupportBot | Emerald Services
|
||||
// Ping Command
|
||||
// Suggest Command
|
||||
|
||||
const fs = require("fs");
|
||||
|
||||
|
||||
+6
-7
@@ -102,7 +102,7 @@ module.exports = new Command({
|
||||
ephemeral: true,
|
||||
});
|
||||
let TicketCategory = await getCategory(
|
||||
supportbot.Departments[department].category || supportbot.TicketCategory,
|
||||
supportbot.Departments[department].category,
|
||||
interaction.guild
|
||||
);
|
||||
const ticketChannel = await interaction.guild.channels.create(
|
||||
@@ -131,7 +131,7 @@ module.exports = new Command({
|
||||
VIEW_CHANNEL: true,
|
||||
});
|
||||
}
|
||||
if (supportbot.TicketDepartments && !department) {
|
||||
if (!department) {
|
||||
await ticketChannel.permissionOverwrites.edit(interaction.user.id, {
|
||||
SEND_MESSAGES: false,
|
||||
});
|
||||
@@ -196,7 +196,7 @@ module.exports = new Command({
|
||||
}
|
||||
}
|
||||
|
||||
if (supportbot.TicketDepartments && !department) {
|
||||
if (!department) {
|
||||
TicketMessage.addFields({
|
||||
name: "Departments",
|
||||
value: ` **${supportbot.Departments.map((X) => X.title).join("\n")}**`,
|
||||
@@ -215,7 +215,7 @@ module.exports = new Command({
|
||||
.setEmoji(supportbot.TicketLockEmoji);
|
||||
|
||||
const row2 = new MessageActionRow().addComponents(CloseButton, LockButton);
|
||||
if (supportbot.TicketDepartments && !department) {
|
||||
if (!department) {
|
||||
try {
|
||||
let buttons = await supportbot.Departments.map((x) =>
|
||||
new MessageButton()
|
||||
@@ -306,8 +306,7 @@ module.exports = new Command({
|
||||
VIEW_CHANNEL: true,
|
||||
});
|
||||
let TicketCat = await getCategory(
|
||||
supportbot.Departments[department].category ||
|
||||
supportbot.TicketCategory,
|
||||
supportbot.Departments[department].category,
|
||||
interaction.guild
|
||||
);
|
||||
await ticketChannel.setParent(TicketCat.id, { lockPermissions: false });
|
||||
@@ -323,7 +322,7 @@ module.exports = new Command({
|
||||
}
|
||||
}
|
||||
if (supportbot.AllowTicketMentions) {
|
||||
await ticketChannel.send("@here");
|
||||
await ticketChannel.send(supportbot.TicketRoleMention);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// SupportBot | Emerald Services
|
||||
// Ticket Add Command
|
||||
// Translate Command
|
||||
|
||||
const fs = require("fs");
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ InfoCommand: "info"
|
||||
PingCommand: "ping"
|
||||
HelpCommand: "help"
|
||||
EmbedCommand: "embed"
|
||||
SuggestCommand: "suggestion"
|
||||
SuggestCommand: "suggest"
|
||||
TranslateCommand: "translate"
|
||||
UserInfoCommand: "userinfo"
|
||||
|
||||
|
||||
+47
-47
@@ -10,20 +10,20 @@
|
||||
# Discord Support: https://emeraldsrv.dev/discord
|
||||
# Community Resources: https://emeraldsrv.dev/resources
|
||||
|
||||
SupportBot_Version: "7.7 BETA-v2"
|
||||
SupportBot_Version: "v7.7"
|
||||
|
||||
# -------------------------
|
||||
# General Configuration
|
||||
# -------------------------
|
||||
|
||||
Name: "SupportBot"
|
||||
Token: "BOT_TOKEN_HERE"
|
||||
Token: "BOT_TOKEN HTTPS://DISCORD.COM/DEVELOPERS"
|
||||
|
||||
# -------------------------
|
||||
# Activity Configuration
|
||||
# -------------------------
|
||||
|
||||
BotActivity: "Need Help? /ticket"
|
||||
BotActivity: "Here to help!"
|
||||
|
||||
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
|
||||
# Set The ActivityType to "STREAMING" for a streaming status!
|
||||
@@ -36,23 +36,12 @@ ActivityType: "PLAYING"
|
||||
# -------------------------
|
||||
|
||||
EmbedColour: "#f74343"
|
||||
EmbedFooter: "SupportBot | An Advanced Ticket System"
|
||||
EmbedFooter: "SupportBot | Developed by Emerald Services"
|
||||
|
||||
ErrorColour: "#d12519"
|
||||
SuccessColour: "#04b545"
|
||||
WarningColour: "#fca117"
|
||||
|
||||
# -------------------------
|
||||
# Information Configuration
|
||||
# -------------------------
|
||||
|
||||
InfoTitle: "Information"
|
||||
AboutMe: "Hi, I'm SupportBot an advanced discord ticket bot with 100% customization! [Download](https://emeraldsrv.dev/download)"
|
||||
|
||||
InfoButtonText: "Visit Site"
|
||||
InfoURL: "https://emeraldsrv.dev"
|
||||
InfoColour: "#f74343"
|
||||
|
||||
# -------------------------
|
||||
# Role Configuration
|
||||
# -------------------------
|
||||
@@ -104,6 +93,15 @@ EmbedLeaveThumbnail: false
|
||||
# "BOT" will display the bot's profile picture.
|
||||
# false to disable
|
||||
|
||||
# -------------------------
|
||||
# Information Configuration
|
||||
# -------------------------
|
||||
|
||||
InfoTitle: "Information"
|
||||
|
||||
InfoButtonText: "Visit Site"
|
||||
InfoURL: "https://emeraldsrv.dev"
|
||||
InfoColour: "#f74343"
|
||||
|
||||
# ----------------------------
|
||||
# Suggestions Configuration
|
||||
@@ -117,7 +115,7 @@ SuggestionThreads: true
|
||||
# set to false to disable threads being created from suggestions.
|
||||
|
||||
DisableSuggestions: false
|
||||
# Set to true to disable the suggestiosn feature.
|
||||
# Set to true to disable the suggestions feature.
|
||||
|
||||
# -------------------------
|
||||
# Translate Configuration
|
||||
@@ -129,7 +127,6 @@ TranslateLogChannel: "translations-log"
|
||||
# Tickets Configuration
|
||||
# -------------------------
|
||||
|
||||
TicketCategory: "Tickets" # Only for tickets without a category
|
||||
TicketPrefix: "ticket-" # The prefix for ticket channel names
|
||||
|
||||
TicketLog: "ticket-data"
|
||||
@@ -139,6 +136,8 @@ DMTranscripts: true
|
||||
TranscriptTitle: "Ticket Transcript"
|
||||
TicketLog_Title: "Ticket Closed"
|
||||
TicketBlackListMessage: "You are not allowed to open a ticket"
|
||||
TicketRoleMention: "@here"
|
||||
# To ping a role: <@ROLE_ID>
|
||||
|
||||
MaxAllowedTickets: 2
|
||||
|
||||
@@ -176,35 +175,12 @@ TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%
|
||||
AddedUser: "👍 <@%user%> has been added to this ticket"
|
||||
RemovedUser: "👍 <@%user%> has been removed from this ticket"
|
||||
|
||||
# --- Buttons Config ---
|
||||
# --- Start ---
|
||||
# -------------------------
|
||||
# Tickets Categories
|
||||
# -------------------------
|
||||
|
||||
# Discord Button Colour Selection
|
||||
# PRIMARY - Blue
|
||||
# SECONDARY - Grey
|
||||
# DANGER - Red
|
||||
# SUCCESS - Green
|
||||
|
||||
LockTicketCategory: "Archive"
|
||||
|
||||
TicketCloseEmoji: "❌"
|
||||
TicketDeleteEmoji: "⛔"
|
||||
TicketLockEmoji: "🔒"
|
||||
|
||||
TicketCloseColour: "DANGER"
|
||||
TicketDeleteColour: "DANGER"
|
||||
TicketLockColour: "PRIMARY"
|
||||
|
||||
TranscriptSavedMessage: "📝 **Transcript Saved!**"
|
||||
TicketLockMessage: "❌ **Ticket Locked!**"
|
||||
TicketDeleteMessage: "⚠ **Ticket Deleting!**" # Tickets deleting after 5 seconds by default.
|
||||
|
||||
# --- Departments Config ---
|
||||
# --- Start ---
|
||||
|
||||
TicketDepartments: true
|
||||
# Delete the ticket if no department selected. TIME IN MINUTES
|
||||
Timeout: 5
|
||||
|
||||
# Set to true to allow all staff to access the ticket
|
||||
AllowAllStaff: false
|
||||
|
||||
@@ -215,19 +191,20 @@ Departments:
|
||||
role: "Staff"
|
||||
color: "SECONDARY"
|
||||
emoji: "1️⃣"
|
||||
category: "Billing Support"
|
||||
category: "Tickets"
|
||||
|
||||
- title: "Billing Support"
|
||||
role: "Staff"
|
||||
color: "SECONDARY"
|
||||
emoji: "2️⃣"
|
||||
category: "Admin Team"
|
||||
category: "Tickets"
|
||||
|
||||
- title: "Admin Team"
|
||||
role: "Admin"
|
||||
color: "SECONDARY"
|
||||
emoji: "3️⃣"
|
||||
category: "Admin Support"
|
||||
category: "Tickets"
|
||||
|
||||
# - title: "Other"
|
||||
# role: "Staff"
|
||||
# color: "SECONDARY"
|
||||
@@ -240,6 +217,29 @@ Departments:
|
||||
# DANGER - Red
|
||||
# SUCCESS - Green
|
||||
|
||||
# --- Buttons Config ---
|
||||
# --- Start ---
|
||||
|
||||
LockTicketCategory: "Archive"
|
||||
|
||||
TicketCloseEmoji: "❌"
|
||||
TicketDeleteEmoji: "⛔"
|
||||
TicketLockEmoji: "🔒"
|
||||
|
||||
TicketCloseColour: "DANGER"
|
||||
TicketDeleteColour: "DANGER"
|
||||
TicketLockColour: "PRIMARY"
|
||||
|
||||
# Discord Button Colour Selection
|
||||
# PRIMARY - Blue
|
||||
# SECONDARY - Grey
|
||||
# DANGER - Red
|
||||
# SUCCESS - Green
|
||||
|
||||
TranscriptSavedMessage: "📝 **Transcript Saved!**"
|
||||
TicketLockMessage: "❌ **Ticket Locked!**"
|
||||
TicketDeleteMessage: "⚠ **Ticket Deleting!**" # Tickets deleting after 5 seconds by default.
|
||||
|
||||
# --- Closing Config ---
|
||||
# --- Start ---
|
||||
|
||||
|
||||
@@ -20,17 +20,10 @@ TicketPanel: true
|
||||
# Ticket Panel Message Configuration
|
||||
# ----------------------------------------
|
||||
|
||||
Channel: "▣┃ticket-creation"
|
||||
ButtonEmoji: "📩"
|
||||
ButtonLabel: "Create Ticket"
|
||||
ButtonColour: "SUCCESS"
|
||||
# Colour Options:
|
||||
# -> PRIMARY - Purple
|
||||
# -> SECONDARY - Grey
|
||||
# -> SUCCESS - Green
|
||||
# -> DANGER - Red
|
||||
Channel: "ticket-creation"
|
||||
|
||||
PanelTitle: "Need Help? Create a Support Ticket."
|
||||
PanelColour: "#f74343"
|
||||
|
||||
TicketPanel_Description: true
|
||||
TicketPanel_Thumbnail: true
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
{
|
||||
"tickets": []
|
||||
}
|
||||
{"tickets": [{}]}
|
||||
@@ -1 +1,4 @@
|
||||
{"id":0,"TicketPanelID":""}
|
||||
{
|
||||
"id": 0,
|
||||
"TicketPanelID": ""
|
||||
}
|
||||
+21
-26
@@ -21,16 +21,17 @@ module.exports = new Event("ready", async (client, interaction) => {
|
||||
url: supportbot.StreamingURL,
|
||||
});
|
||||
|
||||
console.log(`\u001b[32m`, `┏━━━┓╋╋╋╋╋╋╋╋╋╋╋╋╋┏┓┏━━┓╋╋╋┏┓`);
|
||||
console.log(`\u001b[32m`, `┃┏━┓┃╋╋╋╋╋╋╋╋╋╋╋╋┏┛┗┫┏┓┃╋╋┏┛┗┓`);
|
||||
console.log(`\u001b[32m`, `┃┗━━┳┓┏┳━━┳━━┳━━┳┻┓┏┫┗┛┗┳━┻┓┏┛`);
|
||||
console.log(`\u001b[32m`, `┗━━┓┃┃┃┃┏┓┃┏┓┃┏┓┃┏┫┃┃┏━┓┃┏┓┃┃`);
|
||||
console.log(`\u001b[32m`, `┃┗━┛┃┗┛┃┗┛┃┗┛┃┗┛┃┃┃┗┫┗━┛┃┗┛┃┗┓`);
|
||||
console.log(`\u001b[32m`, `┗━━━┻━━┫┏━┫┏━┻━━┻┛┗━┻━━━┻━━┻━┛`);
|
||||
console.log(`\u001b[32m`, `┗╋╋╋╋╋╋╋┃┃╋┃┃`);
|
||||
console.log(`\u001b[32m`, `╋╋╋╋╋╋╋┗┛╋┗┛`);
|
||||
console.log(`\u001b[107m`, `――――――――――――――――――――――――――――――――――――――――――――`);
|
||||
console.log(`\u001b[91m`, `┏━━━┓╋╋╋╋╋╋╋╋╋╋╋╋╋┏┓┏━━┓╋╋╋┏┓`);
|
||||
console.log(`\u001b[91m`, `┃┏━┓┃╋╋╋╋╋╋╋╋╋╋╋╋┏┛┗┫┏┓┃╋╋┏┛┗┓`);
|
||||
console.log(`\u001b[91m`, `┃┗━━┳┓┏┳━━┳━━┳━━┳┻┓┏┫┗┛┗┳━┻┓┏┛`);
|
||||
console.log(`\u001b[91m`, `┗━━┓┃┃┃┃┏┓┃┏┓┃┏┓┃┏┫┃┃┏━┓┃┏┓┃┃`);
|
||||
console.log(`\u001b[91m`, `┃┗━┛┃┗┛┃┗┛┃┗┛┃┗┛┃┃┃┗┫┗━┛┃┗┛┃┗┓`);
|
||||
console.log(`\u001b[91m`, `┗━━━┻━━┫┏━┫┏━┻━━┻┛┗━┻━━━┻━━┻━┛`);
|
||||
console.log(`\u001b[91m`, `┗╋╋╋╋╋╋╋┃┃╋┃┃`);
|
||||
console.log(`\u001b[91m`, `╋╋╋╋╋╋╋┗┛╋┗┛`);
|
||||
console.log(` `);
|
||||
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`);
|
||||
console.log(`\u001b[32m`, `――――――――――――――――――――――――――――――――――――――――――――`);
|
||||
console.log(` `);
|
||||
console.log(
|
||||
`\u001b[33m`,
|
||||
@@ -83,9 +84,9 @@ module.exports = new Event("ready", async (client, interaction) => {
|
||||
supportbot.Staff,
|
||||
supportbot.TicketBlackListRole,
|
||||
];
|
||||
if (supportbot.TicketDepartments) {
|
||||
|
||||
supportbot.Departments.forEach((department) => roles.push(department.role));
|
||||
}
|
||||
|
||||
if (supportbot.AutoRole) roles.push(supportbot.JoinRole);
|
||||
const channels = [
|
||||
supportbot.SuggestionChannel,
|
||||
@@ -96,7 +97,7 @@ module.exports = new Event("ready", async (client, interaction) => {
|
||||
supportbot.LeaveChannel,
|
||||
supportbot.TranslateLogChannel
|
||||
];
|
||||
const categories = [supportbot.TicketCategory];
|
||||
//const categories = [supportbot.TicketCategory];
|
||||
|
||||
const missingC = [];
|
||||
const missingR = [];
|
||||
@@ -112,10 +113,10 @@ module.exports = new Event("ready", async (client, interaction) => {
|
||||
const find = await getRole(r, client.guilds.cache.first());
|
||||
if (!find) missingR.push(r);
|
||||
}
|
||||
for (let cat of categories) {
|
||||
const find = await getCategory(cat, client.guilds.cache.first());
|
||||
if (!find) missingCat.push(cat);
|
||||
}
|
||||
// for (let cat of categories) {
|
||||
// const find = await getCategory(cat, client.guilds.cache.first());
|
||||
// if (!find) missingCat.push(cat);
|
||||
// }
|
||||
|
||||
if (missingR.length > 0) {
|
||||
console.log(
|
||||
@@ -163,7 +164,7 @@ module.exports = new Event("ready", async (client, interaction) => {
|
||||
chan1.messages.fetch(panelid.TicketPanelID).catch(async () => {
|
||||
let embed = new Discord.MessageEmbed()
|
||||
.setTitle(panelconfig.PanelTitle)
|
||||
.setColor(supportbot.SuccessColour)
|
||||
.setColor(panelconfig.PanelColour)
|
||||
.setFooter({
|
||||
text: supportbot.EmbedFooter,
|
||||
iconURL: interaction.user.displayAvatarURL(),
|
||||
@@ -181,7 +182,7 @@ module.exports = new Event("ready", async (client, interaction) => {
|
||||
embed.setImage(panelconfig.PanelImage);
|
||||
}
|
||||
let button;
|
||||
if (supportbot.TicketDepartments) {
|
||||
|
||||
button = supportbot.Departments.map((x) =>
|
||||
new Discord.MessageButton()
|
||||
.setCustomId("department-" + supportbot.Departments.indexOf(x))
|
||||
@@ -189,13 +190,7 @@ module.exports = new Event("ready", async (client, interaction) => {
|
||||
.setStyle(x.color)
|
||||
.setEmoji(x.emoji)
|
||||
);
|
||||
} else {
|
||||
button = new Discord.MessageButton()
|
||||
.setLabel(panelconfig.ButtonLabel)
|
||||
.setCustomId("openticket")
|
||||
.setStyle(panelconfig.ButtonColour)
|
||||
.setEmoji(panelconfig.ButtonEmoji);
|
||||
}
|
||||
|
||||
let row = new Discord.MessageActionRow().addComponents(button);
|
||||
|
||||
await chan1
|
||||
@@ -219,4 +214,4 @@ module.exports = new Event("ready", async (client, interaction) => {
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Emerald Services
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
Generated
+141
-4341
File diff suppressed because it is too large.
Load diff
+2
-4
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "supportbot",
|
||||
"version": "7.4.2",
|
||||
"version": "7.7b",
|
||||
"description": "SupportBot is an open-sourced support system for discord. It's completely free to use with high amounts of customization to match your own brand.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -21,8 +21,6 @@
|
||||
"@vitalets/google-translate-api": "^8.0.0",
|
||||
"discord.js": "^13.6.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"moment": "^2.29.3",
|
||||
"translate": "^1.4.1",
|
||||
"twitter": "^1.7.1"
|
||||
"moment": "^2.29.3"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user