Compare commits

...
49 Commits
Author SHA1 Message Date
ItsNyoty 20acafbc64 Version update
V7.7.2 Final release
2023-04-19 15:58:03 +02:00
ItsNyoty 6a5406c4a8 Update ready.js
this made me drive crazy in my vscode terminal
2023-04-16 19:13:16 +02:00
1tzEmerald 949d113cff Merge pull request #145 from ItsNyoty/patch-6
TicketClaim
2022-12-17 23:56:28 +00:00
ItsNyoty bd1e59ba54 TicketClaim
Ticket Claim with channel permissions overwrite
2022-12-07 20:36:04 +01:00
1tzEmerald 364338a04e Merge pull request #142 from ItsNyoty/patch-2
Adding ticket claim values in config
2022-11-12 19:14:08 +00:00
1tzEmerald 684dc827a3 Merge pull request #144 from ItsNyoty/patch-4
Adding claim button
2022-11-12 19:13:55 +00:00
ItsNyoty fb97532bf5 Adding claim button 2022-11-12 12:58:02 +01:00
ItsNyoty a05812db10 Adding ticket claim values in config 2022-11-12 12:54:57 +01:00
1tzEmerald 96a50743ac Update supportbot.yml 2022-08-20 23:02:47 +01:00
1tzEmerald 5cd759eb86 Update README.md 2022-08-03 12:00:48 +01:00
1tzEmerald fd263d1f8e Update README.md 2022-07-26 11:37:27 +01:00
Xiled Emerald df5c35642d Update README.md 2022-07-01 22:21:18 +01:00
Xiled Emerald c9d2e471b7 Update README.md 2022-07-01 21:15:22 +01:00
Xiled Emerald d1bd624723 Update README.md 2022-07-01 21:14:46 +01:00
Xiled Emerald 1f2bd9c279 Update README.md 2022-07-01 21:14:30 +01:00
Xiled Emerald ab14b17cc9 Delete .DS_Store 2022-07-01 20:59:25 +01:00
Xiled Emerald e1244f779f Delete .DS_Store 2022-07-01 20:59:18 +01:00
Xiled Emerald d474f04122 Update README.md 2022-07-01 20:56:42 +01:00
Xiled Emerald 24c4cb0dd1 Update README.md 2022-07-01 20:56:25 +01:00
Xiled Emerald d7d765d4b9 Update README.md 2022-07-01 20:54:41 +01:00
Xiled Emerald bc82bf6c55 Delete .DS_Store 2022-06-30 15:50:13 +01:00
Xiled Emerald 213f84f509 Delete package-lock.json 2022-06-30 15:49:58 +01:00
Xiled Emerald 25c6c95ec5 Update README.md 2022-06-30 15:27:23 +01:00
Xiled Emerald 9118bff570 Update README.md 2022-06-30 15:26:24 +01:00
Xiled Emerald 3f3670b4f3 Update README.md 2022-06-30 15:19:21 +01:00
Xiled Emerald d448662072 Update README.md 2022-06-30 15:17:48 +01:00
Xiled Emerald 84fa2c3078 Update README.md 2022-06-30 15:17:37 +01:00
Xiled Emerald da88fe64ba Update README.md 2022-06-30 15:16:57 +01:00
Xiled Emerald d74cd36880 Update README.md 2022-06-30 15:13:26 +01:00
Xiled Emerald b8d1361796 Update README.md 2022-06-30 15:11:39 +01:00
Xiled Emerald b205132d1a Update README.md 2022-06-30 15:10:02 +01:00
Xiled Emerald 77812967de Update README.md 2022-06-29 00:50:43 +01:00
Xiled Emerald 6103fc9f04 Update README.md 2022-06-29 00:41:00 +01:00
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
Xiled Emerald ce67b668d5 Update Client.js 2022-06-21 01:42:59 +01:00
Xiled Emerald 3273cfd0e1 Update help.js 2022-06-21 01:41:53 +01:00
Xiled Emerald fd992a6514 Update supportbot.yml 2022-06-21 01:41:17 +01:00
Xiled Emerald 550d681fe1 Merge pull request #122 from RandomTomato/release
Added 3 new settings in supportbot.yml for more customization
2022-06-21 01:39:35 +01:00
ItzEmerald 7d29226953 BETA 2 - V7.7 2022-06-21 01:38:22 +01:00
BuildTools 38da72ca91 Added 3 new settings in supportbot.yml for more customization 2022-06-18 11:19:12 +09:30
22 changed files with 292 additions and 5484 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
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+5 -5
View File
@@ -154,11 +154,11 @@ module.exports = new Command({
html += `-----<br><br>`;
}
});
await logChannel.send({ embeds: [logEmbed] }).catch((err) => {
console.error(err);
});
if (!(supportbot.DisableTicketLogChannel)) {
await logChannel.send({ embeds: [logEmbed] }).catch((err) => {
console.error(err);
});
}
let file = new Discord.MessageAttachment(
Buffer.from(html),
`${interaction.channel.name}.html`
+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],
+4 -1
View File
@@ -32,7 +32,10 @@ module.exports = new Command({
botCommands += `**/${cmdconfig.InfoCommand}** ${cmdconfig.InfoCommandDesc}\n`;
botCommands += `**/${cmdconfig.PingCommand}** ${cmdconfig.PingCommandDesc}\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 = "";
ticketCommands += `**/${cmdconfig.OpenTicket}** ${cmdconfig.OpenTicketDesc}\n`;
+16 -2
View File
@@ -1,5 +1,5 @@
// SupportBot | Emerald Services
// Ping Command
// Suggest Command
const fs = require("fs");
@@ -55,6 +55,16 @@ module.exports = new Command({
if (supportbot.SuggestionUpvote && supportbot.SuggestionDownvote) {
await suggestionMsg.react(supportbot.SuggestionUpvote);
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()
@@ -65,6 +75,10 @@ module.exports = new Command({
.addField("Sent to:", `<#${suggestChannel.id}>`)
.setColor(supportbot.SuccessColour);
return interaction.reply({ ephemeral: true, mbeds: [Submitted] });
return interaction.reply({
ephemeral: true,
embeds: [Submitted]
})
},
});
+22 -16
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")}**`,
@@ -213,9 +213,14 @@ module.exports = new Command({
.setLabel("Lock")
.setStyle(supportbot.TicketLockColour)
.setEmoji(supportbot.TicketLockEmoji);
const ClaimButton = new MessageButton()
.setCustomId("ticketclaim")
.setLabel("Claim")
.setStyle(supportbot.TicketClaimColour)
.setEmoji(supportbot.TicketClaimEmoji);
const row2 = new MessageActionRow().addComponents(CloseButton, LockButton);
if (supportbot.TicketDepartments && !department) {
const row2 = new MessageActionRow().addComponents(CloseButton, LockButton, ClaimButton);
if (!department) {
try {
let buttons = await supportbot.Departments.map((x) =>
new MessageButton()
@@ -306,22 +311,23 @@ 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 });
await ticketChannel.send({
embeds: [
{
description: `> Thank for reaching out to the **${title} Department**. Please provide us information regarding your query.`,
color: supportbot.EmbedColour,
},
],
});
if (supportbot.AllowThanksForReachingOutMessage) {
await ticketChannel.send({
embeds: [
{
description: `> Thank for reaching out to the **${title} Department**. Please provide us information regarding your query.`,
color: supportbot.EmbedColour,
},
],
});
}
}
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"
+66 -47
View File
@@ -10,20 +10,20 @@
# Discord Support: https://emeraldsrv.dev/discord
# Community Resources: https://emeraldsrv.dev/resources
SupportBot_Version: "7.6"
SupportBot_Version: "v7.7.2"
# -------------------------
# General Configuration
# -------------------------
Name: "SupportBot"
Token: "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,29 +36,18 @@ 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
# -------------------------
AutoRole: true
JoinRole: "Verified Member"
JoinRole: "Member"
Staff: "Staff"
Admin: "Admin"
@@ -104,6 +93,16 @@ EmbedLeaveThumbnail: false
# "BOT" will display the bot's profile picture.
# false to disable
# -------------------------
# Information Configuration
# -------------------------
InfoTitle: "Information"
InfoButtonText: "Visit Site"
AboutMe: "I am SupportBot"
InfoURL: "https://emeraldsrv.dev"
InfoColour: "#f74343"
# ----------------------------
# Suggestions Configuration
@@ -113,6 +112,12 @@ SuggestionChannel: "suggestions"
SuggestionUpvote: "✅"
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
# -------------------------
@@ -123,7 +128,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"
@@ -133,6 +137,10 @@ DMTranscripts: true
TranscriptTitle: "Ticket Transcript"
TicketLog_Title: "Ticket Closed"
TicketBlackListMessage: "You are not allowed to open a ticket"
TicketRoleMention: "@here"
TicketClaimMessage: "Your ticket will be handled by" #Automaticly tags user to the end
TicketClaimTitle: "Ticket Claimed"
# To ping a role: <@ROLE_ID>
MaxAllowedTickets: 2
@@ -144,6 +152,12 @@ AllowTicketMentions: true
# Set to true to allow the ticket to mention the author and the support team.
# 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 ---
# --- Start ---
@@ -164,35 +178,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
@@ -203,17 +194,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"
@@ -226,6 +220,31 @@ Departments:
# DANGER - Red
# SUCCESS - Green
# --- Buttons Config ---
# --- Start ---
LockTicketCategory: "Archive"
TicketCloseEmoji: "❌"
TicketDeleteEmoji: "⛔"
TicketLockEmoji: "🔒"
TicketClaimEmoji: "🧑‍💻"
TicketCloseColour: "DANGER"
TicketDeleteColour: "DANGER"
TicketLockColour: "PRIMARY"
TicketClaimColour: "SUCCESS"
# 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": ""
}
+41 -2
View File
@@ -11,6 +11,9 @@ const supportbot = yaml.load(
const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8"));
const Event = require("../Structures/Event.js");
const TicketNumberID = require("../Structures/TicketID.js");
module.exports = new Event("interactionCreate", async (client, interaction) => {
if (interaction.isCommand()) {
@@ -127,5 +130,41 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
interaction.message.edit({ components: [row] });
}
}
}
});
if (interaction.customId === "ticketclaim") {
if (interaction.channel.name.startsWith(supportbot.TicketPrefix)) {
const Staff = await interaction.client.getRole(supportbot.Staff, interaction.guild);
interaction.message.fetch();
let User = interaction.guild.members.cache.get(interaction.user.id);
let Admin =
interaction.guild.roles.cache.find(
(AdminUser) => AdminUser.name === supportbot.Admin
) ||
interaction.guild.roles.cache.find(
(AdminUser) => AdminUser.id === supportbot.Admin
);
if (!interaction.member.roles.cache.has(Admin.id)) {
return await interaction.reply({
content: "You don't have permission to do that.",
ephemeral: true,
});
}
let all = interaction.channel.permissionOverwrites.cache;
const ArchiveEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.TicketClaimTitle)
.setDescription(supportbot.TicketClaimMessage + " <@" + interaction.user.id + ">")
.setColor(supportbot.EmbedColour);
interaction.reply({ embeds: [ArchiveEmbed] });
await interaction.channel.permissionOverwrites.edit(Staff.id, {
VIEW_CHANNEL: true,
SEND_MESSAGES: false,
});
}
await interaction.channel.permissionOverwrites.edit(interaction.user.id, {
VIEW_CHANNEL: true,
SEND_MESSAGES: true,
});
}
}
});
+24 -26
View File
@@ -21,20 +21,21 @@ 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[36m`, `――――――――――――――――――――――――――――――――――――――――――――`);
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[36m`, `――――――――――――――――――――――――――――――――――――――――――――`);
console.log(` `);
console.log(
`\u001b[33m`,
`${supportbot.Name} | v${supportbot.SupportBot_Version}`,
`${supportbot.Name} | ${supportbot.SupportBot_Version}`,
`\u001b[36m`,
`Connected to Discord`
);
@@ -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,12 +97,15 @@ module.exports = new Event("ready", async (client, interaction) => {
supportbot.LeaveChannel,
supportbot.TranslateLogChannel
];
const categories = [supportbot.TicketCategory];
//const categories = [supportbot.TicketCategory];
const missingC = [];
const missingR = [];
const missingCat = [];
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());
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());
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(
@@ -160,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(),
@@ -178,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))
@@ -186,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
+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.
+71 -8
View File
@@ -1,12 +1,75 @@
![imgur](https://i.imgur.com/TQj40Mt.png)
<h1 align="center">
<br>
<a href="https://github.com/Emerald-Services/SupportBot"><img src="https://i.imgur.com/tzi3d7Q.png"></a>
<br>
SupportBot
<br>
</h1>
## What is SupportBot?
<div align="center">
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/badge/license-MIT-green?style=for-the-badge" alt="shield.png">
</a>
<a href="https://github.com/discordjs">
<img src="https://img.shields.io/badge/discord.js-v13.6.x-blue.svg?style=for-the-badge&logo=javascript.svg" alt="shield.png">
</a>
<a href="https://github.com/nodejs/node">
<img src="https://img.shields.io/badge/node.js-v16.14.x-green.svg?style=for-the-badge&logo=node" alt="shield.png">
</a>
<a href="https://github.com/Emerald-Services/SupportBot/releases">
<img src="https://img.shields.io/github/downloads/Emerald-Services/SupportBot/total?style=for-the-badge" alt="shield.png">
</a>
</div>
<p align="center">
<a href="https://emeraldsrv.dev/">Website</a>
•
<a href="https://github.com/Emerald-Services/SupportBot/wiki">Wiki</a>
<br>
<a href="#about">About</a>
•
<a href="#support">Support</a>
•
<a href="#license">License</a>
•
<a href="https://github.com/Emerald-Services/SupportBot/wiki/Third-Party-Developer">Third-Party</a>
•
<a href="#contributors">Contributors</a>
</p>
## About
SupportBot is an Open-Source discord bot built with [discord.js](https://github.com/discordjs/discord.js). It's primarily focused to help servers organise and manage their support system in a unique way with full customisation to match your brand.
## Support
<a href="https://emeraldsrv.dev/discord">
<img alt="Discord" src="https://img.shields.io/discord/597779408295821323?logo=discord&logoColor=white&style=for-the-badge">
</a>
## License
Released under the [MIT](https://opensource.org/licenses/MIT) license.
## Third-Party
- [Syphers Addons](https://github.com/SypherRed/SB_Addons_Unofficial)
- [BuiltByBit](https://builtbybit.com/supportbot)
- [Polymart](https://polymart.org/resource/supportbot-1-discord-ticket-bot.518)
## Contributors
<a href="https://github.com/Emerald-Services/SupportBot/graphs/contributors">
<img src="https://contrib.rocks/image?repo=Emerald-Services/SupportBot">
</a>
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.
## Quick Links
**|** [Discord](https://emeraldsrv.dev/discord) **|**
[Hosting](https://emeraldsrv.dev/hosting) **|**
[Documentation](https://emeraldsrv.dev/wiki/supportbot) **|**
[Download via MC-Market](https://www.mc-market.org/resources/8940/) **|**
+7 -3
View File
@@ -38,9 +38,13 @@ class Client extends Discord.Client {
}
async start(token) {
const commandFiles = fs
.readdirSync("./Commands")
.filter((file) => file.endsWith(".js"));
var tempCommandFiles = fs.readdirSync("./Commands").filter((file) => file.endsWith(".js"));
if (supportbot.DisableSuggestions) {
tempCommandFiles = tempCommandFiles.filter(item => item !== "suggest.js");
}
const commandFiles = tempCommandFiles;
const addonFiles = fs
.readdirSync("./Addons")
-5346
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.7.2",
"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"
}
}