v8.0-Dev-1.1

This commit is contained in:
ItzEmerald committed 2022-07-23 07:50:12 +01:00
1 parent 209ec0b435
commit 4e081358ff
17 files changed
+256 -99

No files matched your search

Vendored
BIN
View File
Binary file not shown.
+13 -3
View File
@@ -13,8 +13,8 @@ const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8"));
const Command = require("../Structures/Command.js"); const Command = require("../Structures/Command.js");
module.exports = new Command({ module.exports = new Command({
name: cmdconfig.TicketAdd, name: cmdconfig.TicketAdd.Command,
description: cmdconfig.TicketAddDesc, description: cmdconfig.TicketAdd.Description,
type: Discord.ApplicationCommandType.ChatInput, type: Discord.ApplicationCommandType.ChatInput,
options: [ options: [
{ {
@@ -24,9 +24,19 @@ module.exports = new Command({
required: true, required: true,
}, },
], ],
permissions: ["SEND_MESSAGES"], permissions: cmdconfig.TicketAdd.Permission,
async run(interaction) { async run(interaction) {
let disableCommand = true;
if (cmdconfig.TicketAdd.Enabled === false) {
if (interaction.type === Discord.InteractionType.ApplicationCommand && disableCommand)
return interaction.reply({
content: ":x: This command is `disabled`",
ephemeral: true,
});
}
const { getRole } = interaction.client; const { getRole } = interaction.client;
let SupportStaff = await getRole(supportbot.Staff, interaction.guild); let SupportStaff = await getRole(supportbot.Staff, interaction.guild);
let Admin = await getRole(supportbot.Admin, interaction.guild); let Admin = await getRole(supportbot.Admin, interaction.guild);
+13 -3
View File
@@ -13,8 +13,8 @@ const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8"));
const Command = require("../Structures/Command.js"); const Command = require("../Structures/Command.js");
module.exports = new Command({ module.exports = new Command({
name: cmdconfig.CloseTicket, name: cmdconfig.CloseTicket.Command,
description: cmdconfig.CloseTicketDesc, description: cmdconfig.CloseTicket.Description,
type: Discord.ApplicationCommandType.ChatInput, type: Discord.ApplicationCommandType.ChatInput,
options: [ options: [
{ {
@@ -23,9 +23,19 @@ module.exports = new Command({
type: Discord.ApplicationCommandOptionType.String, type: Discord.ApplicationCommandOptionType.String,
}, },
], ],
permissions: ["SEND_MESSAGES"], permissions: cmdconfig.CloseTicket.Permission,
async run(interaction) { async run(interaction) {
let disableCommand = true;
if (cmdconfig.CloseTicket.Enabled === false) {
if (interaction.type === Discord.InteractionType.ApplicationCommand && disableCommand)
return interaction.reply({
content: ":x: This command is `disabled`",
ephemeral: true,
});
}
const { getRole, getChannel } = interaction.client; const { getRole, getChannel } = interaction.client;
if (supportbot.StaffOnly) { if (supportbot.StaffOnly) {
let SupportStaff = await getRole(supportbot.Staff, interaction.guild); let SupportStaff = await getRole(supportbot.Staff, interaction.guild);
+13 -3
View File
@@ -13,8 +13,8 @@ const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8"));
const Command = require("../Structures/Command.js"); const Command = require("../Structures/Command.js");
module.exports = new Command({ module.exports = new Command({
name: cmdconfig.EmbedCommand, name: cmdconfig.Embed.Command,
description: cmdconfig.EmbedCommandDesc, description: cmdconfig.Embed.Description,
type: Discord.ApplicationCommandType.ChatInput, type: Discord.ApplicationCommandType.ChatInput,
options: [ options: [
{ {
@@ -67,9 +67,19 @@ module.exports = new Command({
required: false, required: false,
}, },
], ],
permissions: ["SEND_MESSAGES"], permissions: cmdconfig.Embed.Permission,
async run(interaction) { async run(interaction) {
let disableCommand = true;
if (cmdconfig.Embed.Enabled === false) {
if (interaction.type === Discord.InteractionType.ApplicationCommand && disableCommand)
return interaction.reply({
content: ":x: This command is `disabled`",
ephemeral: true,
});
}
const { getRole } = interaction.client; const { getRole } = interaction.client;
let SupportStaff = await getRole(supportbot.Staff, interaction.guild); let SupportStaff = await getRole(supportbot.Staff, interaction.guild);
let Admin = await getRole(supportbot.Admin, interaction.guild); let Admin = await getRole(supportbot.Admin, interaction.guild);
+23 -14
View File
@@ -13,13 +13,23 @@ const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8"));
const Command = require("../Structures/Command.js"); const Command = require("../Structures/Command.js");
module.exports = new Command({ module.exports = new Command({
name: cmdconfig.HelpCommand, name: cmdconfig.Help.Command,
description: cmdconfig.HelpCommandDesc, description: cmdconfig.Help.Description,
type: Discord.ApplicationCommandType.ChatInput, type: Discord.ApplicationCommandType.ChatInput,
options: [], options: [],
permissions: ["SEND_MESSAGES"], permissions: cmdconfig.Help.Permission,
async run(interaction) { async run(interaction) {
let disableCommand = true;
if (cmdconfig.Help.Enabled === false) {
if (interaction.type === Discord.InteractionType.ApplicationCommand && disableCommand)
return interaction.reply({
content: ":x: This command is `disabled`",
ephemeral: true,
});
}
const { getRole } = interaction.client; const { getRole } = interaction.client;
let SupportStaff = await getRole(supportbot.Staff, interaction.guild); let SupportStaff = await getRole(supportbot.Staff, interaction.guild);
let Admin = await getRole(supportbot.Admin, interaction.guild); let Admin = await getRole(supportbot.Admin, interaction.guild);
@@ -29,24 +39,23 @@ module.exports = new Command({
); );
let botCommands = ""; let botCommands = "";
botCommands += `**/${cmdconfig.HelpCommand}** ${cmdconfig.HelpCommandDesc}\n`; botCommands += ` \`${cmdconfig.Help.Command}\` `;
botCommands += `**/${cmdconfig.InfoCommand}** ${cmdconfig.InfoCommandDesc}\n`; botCommands += `\`${cmdconfig.Ping.Command}\` `;
botCommands += `**/${cmdconfig.PingCommand}** ${cmdconfig.PingCommandDesc}\n`; botCommands += `\`${cmdconfig.Info.Command}\` `;
botCommands += `**/${cmdconfig.UserInfoCommand}** ${cmdconfig.UserInfoCommandDesc}\n`;
if (supportbot.DisableSuggestions === false) { if (supportbot.DisableSuggestions === false) {
botCommands += `**/${cmdconfig.SuggestCommand}** ${cmdconfig.SuggestCommandDesc}\n`; botCommands += `\`${cmdconfig.Suggestion.Command}\` `;
} }
let ticketCommands = ""; let ticketCommands = "";
ticketCommands += `**/${cmdconfig.OpenTicket}** ${cmdconfig.OpenTicketDesc}\n`; ticketCommands += ` \`${cmdconfig.OpenTicket.Command}\` `;
ticketCommands += `**/${cmdconfig.CloseTicket}** ${cmdconfig.CloseTicketDesc}\n`; ticketCommands += `\`${cmdconfig.CloseTicket.Command}\` `;
let staffCommands = ""; let staffCommands = "";
staffCommands += `**/${cmdconfig.TicketAdd}** ${cmdconfig.TicketAddDesc}\n`; staffCommands += ` \`${cmdconfig.TicketAdd.Command}\` `;
staffCommands += `**/${cmdconfig.TicketRemove}** ${cmdconfig.TicketRemoveDesc}\n`; staffCommands += `\`${cmdconfig.TicketRemove.Command}\` `;
staffCommands += `**/${cmdconfig.UserInfoCommand}** ${cmdconfig.UserInfoCommandDesc}\n`; staffCommands += `\`${cmdconfig.UserInfo.Command}\` `;
staffCommands += `**/${cmdconfig.TranslateCommand}** ${cmdconfig.TranslateCommandDesc}\n`; staffCommands += `\`${cmdconfig.Translate.Command}\` `;
const HelpEmbed1 = new Discord.EmbedBuilder() const HelpEmbed1 = new Discord.EmbedBuilder()
.setTitle(supportbot.General.Name + " Commands") .setTitle(supportbot.General.Name + " Commands")
+26 -17
View File
@@ -13,28 +13,37 @@ const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8"));
const Command = require("../Structures/Command.js"); const Command = require("../Structures/Command.js");
module.exports = new Command({ module.exports = new Command({
name: cmdconfig.InfoCommand, name: cmdconfig.Info.Command,
description: cmdconfig.InfoCommandDesc, description: cmdconfig.Info.Description,
options: [], options: [],
permissions: ["SEND_MESSAGES"], permissions: cmdconfig.Info.Permission,
async run(interaction) { async run(interaction) {
const InfoButton = new Discord.ButtonBuilder() if (cmdconfig.Info.Enabled === false) {
.setLabel(supportbot.InfoButtonText) if (interaction.type === Discord.InteractionType.ApplicationCommand && disableCommand)
.setURL(supportbot.InfoURL) return interaction.reply({
.setStyle("Link"); content: ":x: This command is `disabled`",
ephemeral: true,
});
}
const inforow = new Discord.ActionRowBuilder().addComponents(InfoButton); const InfoButton = new Discord.ButtonBuilder()
.setLabel(supportbot.InfoButtonText)
.setURL(supportbot.InfoURL)
.setStyle("Link");
const InfoEmbed = new Discord.EmbedBuilder() const inforow = new Discord.ActionRowBuilder().addComponents(InfoButton);
.setURL(supportbot.InfoURL)
.setTitle(supportbot.InfoTitle) const InfoEmbed = new Discord.EmbedBuilder()
.setDescription(supportbot.InfoDesc) .setURL(supportbot.InfoURL)
.setColor(supportbot.InfoColour) .setTitle(supportbot.InfoTitle)
.setDescription(supportbot.InfoDesc)
.setColor(supportbot.InfoColour)
interaction.reply({
embeds: [InfoEmbed],
components: [inforow],
});
interaction.reply({
embeds: [InfoEmbed],
components: [inforow],
});
}, },
}); });
+13 -3
View File
@@ -13,12 +13,22 @@ const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8"));
const Command = require("../Structures/Command.js"); const Command = require("../Structures/Command.js");
module.exports = new Command({ module.exports = new Command({
name: cmdconfig.PingCommand, name: cmdconfig.Ping.Command,
description: cmdconfig.PingCommandDesc, description: cmdconfig.Ping.Description,
options: [], options: [],
permissions: ["SEND_MESSAGES"], permissions: cmdconfig.Ping.Permission,
async run(interaction) { async run(interaction) {
let disableCommand = true;
if (cmdconfig.Ping.Enabled === false) {
if (interaction.type === Discord.InteractionType.ApplicationCommand && disableCommand)
return interaction.reply({
content: ":x: This command is `disabled`",
ephemeral: true,
});
}
const PingEmbed = new Discord.EmbedBuilder() const PingEmbed = new Discord.EmbedBuilder()
.setDescription( .setDescription(
`:ping_pong: **Ping:** \`${interaction.client.ws.ping} ms\`` `:ping_pong: **Ping:** \`${interaction.client.ws.ping} ms\``
+13 -3
View File
@@ -13,8 +13,8 @@ const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8"));
const Command = require("../Structures/Command.js"); const Command = require("../Structures/Command.js");
module.exports = new Command({ module.exports = new Command({
name: cmdconfig.TicketRemove, name: cmdconfig.TicketRemove.Command,
description: cmdconfig.TicketRemoveDesc, description: cmdconfig.TicketRemove.Description,
type: Discord.ApplicationCommandType.ChatInput, type: Discord.ApplicationCommandType.ChatInput,
options: [ options: [
{ {
@@ -25,9 +25,19 @@ module.exports = new Command({
required: true, required: true,
}, },
], ],
permissions: ["SEND_MESSAGES"], permissions: cmdconfig.TicketRemove.Permission,
async run(interaction) { async run(interaction) {
let disableCommand = true;
if (cmdconfig.TicketRemove.Enabled === false) {
if (interaction.type === Discord.InteractionType.ApplicationCommand && disableCommand)
return interaction.reply({
content: ":x: This command is `disabled`",
ephemeral: true,
});
}
const { getRole } = interaction.client; const { getRole } = interaction.client;
let Staff = await getRole(supportbot.Staff, interaction.guild); let Staff = await getRole(supportbot.Staff, interaction.guild);
let Admin = await getRole(supportbot.Admin, interaction.guild); let Admin = await getRole(supportbot.Admin, interaction.guild);
+13 -3
View File
@@ -13,8 +13,8 @@ const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8"));
const Command = require("../Structures/Command.js"); const Command = require("../Structures/Command.js");
module.exports = new Command({ module.exports = new Command({
name: cmdconfig.SuggestCommand, name: cmdconfig.Suggestion.Command,
description: cmdconfig.SuggestCommandDesc, description: cmdconfig.Suggestion.Description,
type: Discord.ApplicationCommandType.ChatInput, type: Discord.ApplicationCommandType.ChatInput,
options: [ options: [
{ {
@@ -25,9 +25,19 @@ module.exports = new Command({
required: true, required: true,
}, },
], ],
permissions: ["SEND_MESSAGES"], permissions: cmdconfig.Suggestion.Permission,
async run(interaction) { async run(interaction) {
let disableCommand = true;
if (cmdconfig.Suggestion.Enabled === false) {
if (interaction.type === Discord.InteractionType.ApplicationCommand && disableCommand)
return interaction.reply({
content: ":x: This command is `disabled`",
ephemeral: true,
});
}
const { getChannel } = interaction.client; const { getChannel } = interaction.client;
const suggestChannel = await getChannel( const suggestChannel = await getChannel(
supportbot.SuggestionChannel, supportbot.SuggestionChannel,
+15 -10
View File
@@ -4,13 +4,14 @@
const fs = require("fs"); const fs = require("fs");
const { const {
MessageEmbed, EmbedBuilder,
Permissions, Permissions,
MessageButton, MessageButton,
MessageActionRow, MessageActionRow,
ApplicationCommandOptionType, ApplicationCommandOptionType,
ApplicationCommandType, ApplicationCommandType,
ButtonStyle ButtonStyle,
InteractionType
} = require("discord.js"); } = require("discord.js");
const yaml = require("js-yaml"); const yaml = require("js-yaml");
@@ -23,8 +24,8 @@ const Command = require("../Structures/Command.js");
const TicketNumberID = require("../Structures/TicketID.js"); const TicketNumberID = require("../Structures/TicketID.js");
module.exports = new Command({ module.exports = new Command({
name: cmdconfig.OpenTicket, name: cmdconfig.OpenTicket.Command,
description: cmdconfig.OpenTicketDesc, description: cmdconfig.OpenTicket.Description,
type: ApplicationCommandType.ChatInput, type: ApplicationCommandType.ChatInput,
options: [ options: [
{ {
@@ -34,15 +35,19 @@ module.exports = new Command({
}, },
], ],
permissions: ["SEND_MESSAGES"], permissions: cmdconfig.OpenTicket.Permission,
async run(interaction) { async run(interaction) {
let disableCommand = true; let disableCommand = true;
if (interaction.isCommand() && disableCommand)
if (cmdconfig.OpenTicket.Enabled === false) {
if (interaction.type === InteractionType.ApplicationCommand && disableCommand)
return interaction.reply({ return interaction.reply({
content: "This command is disabled", content: ":x: This command is `disabled`",
ephemeral: true, ephemeral: true,
}); });
}
let department = interaction.customId?.split("-")[1] || null; let department = interaction.customId?.split("-")[1] || null;
let TicketData = await JSON.parse( let TicketData = await JSON.parse(
fs.readFileSync("./Data/TicketData.json", "utf8") fs.readFileSync("./Data/TicketData.json", "utf8")
@@ -86,7 +91,7 @@ module.exports = new Command({
const TicketSubject = const TicketSubject =
interaction.options?.getString("reason") || supportbot.NoTicketSubject; interaction.options?.getString("reason") || supportbot.NoTicketSubject;
const TicketExists = new MessageEmbed() const TicketExists = new EmbedBuilder()
.setTitle("Ticket Exists!") .setTitle("Ticket Exists!")
.setDescription(supportbot.TicketExists); .setDescription(supportbot.TicketExists);
@@ -161,7 +166,7 @@ module.exports = new Command({
} }
); );
const CreatedTicket = new MessageEmbed() const CreatedTicket = new EmbedBuilder()
.setDescription( .setDescription(
supportbot.TicketCreatedAlert.replace( supportbot.TicketCreatedAlert.replace(
/%ticketauthor%/g, /%ticketauthor%/g,
@@ -177,7 +182,7 @@ module.exports = new Command({
await ticketChannel.send(`${interaction.user}`); await ticketChannel.send(`${interaction.user}`);
} }
const TicketMessage = new MessageEmbed() const TicketMessage = new EmbedBuilder()
.setTitle( .setTitle(
supportbot.Ticket_Title.replace(/%ticketauthor%/g, interaction.user.id) supportbot.Ticket_Title.replace(/%ticketauthor%/g, interaction.user.id)
.replace(/%ticketid%/g, ticketChannel.id) .replace(/%ticketid%/g, ticketChannel.id)
+12 -3
View File
@@ -16,8 +16,8 @@ const Command = require("../Structures/Command.js");
const translate = require("@vitalets/google-translate-api"); const translate = require("@vitalets/google-translate-api");
module.exports = new Command({ module.exports = new Command({
name: cmdconfig.TranslateCommand, // Name of command name: cmdconfig.Translate.Command,
description: cmdconfig.TranslateCommandDesc, // Description of command description: cmdconfig.Translate.Description,
type: Discord.ApplicationCommandType.ChatInput, type: Discord.ApplicationCommandType.ChatInput,
options: [ options: [
{ {
@@ -33,9 +33,18 @@ module.exports = new Command({
required: true, required: true,
}, // The input text for the translation }, // The input text for the translation
], ],
permissions: ["SEND_MESSAGES"], // The permission the user/role at least requires permissions: cmdconfig.Translate.Permission, // The permission the user/role at least requires
async run(interaction) { async run(interaction) {
let disableCommand = true;
if (cmdconfig.Translate.Enabled === false) {
if (interaction.type === Discord.InteractionType.ApplicationCommand && disableCommand)
return interaction.reply({
content: ":x: This command is `disabled`",
ephemeral: true,
});
}
const { getRole } = interaction.client; const { getRole } = interaction.client;
let SupportStaff = await getRole(supportbot.Staff, interaction.guild); let SupportStaff = await getRole(supportbot.Staff, interaction.guild);
+13 -3
View File
@@ -16,8 +16,8 @@ const cmdconfig = yaml.load(
const Command = require("../Structures/Command.js"); const Command = require("../Structures/Command.js");
module.exports = new Command({ module.exports = new Command({
name: cmdconfig.UserInfoCommand, // Name of command name: cmdconfig.UserInfo.Command,
description: cmdconfig.UserInfoCommandDesc, // Description of command description: cmdconfig.UserInfo.Description,
type: Discord.ApplicationCommandType.ChatInput, type: Discord.ApplicationCommandType.ChatInput,
options: [ options: [
{ {
@@ -27,9 +27,19 @@ module.exports = new Command({
required: true, required: true,
}, // The user input }, // The user input
], ],
permissions: ["SEND_MESSAGES"], // The permission the user/role at least requires permissions: cmdconfig.UserInfo.Permission,
async run(interaction) { async run(interaction) {
let disableCommand = true;
if (cmdconfig.UserInfo.Enabled === false) {
if (interaction.type === Discord.InteractionType.ApplicationCommand && disableCommand)
return interaction.reply({
content: ":x: This command is `disabled`",
ephemeral: true,
});
}
const { getRole } = interaction.client; const { getRole } = interaction.client;
let SupportStaff = await getRole(supportbot.Staff, interaction.guild); let SupportStaff = await getRole(supportbot.Staff, interaction.guild);
let Admin = await getRole(supportbot.Admin, interaction.guild); let Admin = await getRole(supportbot.Admin, interaction.guild);
+68 -17
View File
@@ -7,25 +7,76 @@
# SupportBot created by Emerald Services # SupportBot created by Emerald Services
# Installed with MIT License # Installed with MIT License
# #
# Discord Support: https://emeraldsrv.dev/discord # Discord Support: https://dsc.gg/emerald-dev
# Community Resources: https://emeraldsrv.dev/resources # Official Documentation: https://emeraldsrv.dev/wiki
# Third-Party Documentation: https://emeraldsrv.dev/third-party
#
# Command Configuration
# ------------------------------- Help:
# Command Name Configuration Command: "help"
# ------------------------------- Description: "Get a list of all the commands."
Permission: ["SEND_MESSAGES"]
Enabled: true
Blacklist: "blacklist" Info:
TicketAdd: "add" Command: "info"
TicketRemove: "remove" Description: "Get information about the **ServerName**."
OpenTicket: "ticket" Permission: ["SEND_MESSAGES"]
CloseTicket: "close" Enabled: true
InfoCommand: "info"
PingCommand: "ping" TicketAdd:
HelpCommand: "help" Command: "add"
EmbedCommand: "embed" Description: "Add a user to a ticket."
SuggestCommand: "suggest" Permission: ["SEND_MESSAGES"]
TranslateCommand: "translate" Enabled: false
UserInfoCommand: "userinfo"
TicketRemove:
Command: "remove"
Description: "Remove a user from a ticket."
Permission: ["SEND_MESSAGES"]
Enabled: true
OpenTicket:
Command: "ticket"
Description: "Create a support ticket."
Permission: ["SEND_MESSAGES"]
Enabled: true
CloseTicket:
Command: "close"
Description: "Close a support ticket"
Permission: ["SEND_MESSAGES"]
Suggestion:
Command: "suggest"
Description: "Create a suggestion."
Permission: ["SEND_MESSAGES"]
Enabled: true
Embed:
Command: "embed"
Description: "Build a discord embed."
Permission: ["SEND_MESSAGES"]
Enabled: true
Translate:
Command: "translate"
Description: "Translate something to english"
Permission: ["SEND_MESSAGES"]
Enabled: true
UserInfo:
Command: "userinfo"
Description: "Get info about a user."
Permission: ["SEND_MESSAGES"]
Enabled: true
Ping:
Command: "ping"
Description: "Pong."
Permission: ["SEND_MESSAGES"]
Enabled: true
# --------------------------------------- # ---------------------------------------
# Command Description Configuration # Command Description Configuration
+9 -9
View File
@@ -11,7 +11,7 @@
# Official Documentation: https://emeraldsrv.dev/wiki # Official Documentation: https://emeraldsrv.dev/wiki
# Third-Party Documentation: https://emeraldsrv.dev/third-party # Third-Party Documentation: https://emeraldsrv.dev/third-party
SupportBot_Version: "v8.0 DEV-v1.0" SupportBot_Version: "v8.0 DEV-v1.1"
# ------------------------- # -------------------------
# General Configuration # General Configuration
@@ -19,18 +19,18 @@ SupportBot_Version: "v8.0 DEV-v1.0"
General: General:
Name: "SupportBot" Name: "SupportBot"
Token: "BOT_TOKEN" Token: ""
# ------------------------- # -------------------------
# Activity Configuration # Activity Configuration
# ------------------------- # -------------------------
Status: "SupportBot v8" Activity:
Type: "Watching" Status: "SupportBot v8"
# The Type can either be Playing, Watching, Listenin or Streaming. Type: "Watching"
# The Type can either be Playing, Watching, Listenin or Streaming.
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME" StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
# Set The Type to "Streaming" for a streaming status! # Set The Type to "Streaming" for a streaming status!
# ------------------------- # -------------------------
# Embed Configuration # Embed Configuration
@@ -260,4 +260,4 @@ IncorrectPerms: "> :x: **Err!** You do not have the correct permissions to use t
InvalidChannel: "> :x: **Err!** Channel not found. Please create it!" InvalidChannel: "> :x: **Err!** Channel not found. Please create it!"
UserNotFound: "> :x: **Err!** This user doesn't exist, Are they in this server?" UserNotFound: "> :x: **Err!** This user doesn't exist, Are they in this server?"
NoValidTicket: "> :warning: You cannot execute this command here." NoValidTicket: "> :warning: You cannot execute this command here."
TicketExists: "> :warning: This ticket cannot be opened, It already exists!" TicketExists: "> :warning: This ticket cannot be opened, It already exists!"
+4 -1
View File
@@ -1 +1,4 @@
{"id":0,"TicketPanelID":""} {
"id": 4,
"TicketPanelID": ""
}
+2 -2
View File
@@ -49,7 +49,7 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
interaction.customId.includes("department-") interaction.customId.includes("department-")
) { ) {
try { try {
const cmd = client.commands.get(cmdconfig.OpenTicket); const cmd = client.commands.get(cmdconfig.OpenTicket.Command);
if (!cmd) return; if (!cmd) return;
cmd.run(interaction); cmd.run(interaction);
} catch (error) { } catch (error) {
@@ -59,7 +59,7 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
if (interaction.customId === "ticketclose") { if (interaction.customId === "ticketclose") {
try { try {
const cmd = client.commands.get(cmdconfig.CloseTicket); const cmd = client.commands.get(cmdconfig.CloseTicket.Command);
if (!cmd) return; if (!cmd) return;
cmd.run(interaction); cmd.run(interaction);
} catch (error) { } catch (error) {
+6 -5
View File
@@ -16,9 +16,9 @@ const Event = require("../Structures/Event.js");
module.exports = new Event("ready", async (client, interaction) => { module.exports = new Event("ready", async (client, interaction) => {
const { getRole, getChannel, getCategory } = client; const { getRole, getChannel, getCategory } = client;
client.user.setActivity(supportbot.Activity, { client.user.setActivity(supportbot.Activity.Status, {
type: supportbot.Type, type: supportbot.Activity.Type,
url: supportbot.StreamingURL, url: supportbot.Activity.StreamingURL,
}); });
console.log(`\u001b[32m`, `――――――――――――――――――――――――――――――――――――――――――――`); console.log(`\u001b[32m`, `――――――――――――――――――――――――――――――――――――――――――――`);
@@ -90,8 +90,8 @@ module.exports = new Event("ready", async (client, interaction) => {
const roles = [ const roles = [
supportbot.Admin, supportbot.Admin,
supportbot.Staff, supportbot.Staff,
supportbot?.TicketBlackListRole, supportbot.TicketBlackListRole,
supportbot?.TicketMutedRole supportbot.TicketMutedRole
]; ];
supportbot.Departments.forEach((department) => roles.push(department.role)); supportbot.Departments.forEach((department) => roles.push(department.role));
@@ -111,6 +111,7 @@ module.exports = new Event("ready", async (client, interaction) => {
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) { if ((c === supportbot.SuggestionChannel && supportbot.DisableSuggestionsChannel) || c === supportbot.TicketLog && supportbot.DisableTicketLogChannel) {
continue; continue;