Skip to content

Commit

Permalink
fix: capitalize for userEmbed fields name
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed Jun 15, 2024
1 parent 5e043a9 commit 27e4e8c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/database/register/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export async function validateUser(interaction: ButtonInteraction, template: Sta
const ul = ln(interaction.locale as Locale);
const oldEmbeds = ensureEmbed(interaction.message);
const oldEmbedsFields = parseEmbedFields(oldEmbeds);
console.log(oldEmbedsFields);
let userID = oldEmbedsFields?.["common.user"];
let charName: string | undefined = oldEmbedsFields?.["common.charName"];
const isPrivate = oldEmbedsFields["common.isPrivate"] === "common.yes";
Expand Down Expand Up @@ -93,7 +92,7 @@ export async function validateUser(interaction: ButtonInteraction, template: Sta
inline: true,

});
} else if (findKeyFromTranslation(field.name) !== "common.isPrivate") userDataEmbed.addFields(field);
} else if (findKeyFromTranslation(field.name) !== "common.isPrivate") userDataEmbed.addFields({ name: field.name, value: title(field.value), inline: field.inline });
}
const templateStat = template.statistics ? Object.keys(template.statistics) : [];
const stats: { [name: string]: number } = {};
Expand Down

0 comments on commit 27e4e8c

Please sign in to comment.