From 35e58972a8f21934584a07140a9b345e3b0396ff Mon Sep 17 00:00:00 2001 From: VinceC <33974776+VinceC3@users.noreply.github.com> Date: Fri, 29 Nov 2024 04:37:34 -0600 Subject: [PATCH] fix: correct team size display to prevent doubling --- src/utils/embedBuilders.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/utils/embedBuilders.js b/src/utils/embedBuilders.js index a2580e8..aec8efd 100644 --- a/src/utils/embedBuilders.js +++ b/src/utils/embedBuilders.js @@ -151,14 +151,13 @@ class EmbedBuilders { const matchDateTime = new Date(matchData.match_date); const formattedDateTime = matchDateTime.toLocaleString(); - // Format team size to be "4v4" regardless of input format - const teamSize = matchData.team_size.toString().replace(/[^0-9]/g, ''); // Keep only numbers - const formattedTeamSize = `${teamSize}v${teamSize}`; + // Get the team size number and ensure it's not doubled + const teamSize = matchData.team_size; return new EmbedBuilder() .setColor('#00ff00') // Green for new match requests .setTitle(`🎮 New ${matchData.game_name} Match`) - .setDescription(`${formattedTeamSize} Match in ${matchData.region} Region`) + .setDescription(`${teamSize} Match in ${matchData.region} Region`) .addFields( { name: '⏰ Starting',