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",
|
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],
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
// SupportBot | Emerald Services
|
// SupportBot | Emerald Services
|
||||||
// Ping Command
|
// Suggest Command
|
||||||
|
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
|
|||||||
+6
-7
@@ -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,8 +306,7 @@ 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 });
|
||||||
@@ -323,7 +322,7 @@ module.exports = new Command({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
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"
|
||||||
|
|
||||||
|
|||||||
+47
-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.7 BETA-v2"
|
SupportBot_Version: "v7.7"
|
||||||
|
|
||||||
# -------------------------
|
# -------------------------
|
||||||
# General Configuration
|
# General Configuration
|
||||||
# -------------------------
|
# -------------------------
|
||||||
|
|
||||||
Name: "SupportBot"
|
Name: "SupportBot"
|
||||||
Token: "BOT_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,23 +36,12 @@ 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
|
||||||
# -------------------------
|
# -------------------------
|
||||||
@@ -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
|
||||||
@@ -117,7 +115,7 @@ SuggestionThreads: true
|
|||||||
# set to false to disable threads being created from suggestions.
|
# set to false to disable threads being created from suggestions.
|
||||||
|
|
||||||
DisableSuggestions: false
|
DisableSuggestions: false
|
||||||
# Set to true to disable the suggestiosn feature.
|
# Set to true to disable the suggestions feature.
|
||||||
|
|
||||||
# -------------------------
|
# -------------------------
|
||||||
# Translate Configuration
|
# Translate Configuration
|
||||||
@@ -129,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"
|
||||||
@@ -139,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
|
||||||
|
|
||||||
@@ -176,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
|
||||||
|
|
||||||
@@ -215,19 +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"
|
||||||
@@ -240,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": ""
|
||||||
|
}
|
||||||
+21
-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,7 +97,7 @@ 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 = [];
|
||||||
@@ -112,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(
|
||||||
@@ -163,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(),
|
||||||
@@ -181,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))
|
||||||
@@ -189,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
|
||||||
@@ -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",
|
"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