Compare commits

..
Author SHA1 Message Date
Nyo 2f23e8f23d Fix link format for BuiltByBit in README.md 2025-09-30 18:49:52 +02:00
1tzEmerald 4c07b8a236 Merge pull request #196 from Emerald-Services/dev
8.4.1 guilldMemberAdd update.
2025-09-25 13:16:42 +01:00
1tzEmerald 571bd586fa 8.4.1 guilldMemberAdd update.
Added if statement to .setAccentColor allowing you to remove the color from the config.
2025-09-25 13:16:20 +01:00
1tzEmerald eac2d88873 Merge pull request #195 from Emerald-Services/dev
8.4.1 small fix
2025-09-25 13:10:23 +01:00
1tzEmerald 93c793f393 Merge branch 'dev' of https://github.com/Emerald-Services/SupportBot into dev 2025-09-25 13:09:09 +01:00
1tzEmerald 1aa97b63f9 8.4.1 small fix 2025-09-25 13:09:00 +01:00
6 changed files with 40 additions and 13 deletions

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}`
);
if (supportbot.Ticket.TicketReason && TicketReason) {
ticketMsgContainer.addTextDisplayComponents(ticketReason)
}
const selectMenuRow = new ActionRowBuilder();
const SelectMenus = new StringSelectMenuBuilder()
@@ -561,10 +565,6 @@ module.exports = new Command({
ticketMsgContainer.addActionRowComponents(selectMenuRow)
if (supportbot.Ticket.TicketReason && TicketReason) {
ticketMsgContainer.addTextDisplayComponents(ticketReason)
}
await ticketChannel.send({
flags: MessageFlags.IsComponentsV2,
components: [ticketMsgContainer],
+1 -1
View File
@@ -13,7 +13,7 @@
#
# SupportBot Configuration (supportbot.yml)
SupportBot_Version: "v8.4"
SupportBot_Version: "v8.4.1"
# -------------------------
# General
+4 -3
View File
@@ -36,10 +36,11 @@ function getWelcomeThumbnail(client, member, iconCfg) {
function buildModernComponents(client, member) {
const container = new ContainerBuilder()
.setAccentColor(
parseInt(msgconfig.Welcome.Modern.Colour.replace("#", ""), 16)
);
if (msgconfig.Welcome.Modern.Colour) {
container .setAccentColor(parseInt(msgconfig.Welcome.Modern.Colour.replace("#", ""), 16));
}
const section = new SectionBuilder().addTextDisplayComponents(
new TextDisplayBuilder().setContent(
msgconfig.Welcome.Modern.Title.replace(/%joined_user%/g, member.user)
+1 -1
View File
@@ -74,7 +74,7 @@ Released under the [MIT](https://opensource.org/licenses/MIT) license.
- [Official addons repository](https://github.com/Emerald-Services/Addons/)
- [Syphers Addons](https://github.com/SypherRed/SB_Addons_Unofficial)
- [BuiltByBit](https://builtbybit.com/supportbot)
- [BuiltByBit]([https://builtbybit.com/supportbot](https://builtbybit.com/resources/supportbot-advanced-ticket-bot.8940/))
- [Polymart](https://polymart.org/resource/supportbot-1-discord-ticket-bot.518)
+4 -4
View File
@@ -41,26 +41,26 @@ logTypes.forEach((type) => {
function logToFile(type, data) {
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`);
}
const origLog = console.log;
console.log = (...args) => {
origLog(...args);
logToFile("output", args.join(" "));
logToFile("Output", args.join(" "));
};
const origWarn = console.warn;
console.warn = (...args) => {
origWarn(...args);
logToFile("warn", args.join(" "));
logToFile("Warn", args.join(" "));
};
const origError = console.error;
console.error = (...args) => {
origError(...args);
logToFile("error", args.join(" "));
logToFile("Error", args.join(" "));
};
process.on("unhandledRejection", (reason) => {