From 5872d0c0acb44b51d2632cd90bb82a0614d749d8 Mon Sep 17 00:00:00 2001 From: codebymitch Date: Fri, 17 Apr 2026 19:28:50 +1000 Subject: [PATCH 1/4] Error fix in welcome/goodbye --- src/commands/Welcome/goodbye.js | 2 +- src/commands/Welcome/welcome.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/Welcome/goodbye.js b/src/commands/Welcome/goodbye.js index dcfd25e318..736924a5a2 100644 --- a/src/commands/Welcome/goodbye.js +++ b/src/commands/Welcome/goodbye.js @@ -62,7 +62,7 @@ export default { const ping = options.getBoolean('ping') ?? false; const existingConfig = await getWelcomeConfig(client, guild.id); - if (hasGoodbyeSetup(existingConfig)) { + if (existingConfig?.goodbyeChannelId) { logger.info(`[Goodbye] Setup blocked because config already exists in channel ${existingConfig.goodbyeChannelId} for guild ${guild.id}`); return await InteractionHelper.safeEditReply(interaction, { embeds: [errorEmbed( diff --git a/src/commands/Welcome/welcome.js b/src/commands/Welcome/welcome.js index 02d864b62d..4461b0ba7e 100644 --- a/src/commands/Welcome/welcome.js +++ b/src/commands/Welcome/welcome.js @@ -67,7 +67,7 @@ export default { const ping = options.getBoolean('ping') ?? false; const existingConfig = await getWelcomeConfig(client, guild.id); - if (hasWelcomeSetup(existingConfig)) { + if (existingConfig?.channelId) { logger.info(`[Welcome] Setup blocked because config already exists in channel ${existingConfig.channelId} for guild ${guild.id}`); return await InteractionHelper.safeEditReply(interaction, { embeds: [errorEmbed( From 02f38a3cb0ecc6d2f7991aa1c07b8422a9836a3b Mon Sep 17 00:00:00 2001 From: codebymitch Date: Sun, 19 Apr 2026 17:13:27 +1000 Subject: [PATCH 2/4] Made help embed title dynamic --- src/commands/Core/help.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/commands/Core/help.js b/src/commands/Core/help.js index 5e0a58035e..839697d5d1 100644 --- a/src/commands/Core/help.js +++ b/src/commands/Core/help.js @@ -44,7 +44,7 @@ const CATEGORY_ICONS = { -async function createInitialHelpMenu() { +async function createInitialHelpMenu(client) { const commandsPath = path.join(__dirname, "../../commands"); const categoryDirs = ( await fs.readdir(commandsPath, { withFileTypes: true }) @@ -72,8 +72,9 @@ async function createInitialHelpMenu() { }), ]; + const botName = client.user.username; const embed = createEmbed({ - title: "🤖 TitanBot Help Center", + title: `🤖 ${botName} Help Center`, description: "Your all-in-one Discord companion for moderation, economy, fun, and server management.", color: 'primary' }); @@ -204,7 +205,7 @@ export default { const { MessageFlags } = await import('discord.js'); await InteractionHelper.safeDefer(interaction); - const { embeds, components } = await createInitialHelpMenu(); + const { embeds, components } = await createInitialHelpMenu(client); await InteractionHelper.safeEditReply(interaction, { embeds, From bafefc44cd38081bca58954513e91869b637d8fc Mon Sep 17 00:00:00 2001 From: codebymitch Date: Sun, 19 Apr 2026 17:21:44 +1000 Subject: [PATCH 3/4] Revert "Made help embed title dynamic" This reverts commit 02f38a3cb0ecc6d2f7991aa1c07b8422a9836a3b. --- src/commands/Core/help.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/commands/Core/help.js b/src/commands/Core/help.js index 839697d5d1..5e0a58035e 100644 --- a/src/commands/Core/help.js +++ b/src/commands/Core/help.js @@ -44,7 +44,7 @@ const CATEGORY_ICONS = { -async function createInitialHelpMenu(client) { +async function createInitialHelpMenu() { const commandsPath = path.join(__dirname, "../../commands"); const categoryDirs = ( await fs.readdir(commandsPath, { withFileTypes: true }) @@ -72,9 +72,8 @@ async function createInitialHelpMenu(client) { }), ]; - const botName = client.user.username; const embed = createEmbed({ - title: `🤖 ${botName} Help Center`, + title: "🤖 TitanBot Help Center", description: "Your all-in-one Discord companion for moderation, economy, fun, and server management.", color: 'primary' }); @@ -205,7 +204,7 @@ export default { const { MessageFlags } = await import('discord.js'); await InteractionHelper.safeDefer(interaction); - const { embeds, components } = await createInitialHelpMenu(client); + const { embeds, components } = await createInitialHelpMenu(); await InteractionHelper.safeEditReply(interaction, { embeds, From ea76db34f0ba43b448b7b779030e6cd4d6d24dbb Mon Sep 17 00:00:00 2001 From: codebymitch Date: Sun, 19 Apr 2026 17:23:45 +1000 Subject: [PATCH 4/4] Pass client to help menu and dynamic title --- src/commands/Core/help.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/commands/Core/help.js b/src/commands/Core/help.js index 5e0a58035e..34d2fbccee 100644 --- a/src/commands/Core/help.js +++ b/src/commands/Core/help.js @@ -1,4 +1,4 @@ -import { +import { SlashCommandBuilder, ActionRowBuilder, ButtonBuilder, @@ -44,7 +44,7 @@ const CATEGORY_ICONS = { -async function createInitialHelpMenu() { +async function createInitialHelpMenu(client) { const commandsPath = path.join(__dirname, "../../commands"); const categoryDirs = ( await fs.readdir(commandsPath, { withFileTypes: true }) @@ -72,8 +72,9 @@ async function createInitialHelpMenu() { }), ]; + const botName = client?.user?.username || "Bot"; const embed = createEmbed({ - title: "🤖 TitanBot Help Center", + title: `🤖 ${botName} Help Center`, description: "Your all-in-one Discord companion for moderation, economy, fun, and server management.", color: 'primary' }); @@ -204,7 +205,7 @@ export default { const { MessageFlags } = await import('discord.js'); await InteractionHelper.safeDefer(interaction); - const { embeds, components } = await createInitialHelpMenu(); + const { embeds, components } = await createInitialHelpMenu(client); await InteractionHelper.safeEditReply(interaction, { embeds,