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

+8 -4
View File
@@ -13,7 +13,7 @@ export const data = new SlashCommandBuilder()
.addIntegerOption((option) =>
option
.setName('amount')
.setDescription('Nombre de messages')
.setDescription('Nombre de messages à supprimer (1 à 100)')
.setRequired(true)
.setMinValue(1)
.setMaxValue(100),
@@ -23,7 +23,9 @@ export const data = new SlashCommandBuilder()
export async function execute(interaction) {
const amount = interaction.options.getInteger('amount', true);
if (!interaction.channel?.isTextBased() || !interaction.channel.bulkDelete) {
throw new UserFacingError('La suppression groupée n’est pas possible dans ce salon.');
throw new UserFacingError(
'Je ne peux pas supprimer plusieurs messages d’un coup ici : lance la commande dans un salon textuel.',
);
}
await interaction.deferReply({ flags: MessageFlags.Ephemeral });
@@ -37,8 +39,10 @@ export async function execute(interaction) {
await interaction.editReply({
embeds: [
successEmbed(
`${deleted.size} message(s) supprimé(s) dans <#${interaction.channelId}>.` +
(deleted.size < amount ? '\n_Les messages de plus de 14 jours sont conservés par Discord._' : ''),
`C’est nettoyé : ${deleted.size} message(s) supprimé(s) dans <#${interaction.channelId}>.` +
(deleted.size < amount
? '\n_Discord conserve les messages de plus de 14 jours : ils n’ont pas pu être retirés._'
: ''),
),
],
});