Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44fbe9f2d6 | ||
|
|
29db6c7d67 | ||
|
|
69f0b00ed3 | ||
|
|
c1a1839457 | ||
|
|
dd4b53800e | ||
|
|
1fc94528fc | ||
|
|
bb1a817980 | ||
|
|
53305acbc7 | ||
|
|
d0f1bae0bd | ||
|
|
c0cf3b1bb7 | ||
|
|
ce67b668d5 | ||
|
|
3273cfd0e1 | ||
|
|
fd992a6514 | ||
|
|
550d681fe1 | ||
|
|
7d29226953 | ||
|
|
38da72ca91 |
No files matched your search
+2
-1
@@ -1 +1,2 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
|
.DS_Store
|
||||||
+5
-5
@@ -154,11 +154,11 @@ module.exports = new Command({
|
|||||||
html += `-----<br><br>`;
|
html += `-----<br><br>`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (!(supportbot.DisableTicketLogChannel)) {
|
||||||
await logChannel.send({ embeds: [logEmbed] }).catch((err) => {
|
await logChannel.send({ embeds: [logEmbed] }).catch((err) => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
let file = new Discord.MessageAttachment(
|
let file = new Discord.MessageAttachment(
|
||||||
Buffer.from(html),
|
Buffer.from(html),
|
||||||
`${interaction.channel.name}.html`
|
`${interaction.channel.name}.html`
|
||||||
|
|||||||
+2
-8
@@ -22,42 +22,36 @@ module.exports = new Command({
|
|||||||
type: "STRING",
|
type: "STRING",
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "message",
|
name: "message",
|
||||||
description: "Embed Message",
|
description: "Embed Message",
|
||||||
type: "STRING",
|
type: "STRING",
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "color",
|
name: "color",
|
||||||
description: "Embed HEX Color",
|
description: "Embed HEX Color",
|
||||||
type: "STRING",
|
type: "STRING",
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "fieldtitle",
|
name: "fieldtitle",
|
||||||
description: "Add an additional Embed Field",
|
description: "Add an additional Embed Field",
|
||||||
type: "STRING",
|
type: "STRING",
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "fieldcontent",
|
name: "fieldcontent",
|
||||||
description: "Add an additional Embed Field",
|
description: "Add an additional Embed Field",
|
||||||
type: "STRING",
|
type: "STRING",
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "thumbnail",
|
name: "thumbnail",
|
||||||
description: "Embed Thumbnail URL",
|
description: "Embed Thumbnail URL",
|
||||||
type: "STRING",
|
type: "STRING",
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "image",
|
name: "image",
|
||||||
description: "Embed Image URL",
|
description: "Embed Image URL",
|
||||||
@@ -98,10 +92,10 @@ module.exports = new Command({
|
|||||||
const EmbedMsg = new Discord.MessageEmbed()
|
const EmbedMsg = new Discord.MessageEmbed()
|
||||||
.setTitle(EmbedTitle)
|
.setTitle(EmbedTitle)
|
||||||
.setDescription(EmbedSubject)
|
.setDescription(EmbedSubject)
|
||||||
.addField(EmbedFieldTitle, EmbedFieldContent)
|
|
||||||
.setColor(EmbedColour)
|
.setColor(EmbedColour)
|
||||||
.setThumbnail(EmbedThumbnail)
|
.setThumbnail(EmbedThumbnail)
|
||||||
.setImage(EmbedImage);
|
.setImage(EmbedImage)
|
||||||
|
if (EmbedFieldTitle && EmbedFieldContent) { EmbedMsg.addField(EmbedFieldTitle, EmbedFieldContent) };
|
||||||
|
|
||||||
interaction.reply({
|
interaction.reply({
|
||||||
embeds: [EmbedMsg],
|
embeds: [EmbedMsg],
|
||||||
|
|||||||
+4
-1
@@ -32,7 +32,10 @@ module.exports = new Command({
|
|||||||
botCommands += `**/${cmdconfig.InfoCommand}** ${cmdconfig.InfoCommandDesc}\n`;
|
botCommands += `**/${cmdconfig.InfoCommand}** ${cmdconfig.InfoCommandDesc}\n`;
|
||||||
botCommands += `**/${cmdconfig.PingCommand}** ${cmdconfig.PingCommandDesc}\n`;
|
botCommands += `**/${cmdconfig.PingCommand}** ${cmdconfig.PingCommandDesc}\n`;
|
||||||
botCommands += `**/${cmdconfig.UserInfoCommand}** ${cmdconfig.UserInfoCommandDesc}\n`;
|
botCommands += `**/${cmdconfig.UserInfoCommand}** ${cmdconfig.UserInfoCommandDesc}\n`;
|
||||||
botCommands += `**/${cmdconfig.SuggestCommand}** ${cmdconfig.SuggestCommandDesc}\n`;
|
|
||||||
|
if (supportbot.DisableSuggestions === false) {
|
||||||
|
botCommands += `**/${cmdconfig.SuggestCommand}** ${cmdconfig.SuggestCommandDesc}\n`;
|
||||||
|
}
|
||||||
|
|
||||||
let ticketCommands = "";
|
let ticketCommands = "";
|
||||||
ticketCommands += `**/${cmdconfig.OpenTicket}** ${cmdconfig.OpenTicketDesc}\n`;
|
ticketCommands += `**/${cmdconfig.OpenTicket}** ${cmdconfig.OpenTicketDesc}\n`;
|
||||||
|
|||||||
+16
-2
@@ -1,5 +1,5 @@
|
|||||||
// SupportBot | Emerald Services
|
// SupportBot | Emerald Services
|
||||||
// Ping Command
|
// Suggest Command
|
||||||
|
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
@@ -55,6 +55,16 @@ module.exports = new Command({
|
|||||||
if (supportbot.SuggestionUpvote && supportbot.SuggestionDownvote) {
|
if (supportbot.SuggestionUpvote && supportbot.SuggestionDownvote) {
|
||||||
await suggestionMsg.react(supportbot.SuggestionUpvote);
|
await suggestionMsg.react(supportbot.SuggestionUpvote);
|
||||||
await suggestionMsg.react(supportbot.SuggestionDownvote);
|
await suggestionMsg.react(supportbot.SuggestionDownvote);
|
||||||
|
|
||||||
|
if (supportbot.SuggestionThreads) {
|
||||||
|
await suggestionMsg.startThread({
|
||||||
|
name: `Suggestion-releated Thread`,
|
||||||
|
autoArchiveDuration: 60,
|
||||||
|
type: 'GUILD_PUBLIC_THREAD',
|
||||||
|
reason: 'Suggestion-releated thread',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const Submitted = new Discord.MessageEmbed()
|
const Submitted = new Discord.MessageEmbed()
|
||||||
@@ -65,6 +75,10 @@ module.exports = new Command({
|
|||||||
.addField("Sent to:", `<#${suggestChannel.id}>`)
|
.addField("Sent to:", `<#${suggestChannel.id}>`)
|
||||||
.setColor(supportbot.SuccessColour);
|
.setColor(supportbot.SuccessColour);
|
||||||
|
|
||||||
return interaction.reply({ ephemeral: true, mbeds: [Submitted] });
|
return interaction.reply({
|
||||||
|
ephemeral: true,
|
||||||
|
embeds: [Submitted]
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
+16
-15
@@ -102,7 +102,7 @@ module.exports = new Command({
|
|||||||
ephemeral: true,
|
ephemeral: true,
|
||||||
});
|
});
|
||||||
let TicketCategory = await getCategory(
|
let TicketCategory = await getCategory(
|
||||||
supportbot.Departments[department].category || supportbot.TicketCategory,
|
supportbot.Departments[department].category,
|
||||||
interaction.guild
|
interaction.guild
|
||||||
);
|
);
|
||||||
const ticketChannel = await interaction.guild.channels.create(
|
const ticketChannel = await interaction.guild.channels.create(
|
||||||
@@ -131,7 +131,7 @@ module.exports = new Command({
|
|||||||
VIEW_CHANNEL: true,
|
VIEW_CHANNEL: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (supportbot.TicketDepartments && !department) {
|
if (!department) {
|
||||||
await ticketChannel.permissionOverwrites.edit(interaction.user.id, {
|
await ticketChannel.permissionOverwrites.edit(interaction.user.id, {
|
||||||
SEND_MESSAGES: false,
|
SEND_MESSAGES: false,
|
||||||
});
|
});
|
||||||
@@ -196,7 +196,7 @@ module.exports = new Command({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (supportbot.TicketDepartments && !department) {
|
if (!department) {
|
||||||
TicketMessage.addFields({
|
TicketMessage.addFields({
|
||||||
name: "Departments",
|
name: "Departments",
|
||||||
value: ` **${supportbot.Departments.map((X) => X.title).join("\n")}**`,
|
value: ` **${supportbot.Departments.map((X) => X.title).join("\n")}**`,
|
||||||
@@ -215,7 +215,7 @@ module.exports = new Command({
|
|||||||
.setEmoji(supportbot.TicketLockEmoji);
|
.setEmoji(supportbot.TicketLockEmoji);
|
||||||
|
|
||||||
const row2 = new MessageActionRow().addComponents(CloseButton, LockButton);
|
const row2 = new MessageActionRow().addComponents(CloseButton, LockButton);
|
||||||
if (supportbot.TicketDepartments && !department) {
|
if (!department) {
|
||||||
try {
|
try {
|
||||||
let buttons = await supportbot.Departments.map((x) =>
|
let buttons = await supportbot.Departments.map((x) =>
|
||||||
new MessageButton()
|
new MessageButton()
|
||||||
@@ -306,22 +306,23 @@ module.exports = new Command({
|
|||||||
VIEW_CHANNEL: true,
|
VIEW_CHANNEL: true,
|
||||||
});
|
});
|
||||||
let TicketCat = await getCategory(
|
let TicketCat = await getCategory(
|
||||||
supportbot.Departments[department].category ||
|
supportbot.Departments[department].category,
|
||||||
supportbot.TicketCategory,
|
|
||||||
interaction.guild
|
interaction.guild
|
||||||
);
|
);
|
||||||
await ticketChannel.setParent(TicketCat.id, { lockPermissions: false });
|
await ticketChannel.setParent(TicketCat.id, { lockPermissions: false });
|
||||||
await ticketChannel.send({
|
if (supportbot.AllowThanksForReachingOutMessage) {
|
||||||
embeds: [
|
await ticketChannel.send({
|
||||||
{
|
embeds: [
|
||||||
description: `> Thank for reaching out to the **${title} Department**. Please provide us information regarding your query.`,
|
{
|
||||||
color: supportbot.EmbedColour,
|
description: `> Thank for reaching out to the **${title} Department**. Please provide us information regarding your query.`,
|
||||||
},
|
color: supportbot.EmbedColour,
|
||||||
],
|
},
|
||||||
});
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (supportbot.AllowTicketMentions) {
|
if (supportbot.AllowTicketMentions) {
|
||||||
await ticketChannel.send("@here");
|
await ticketChannel.send(supportbot.TicketRoleMention);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// SupportBot | Emerald Services
|
// SupportBot | Emerald Services
|
||||||
// Ticket Add Command
|
// Translate Command
|
||||||
|
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ InfoCommand: "info"
|
|||||||
PingCommand: "ping"
|
PingCommand: "ping"
|
||||||
HelpCommand: "help"
|
HelpCommand: "help"
|
||||||
EmbedCommand: "embed"
|
EmbedCommand: "embed"
|
||||||
SuggestCommand: "suggestion"
|
SuggestCommand: "suggest"
|
||||||
TranslateCommand: "translate"
|
TranslateCommand: "translate"
|
||||||
UserInfoCommand: "userinfo"
|
UserInfoCommand: "userinfo"
|
||||||
|
|
||||||
|
|||||||
+61
-47
@@ -10,20 +10,20 @@
|
|||||||
# Discord Support: https://emeraldsrv.dev/discord
|
# Discord Support: https://emeraldsrv.dev/discord
|
||||||
# Community Resources: https://emeraldsrv.dev/resources
|
# Community Resources: https://emeraldsrv.dev/resources
|
||||||
|
|
||||||
SupportBot_Version: "7.6"
|
SupportBot_Version: "v7.7"
|
||||||
|
|
||||||
# -------------------------
|
# -------------------------
|
||||||
# General Configuration
|
# General Configuration
|
||||||
# -------------------------
|
# -------------------------
|
||||||
|
|
||||||
Name: "SupportBot"
|
Name: "SupportBot"
|
||||||
Token: "TOKEN_HERE"
|
Token: "BOT_TOKEN HTTPS://DISCORD.COM/DEVELOPERS"
|
||||||
|
|
||||||
# -------------------------
|
# -------------------------
|
||||||
# Activity Configuration
|
# Activity Configuration
|
||||||
# -------------------------
|
# -------------------------
|
||||||
|
|
||||||
BotActivity: "Need Help? /ticket"
|
BotActivity: "Here to help!"
|
||||||
|
|
||||||
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
|
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
|
||||||
# Set The ActivityType to "STREAMING" for a streaming status!
|
# Set The ActivityType to "STREAMING" for a streaming status!
|
||||||
@@ -36,29 +36,18 @@ ActivityType: "PLAYING"
|
|||||||
# -------------------------
|
# -------------------------
|
||||||
|
|
||||||
EmbedColour: "#f74343"
|
EmbedColour: "#f74343"
|
||||||
EmbedFooter: "SupportBot | An Advanced Ticket System"
|
EmbedFooter: "SupportBot | Developed by Emerald Services"
|
||||||
|
|
||||||
ErrorColour: "#d12519"
|
ErrorColour: "#d12519"
|
||||||
SuccessColour: "#04b545"
|
SuccessColour: "#04b545"
|
||||||
WarningColour: "#fca117"
|
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
|
# Role Configuration
|
||||||
# -------------------------
|
# -------------------------
|
||||||
|
|
||||||
AutoRole: true
|
AutoRole: true
|
||||||
JoinRole: "Verified Member"
|
JoinRole: "Member"
|
||||||
|
|
||||||
Staff: "Staff"
|
Staff: "Staff"
|
||||||
Admin: "Admin"
|
Admin: "Admin"
|
||||||
@@ -104,6 +93,15 @@ EmbedLeaveThumbnail: false
|
|||||||
# "BOT" will display the bot's profile picture.
|
# "BOT" will display the bot's profile picture.
|
||||||
# false to disable
|
# false to disable
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# Information Configuration
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
|
InfoTitle: "Information"
|
||||||
|
|
||||||
|
InfoButtonText: "Visit Site"
|
||||||
|
InfoURL: "https://emeraldsrv.dev"
|
||||||
|
InfoColour: "#f74343"
|
||||||
|
|
||||||
# ----------------------------
|
# ----------------------------
|
||||||
# Suggestions Configuration
|
# Suggestions Configuration
|
||||||
@@ -113,6 +111,12 @@ SuggestionChannel: "suggestions"
|
|||||||
SuggestionUpvote: "✅"
|
SuggestionUpvote: "✅"
|
||||||
SuggestionDownvote: "❌"
|
SuggestionDownvote: "❌"
|
||||||
|
|
||||||
|
SuggestionThreads: true
|
||||||
|
# set to false to disable threads being created from suggestions.
|
||||||
|
|
||||||
|
DisableSuggestions: false
|
||||||
|
# Set to true to disable the suggestions feature.
|
||||||
|
|
||||||
# -------------------------
|
# -------------------------
|
||||||
# Translate Configuration
|
# Translate Configuration
|
||||||
# -------------------------
|
# -------------------------
|
||||||
@@ -123,7 +127,6 @@ TranslateLogChannel: "translations-log"
|
|||||||
# Tickets Configuration
|
# Tickets Configuration
|
||||||
# -------------------------
|
# -------------------------
|
||||||
|
|
||||||
TicketCategory: "Tickets" # Only for tickets without a category
|
|
||||||
TicketPrefix: "ticket-" # The prefix for ticket channel names
|
TicketPrefix: "ticket-" # The prefix for ticket channel names
|
||||||
|
|
||||||
TicketLog: "ticket-data"
|
TicketLog: "ticket-data"
|
||||||
@@ -133,6 +136,8 @@ DMTranscripts: true
|
|||||||
TranscriptTitle: "Ticket Transcript"
|
TranscriptTitle: "Ticket Transcript"
|
||||||
TicketLog_Title: "Ticket Closed"
|
TicketLog_Title: "Ticket Closed"
|
||||||
TicketBlackListMessage: "You are not allowed to open a ticket"
|
TicketBlackListMessage: "You are not allowed to open a ticket"
|
||||||
|
TicketRoleMention: "@here"
|
||||||
|
# To ping a role: <@ROLE_ID>
|
||||||
|
|
||||||
MaxAllowedTickets: 2
|
MaxAllowedTickets: 2
|
||||||
|
|
||||||
@@ -144,6 +149,12 @@ AllowTicketMentions: true
|
|||||||
# Set to true to allow the ticket to mention the author and the support team.
|
# Set to true to allow the ticket to mention the author and the support team.
|
||||||
# Set false to dis-allow mentions within tickets.
|
# Set false to dis-allow mentions within tickets.
|
||||||
|
|
||||||
|
AllowThanksForReachingOutMessage: true
|
||||||
|
# Set to true to allow the "Thanks for reaching out Message" to be sent when the ticket is created
|
||||||
|
DisableTicketLogChannel: false
|
||||||
|
# Set to true to disable the requirement of the "TicketLog"
|
||||||
|
# Set to true to also disable the ticket logs to be sent in the "TicketLogs" channel
|
||||||
|
|
||||||
# --- Creation Config ---
|
# --- Creation Config ---
|
||||||
# --- Start ---
|
# --- Start ---
|
||||||
|
|
||||||
@@ -164,35 +175,12 @@ TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%
|
|||||||
AddedUser: "👍 <@%user%> has been added to this ticket"
|
AddedUser: "👍 <@%user%> has been added to this ticket"
|
||||||
RemovedUser: "👍 <@%user%> has been removed from 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
|
Timeout: 5
|
||||||
|
|
||||||
# Set to true to allow all staff to access the ticket
|
# Set to true to allow all staff to access the ticket
|
||||||
AllowAllStaff: false
|
AllowAllStaff: false
|
||||||
|
|
||||||
@@ -203,17 +191,20 @@ Departments:
|
|||||||
role: "Staff"
|
role: "Staff"
|
||||||
color: "SECONDARY"
|
color: "SECONDARY"
|
||||||
emoji: "1️⃣"
|
emoji: "1️⃣"
|
||||||
category: "Billing Support"
|
category: "Tickets"
|
||||||
|
|
||||||
- title: "Billing Support"
|
- title: "Billing Support"
|
||||||
role: "Staff"
|
role: "Staff"
|
||||||
color: "SECONDARY"
|
color: "SECONDARY"
|
||||||
emoji: "2️⃣"
|
emoji: "2️⃣"
|
||||||
category: "Admin Team"
|
category: "Tickets"
|
||||||
|
|
||||||
- title: "Admin Team"
|
- title: "Admin Team"
|
||||||
role: "Admin"
|
role: "Admin"
|
||||||
color: "SECONDARY"
|
color: "SECONDARY"
|
||||||
emoji: "3️⃣"
|
emoji: "3️⃣"
|
||||||
category: "Admin Support"
|
category: "Tickets"
|
||||||
|
|
||||||
# - title: "Other"
|
# - title: "Other"
|
||||||
# role: "Staff"
|
# role: "Staff"
|
||||||
# color: "SECONDARY"
|
# color: "SECONDARY"
|
||||||
@@ -226,6 +217,29 @@ Departments:
|
|||||||
# DANGER - Red
|
# DANGER - Red
|
||||||
# SUCCESS - Green
|
# 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 ---
|
# --- Closing Config ---
|
||||||
# --- Start ---
|
# --- Start ---
|
||||||
|
|
||||||
|
|||||||
@@ -20,17 +20,10 @@ TicketPanel: true
|
|||||||
# Ticket Panel Message Configuration
|
# Ticket Panel Message Configuration
|
||||||
# ----------------------------------------
|
# ----------------------------------------
|
||||||
|
|
||||||
Channel: "▣┃ticket-creation"
|
Channel: "ticket-creation"
|
||||||
ButtonEmoji: "📩"
|
|
||||||
ButtonLabel: "Create Ticket"
|
|
||||||
ButtonColour: "SUCCESS"
|
|
||||||
# Colour Options:
|
|
||||||
# -> PRIMARY - Purple
|
|
||||||
# -> SECONDARY - Grey
|
|
||||||
# -> SUCCESS - Green
|
|
||||||
# -> DANGER - Red
|
|
||||||
|
|
||||||
PanelTitle: "Need Help? Create a Support Ticket."
|
PanelTitle: "Need Help? Create a Support Ticket."
|
||||||
|
PanelColour: "#f74343"
|
||||||
|
|
||||||
TicketPanel_Description: true
|
TicketPanel_Description: true
|
||||||
TicketPanel_Thumbnail: true
|
TicketPanel_Thumbnail: true
|
||||||
|
|||||||
@@ -1,3 +1 @@
|
|||||||
{
|
{"tickets": [{}]}
|
||||||
"tickets": []
|
|
||||||
}
|
|
||||||
@@ -1 +1,4 @@
|
|||||||
{"id":0,"TicketPanelID":""}
|
{
|
||||||
|
"id": 0,
|
||||||
|
"TicketPanelID": ""
|
||||||
|
}
|
||||||
+24
-26
@@ -21,16 +21,17 @@ module.exports = new Event("ready", async (client, interaction) => {
|
|||||||
url: supportbot.StreamingURL,
|
url: supportbot.StreamingURL,
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(`\u001b[32m`, `┏━━━┓╋╋╋╋╋╋╋╋╋╋╋╋╋┏┓┏━━┓╋╋╋┏┓`);
|
console.log(`\u001b[107m`, `――――――――――――――――――――――――――――――――――――――――――――`);
|
||||||
console.log(`\u001b[32m`, `┃┏━┓┃╋╋╋╋╋╋╋╋╋╋╋╋┏┛┗┫┏┓┃╋╋┏┛┗┓`);
|
console.log(`\u001b[91m`, `┏━━━┓╋╋╋╋╋╋╋╋╋╋╋╋╋┏┓┏━━┓╋╋╋┏┓`);
|
||||||
console.log(`\u001b[32m`, `┃┗━━┳┓┏┳━━┳━━┳━━┳┻┓┏┫┗┛┗┳━┻┓┏┛`);
|
console.log(`\u001b[91m`, `┃┏━┓┃╋╋╋╋╋╋╋╋╋╋╋╋┏┛┗┫┏┓┃╋╋┏┛┗┓`);
|
||||||
console.log(`\u001b[32m`, `┗━━┓┃┃┃┃┏┓┃┏┓┃┏┓┃┏┫┃┃┏━┓┃┏┓┃┃`);
|
console.log(`\u001b[91m`, `┃┗━━┳┓┏┳━━┳━━┳━━┳┻┓┏┫┗┛┗┳━┻┓┏┛`);
|
||||||
console.log(`\u001b[32m`, `┃┗━┛┃┗┛┃┗┛┃┗┛┃┗┛┃┃┃┗┫┗━┛┃┗┛┃┗┓`);
|
console.log(`\u001b[91m`, `┗━━┓┃┃┃┃┏┓┃┏┓┃┏┓┃┏┫┃┃┏━┓┃┏┓┃┃`);
|
||||||
console.log(`\u001b[32m`, `┗━━━┻━━┫┏━┫┏━┻━━┻┛┗━┻━━━┻━━┻━┛`);
|
console.log(`\u001b[91m`, `┃┗━┛┃┗┛┃┗┛┃┗┛┃┗┛┃┃┃┗┫┗━┛┃┗┛┃┗┓`);
|
||||||
console.log(`\u001b[32m`, `┗╋╋╋╋╋╋╋┃┃╋┃┃`);
|
console.log(`\u001b[91m`, `┗━━━┻━━┫┏━┫┏━┻━━┻┛┗━┻━━━┻━━┻━┛`);
|
||||||
console.log(`\u001b[32m`, `╋╋╋╋╋╋╋┗┛╋┗┛`);
|
console.log(`\u001b[91m`, `┗╋╋╋╋╋╋╋┃┃╋┃┃`);
|
||||||
|
console.log(`\u001b[91m`, `╋╋╋╋╋╋╋┗┛╋┗┛`);
|
||||||
console.log(` `);
|
console.log(` `);
|
||||||
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`);
|
console.log(`\u001b[32m`, `――――――――――――――――――――――――――――――――――――――――――――`);
|
||||||
console.log(` `);
|
console.log(` `);
|
||||||
console.log(
|
console.log(
|
||||||
`\u001b[33m`,
|
`\u001b[33m`,
|
||||||
@@ -83,9 +84,9 @@ module.exports = new Event("ready", async (client, interaction) => {
|
|||||||
supportbot.Staff,
|
supportbot.Staff,
|
||||||
supportbot.TicketBlackListRole,
|
supportbot.TicketBlackListRole,
|
||||||
];
|
];
|
||||||
if (supportbot.TicketDepartments) {
|
|
||||||
supportbot.Departments.forEach((department) => roles.push(department.role));
|
supportbot.Departments.forEach((department) => roles.push(department.role));
|
||||||
}
|
|
||||||
if (supportbot.AutoRole) roles.push(supportbot.JoinRole);
|
if (supportbot.AutoRole) roles.push(supportbot.JoinRole);
|
||||||
const channels = [
|
const channels = [
|
||||||
supportbot.SuggestionChannel,
|
supportbot.SuggestionChannel,
|
||||||
@@ -96,12 +97,15 @@ module.exports = new Event("ready", async (client, interaction) => {
|
|||||||
supportbot.LeaveChannel,
|
supportbot.LeaveChannel,
|
||||||
supportbot.TranslateLogChannel
|
supportbot.TranslateLogChannel
|
||||||
];
|
];
|
||||||
const categories = [supportbot.TicketCategory];
|
//const categories = [supportbot.TicketCategory];
|
||||||
|
|
||||||
const missingC = [];
|
const missingC = [];
|
||||||
const missingR = [];
|
const missingR = [];
|
||||||
const missingCat = [];
|
const missingCat = [];
|
||||||
for (let c of channels) {
|
for (let c of channels) {
|
||||||
|
if ((c === supportbot.SuggestionChannel && supportbot.DisableSuggestionsChannel) || c === supportbot.TicketLog && supportbot.DisableTicketLogChannel) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const find = await getChannel(c, client.guilds.cache.first());
|
const find = await getChannel(c, client.guilds.cache.first());
|
||||||
if (!find) missingC.push(c);
|
if (!find) missingC.push(c);
|
||||||
}
|
}
|
||||||
@@ -109,10 +113,10 @@ module.exports = new Event("ready", async (client, interaction) => {
|
|||||||
const find = await getRole(r, client.guilds.cache.first());
|
const find = await getRole(r, client.guilds.cache.first());
|
||||||
if (!find) missingR.push(r);
|
if (!find) missingR.push(r);
|
||||||
}
|
}
|
||||||
for (let cat of categories) {
|
// for (let cat of categories) {
|
||||||
const find = await getCategory(cat, client.guilds.cache.first());
|
// const find = await getCategory(cat, client.guilds.cache.first());
|
||||||
if (!find) missingCat.push(cat);
|
// if (!find) missingCat.push(cat);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (missingR.length > 0) {
|
if (missingR.length > 0) {
|
||||||
console.log(
|
console.log(
|
||||||
@@ -160,7 +164,7 @@ module.exports = new Event("ready", async (client, interaction) => {
|
|||||||
chan1.messages.fetch(panelid.TicketPanelID).catch(async () => {
|
chan1.messages.fetch(panelid.TicketPanelID).catch(async () => {
|
||||||
let embed = new Discord.MessageEmbed()
|
let embed = new Discord.MessageEmbed()
|
||||||
.setTitle(panelconfig.PanelTitle)
|
.setTitle(panelconfig.PanelTitle)
|
||||||
.setColor(supportbot.SuccessColour)
|
.setColor(panelconfig.PanelColour)
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: supportbot.EmbedFooter,
|
text: supportbot.EmbedFooter,
|
||||||
iconURL: interaction.user.displayAvatarURL(),
|
iconURL: interaction.user.displayAvatarURL(),
|
||||||
@@ -178,7 +182,7 @@ module.exports = new Event("ready", async (client, interaction) => {
|
|||||||
embed.setImage(panelconfig.PanelImage);
|
embed.setImage(panelconfig.PanelImage);
|
||||||
}
|
}
|
||||||
let button;
|
let button;
|
||||||
if (supportbot.TicketDepartments) {
|
|
||||||
button = supportbot.Departments.map((x) =>
|
button = supportbot.Departments.map((x) =>
|
||||||
new Discord.MessageButton()
|
new Discord.MessageButton()
|
||||||
.setCustomId("department-" + supportbot.Departments.indexOf(x))
|
.setCustomId("department-" + supportbot.Departments.indexOf(x))
|
||||||
@@ -186,13 +190,7 @@ module.exports = new Event("ready", async (client, interaction) => {
|
|||||||
.setStyle(x.color)
|
.setStyle(x.color)
|
||||||
.setEmoji(x.emoji)
|
.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);
|
let row = new Discord.MessageActionRow().addComponents(button);
|
||||||
|
|
||||||
await chan1
|
await chan1
|
||||||
@@ -216,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.
|
||||||
@@ -38,9 +38,13 @@ class Client extends Discord.Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async start(token) {
|
async start(token) {
|
||||||
const commandFiles = fs
|
var tempCommandFiles = fs.readdirSync("./Commands").filter((file) => file.endsWith(".js"));
|
||||||
.readdirSync("./Commands")
|
|
||||||
.filter((file) => file.endsWith(".js"));
|
if (supportbot.DisableSuggestions) {
|
||||||
|
tempCommandFiles = tempCommandFiles.filter(item => item !== "suggest.js");
|
||||||
|
}
|
||||||
|
|
||||||
|
const commandFiles = tempCommandFiles;
|
||||||
|
|
||||||
const addonFiles = fs
|
const addonFiles = fs
|
||||||
.readdirSync("./Addons")
|
.readdirSync("./Addons")
|
||||||
|
|||||||
Generated
+141
-4341
File diff suppressed because it is too large.
Load diff
+2
-4
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "supportbot",
|
"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.",
|
"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",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -21,8 +21,6 @@
|
|||||||
"@vitalets/google-translate-api": "^8.0.0",
|
"@vitalets/google-translate-api": "^8.0.0",
|
||||||
"discord.js": "^13.6.0",
|
"discord.js": "^13.6.0",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"moment": "^2.29.3",
|
"moment": "^2.29.3"
|
||||||
"translate": "^1.4.1",
|
|
||||||
"twitter": "^1.7.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user