Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce67b668d5 | ||
|
|
3273cfd0e1 | ||
|
|
fd992a6514 | ||
|
|
550d681fe1 | ||
|
|
7d29226953 | ||
|
|
38da72ca91 |
No files matched your search
+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`
|
||||||
|
|||||||
+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`;
|
||||||
|
|||||||
+15
-1
@@ -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]
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
+10
-8
@@ -311,14 +311,16 @@ module.exports = new Command({
|
|||||||
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("@here");
|
||||||
|
|||||||
+17
-3
@@ -10,14 +10,14 @@
|
|||||||
# 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: "7.7 BETA-v2"
|
||||||
|
|
||||||
# -------------------------
|
# -------------------------
|
||||||
# General Configuration
|
# General Configuration
|
||||||
# -------------------------
|
# -------------------------
|
||||||
|
|
||||||
Name: "SupportBot"
|
Name: "SupportBot"
|
||||||
Token: "TOKEN_HERE"
|
Token: "BOT_TOKEN_HERE"
|
||||||
|
|
||||||
# -------------------------
|
# -------------------------
|
||||||
# Activity Configuration
|
# Activity Configuration
|
||||||
@@ -58,7 +58,7 @@ InfoColour: "#f74343"
|
|||||||
# -------------------------
|
# -------------------------
|
||||||
|
|
||||||
AutoRole: true
|
AutoRole: true
|
||||||
JoinRole: "Verified Member"
|
JoinRole: "Member"
|
||||||
|
|
||||||
Staff: "Staff"
|
Staff: "Staff"
|
||||||
Admin: "Admin"
|
Admin: "Admin"
|
||||||
@@ -113,6 +113,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 suggestiosn feature.
|
||||||
|
|
||||||
# -------------------------
|
# -------------------------
|
||||||
# Translate Configuration
|
# Translate Configuration
|
||||||
# -------------------------
|
# -------------------------
|
||||||
@@ -144,6 +150,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 ---
|
||||||
|
|
||||||
@@ -204,11 +216,13 @@ Departments:
|
|||||||
color: "SECONDARY"
|
color: "SECONDARY"
|
||||||
emoji: "1️⃣"
|
emoji: "1️⃣"
|
||||||
category: "Billing Support"
|
category: "Billing Support"
|
||||||
|
|
||||||
- title: "Billing Support"
|
- title: "Billing Support"
|
||||||
role: "Staff"
|
role: "Staff"
|
||||||
color: "SECONDARY"
|
color: "SECONDARY"
|
||||||
emoji: "2️⃣"
|
emoji: "2️⃣"
|
||||||
category: "Admin Team"
|
category: "Admin Team"
|
||||||
|
|
||||||
- title: "Admin Team"
|
- title: "Admin Team"
|
||||||
role: "Admin"
|
role: "Admin"
|
||||||
color: "SECONDARY"
|
color: "SECONDARY"
|
||||||
|
|||||||
@@ -102,6 +102,9 @@ module.exports = new Event("ready", async (client, interaction) => {
|
|||||||
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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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")
|
||||||
|
|||||||
Reference in new issue
Block a user