fix: correct team size display to prevent doubling
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user