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 matchDateTime = new Date(matchData.match_date);
|
||||||
const formattedDateTime = matchDateTime.toLocaleString();
|
const formattedDateTime = matchDateTime.toLocaleString();
|
||||||
|
|
||||||
// Format team size to be "4v4" regardless of input format
|
// Get the team size number and ensure it's not doubled
|
||||||
const teamSize = matchData.team_size.toString().replace(/[^0-9]/g, ''); // Keep only numbers
|
const teamSize = matchData.team_size;
|
||||||
const formattedTeamSize = `${teamSize}v${teamSize}`;
|
|
||||||
|
|
||||||
return new EmbedBuilder()
|
return new EmbedBuilder()
|
||||||
.setColor('#00ff00') // Green for new match requests
|
.setColor('#00ff00') // Green for new match requests
|
||||||
.setTitle(`🎮 New ${matchData.game_name} Match`)
|
.setTitle(`🎮 New ${matchData.game_name} Match`)
|
||||||
.setDescription(`${formattedTeamSize} Match in ${matchData.region} Region`)
|
.setDescription(`${teamSize} Match in ${matchData.region} Region`)
|
||||||
.addFields(
|
.addFields(
|
||||||
{
|
{
|
||||||
name: '⏰ Starting',
|
name: '⏰ Starting',
|
||||||
|
|||||||
Reference in New Issue
Block a user