refactor(ui): give every message one friendly, ungendered voice

Members read all replies as one voice, so the wording now lives in one place:
the shared titles, the list marker and the "what to do next" hint come from
src/ui/embeds.js, and every module follows them.

An error explains the cause, recalls the rule and offers the way out instead of
blaming; a success says what happens next. Nothing agrees on the gender of a
person ("utilisateur", "cher/chère", "ravie"), which also keeps the sentences
shorter. Two tests lock the shared titles and reject gendered descriptions.
This commit is contained in:
BlackAngelTV committed 2026-09-15 16:12:19 +02:00
1 parent 76e2269555
commit ef8f09da10
31 files changed
+469 -201

No files matched your search

+6 -6
View File
@@ -1,7 +1,7 @@
import { SlashCommandBuilder } from 'discord.js';
import { ACCESS_LEVELS, COLORS } from '../../config/constants.js';
import { parseChoices } from '../../services/polls/poll-service.js';
import { baseEmbed } from '../../ui/embeds.js';
import { baseEmbed, bullets } from '../../ui/embeds.js';
export const access = ACCESS_LEVELS.USER;
@@ -62,7 +62,7 @@ export async function execute(interaction) {
if (subcommand === 'coinflip') {
const result = pick(['Pile', 'Face']);
await interaction.reply({
embeds: [baseEmbed(COLORS.info).setTitle('Pile ou face').setDescription(`🪙 ${result} !`)],
embeds: [baseEmbed(COLORS.info).setTitle('🪙 Pile ou face').setDescription(`**${result}** !`)],
});
return;
}
@@ -73,8 +73,8 @@ export async function execute(interaction) {
await interaction.reply({
embeds: [
baseEmbed(COLORS.info)
.setTitle(`Lancer de dé (d${sides})`)
.setDescription(`🎲 Tu obtiens **${roll}** !`),
.setTitle(`🎲 Lancer de dé (d${sides})`)
.setDescription(`Tu obtiens **${roll}** !`),
],
});
return;
@@ -99,8 +99,8 @@ export async function execute(interaction) {
await interaction.reply({
embeds: [
baseEmbed(COLORS.info)
.setTitle('Choix aléatoire')
.addFields({ name: 'Options', value: options.map((option) => `• ${option}`).join('\n') })
.setTitle('🎯 Choix aléatoire')
.addFields({ name: 'Options', value: bullets(options) })
.setDescription(`Je choisis : **${pick(options)}**`),
],
});