Merge pull request #195 from Emerald-Services/dev

8.4.1 small fix
This commit is contained in:
1tzEmerald authored and GitHub committed 2025-09-25 13:10:23 +01:00
commit eac2d88873
4 files changed
+35 -9

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require("js-yaml");
const { Command } = require('../Structures/Addon.js'); // Adjust the path as needed
const supportbot = yaml.load(fs.readFileSync("./Configs/supportbot.yml", "utf8"));
module.exports = new Command({
name: "addon",
description: "This is a sample addon!",
options: [],
permissions: ["Administrator"],
async run(interaction) {
let disableCommand = true;
const PingEmbed = new Discord.EmbedBuilder()
.setDescription(
`This is a sample addon.\n\nPong! \`${interaction.client.ws.ping} ms\``
)
.setColor(supportbot.Embed.Colours.General);
interaction.reply({
embeds: [PingEmbed],
});
},
});
+4 -4
View File
@@ -507,6 +507,10 @@ module.exports = new Command({
`**Reason:**\n ${TicketReason}` `**Reason:**\n ${TicketReason}`
); );
if (supportbot.Ticket.TicketReason && TicketReason) {
ticketMsgContainer.addTextDisplayComponents(ticketReason)
}
const selectMenuRow = new ActionRowBuilder(); const selectMenuRow = new ActionRowBuilder();
const SelectMenus = new StringSelectMenuBuilder() const SelectMenus = new StringSelectMenuBuilder()
@@ -561,10 +565,6 @@ module.exports = new Command({
ticketMsgContainer.addActionRowComponents(selectMenuRow) ticketMsgContainer.addActionRowComponents(selectMenuRow)
if (supportbot.Ticket.TicketReason && TicketReason) {
ticketMsgContainer.addTextDisplayComponents(ticketReason)
}
await ticketChannel.send({ await ticketChannel.send({
flags: MessageFlags.IsComponentsV2, flags: MessageFlags.IsComponentsV2,
components: [ticketMsgContainer], components: [ticketMsgContainer],
+1 -1
View File
@@ -13,7 +13,7 @@
# #
# SupportBot Configuration (supportbot.yml) # SupportBot Configuration (supportbot.yml)
SupportBot_Version: "v8.4" SupportBot_Version: "v8.4.1"
# ------------------------- # -------------------------
# General # General
+4 -4
View File
@@ -41,26 +41,26 @@ logTypes.forEach((type) => {
function logToFile(type, data) { function logToFile(type, data) {
const date = new Date().toISOString().split("T")[0]; const date = new Date().toISOString().split("T")[0];
const file = path.join(`./logs/${type}`, `${type}-${date}.log`); const file = path.join(`./Logs/${type}`, `${type}-${date}.log`);
fs.appendFileSync(file, `[${new Date().toISOString()}] ${data}\n`); fs.appendFileSync(file, `[${new Date().toISOString()}] ${data}\n`);
} }
const origLog = console.log; const origLog = console.log;
console.log = (...args) => { console.log = (...args) => {
origLog(...args); origLog(...args);
logToFile("output", args.join(" ")); logToFile("Output", args.join(" "));
}; };
const origWarn = console.warn; const origWarn = console.warn;
console.warn = (...args) => { console.warn = (...args) => {
origWarn(...args); origWarn(...args);
logToFile("warn", args.join(" ")); logToFile("Warn", args.join(" "));
}; };
const origError = console.error; const origError = console.error;
console.error = (...args) => { console.error = (...args) => {
origError(...args); origError(...args);
logToFile("error", args.join(" ")); logToFile("Error", args.join(" "));
}; };
process.on("unhandledRejection", (reason) => { process.on("unhandledRejection", (reason) => {