Compare commits

...
10 Commits
Author SHA1 Message Date
ItzEmerald 44fbe9f2d6 FINAL 7.7 2022-06-28 03:15:52 +01:00
ItzEmerald 29db6c7d67 7.7 FINAL BETA 2022-06-28 03:14:54 +01:00
ItzEmerald 69f0b00ed3 7.7 2022-06-23 00:05:08 +01:00
ItzEmerald c1a1839457 7.7 BETA 3 2022-06-22 23:30:59 +01:00
Xiled Emerald dd4b53800e Merge pull request #124 from Emerald-Services/add-license-1
Create LICENSE.md
2022-06-22 23:05:38 +01:00
Xiled Emerald 1fc94528fc Merge pull request #123 from SypherRed/release
embed fix and updates
2022-06-22 23:05:25 +01:00
SypherRed bb1a817980 fix previous push of embed
fixed the if-statement of embed
2022-06-22 20:59:45 +02:00
SypherRed 53305acbc7 Fixed embed command
Added a check if the field options are used, if not leave it ignored and don't add some.

This was fixed due to ticket-0038.
2022-06-22 18:21:25 +02:00
Xiled Emerald d0f1bae0bd Create LICENSE.md 2022-06-22 02:24:19 +01:00
SypherRed c0cf3b1bb7 Update several files
* added to .gitignore ".DS_Store"

* changed commented head in "suggest.js" and "translate.js"

* Removed "AboutMe" due it to being unfunctional and can be set in the Developer Portal

* Removed the icon in "ticket-panel.yml"

* Updated dependencies and changed version to match current
2022-06-21 09:54:22 +02:00
16 changed files with 252 additions and 6483 deletions

No files matched your search

Vendored
BIN
View File
Binary file not shown.
+2 -1
View File
@@ -1 +1,2 @@
node_modules/
node_modules/
.DS_Store
+2 -8
View File
@@ -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
View File
@@ -1,5 +1,5 @@
// SupportBot | Emerald Services
// Ping Command
// Suggest Command
const fs = require("fs");
+6 -7
View File
@@ -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 -1
View File
@@ -1,5 +1,5 @@
// SupportBot | Emerald Services
// Ticket Add Command
// Translate Command
const fs = require("fs");
+1 -1
View File
@@ -23,7 +23,7 @@ InfoCommand: "info"
PingCommand: "ping"
HelpCommand: "help"
EmbedCommand: "embed"
SuggestCommand: "suggestion"
SuggestCommand: "suggest"
TranslateCommand: "translate"
UserInfoCommand: "userinfo"
+47 -47
View File
@@ -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 ---
+2 -9
View File
@@ -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
View File
@@ -1,3 +1 @@
{
"tickets": []
}
{"tickets": [{}]}
+4 -1
View File
@@ -1 +1,4 @@
{"id":0,"TicketPanelID":""}
{
"id": 0,
"TicketPanelID": ""
}
+21 -26
View File
@@ -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
View File
@@ -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.
+141 -4341
View File
File diff suppressed because it is too large. Load diff
+2 -4
View File
@@ -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"
}
}
-2033
View File
File diff suppressed because it is too large. Load diff