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:
31 files changed
+469
-201
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { MessageFlags, SlashCommandBuilder } from 'discord.js';
|
||||
import { ACCESS_LEVELS } from '../../config/constants.js';
|
||||
import { ACCESS_LABELS, ACCESS_LEVELS } from '../../config/constants.js';
|
||||
import { getAccessLevel } from '../../core/permissions.js';
|
||||
import { baseEmbed } from '../../ui/embeds.js';
|
||||
import { baseEmbed, bullets } from '../../ui/embeds.js';
|
||||
|
||||
export const access = ACCESS_LEVELS.USER;
|
||||
|
||||
@@ -16,6 +16,10 @@ export async function execute(interaction) {
|
||||
.map((command) => `\`/${command.data.name}\` — ${command.data.description}`)
|
||||
.sort();
|
||||
|
||||
const embed = baseEmbed().setTitle('Commandes FWS-Bot').setDescription(lines.join('\n'));
|
||||
const embed = baseEmbed()
|
||||
.setTitle('🤖 Tes commandes')
|
||||
.setDescription(
|
||||
`Tu es au niveau **${ACCESS_LABELS[level]}**. Voici ce que tu peux lancer :\n\n${bullets(lines)}`,
|
||||
);
|
||||
await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral });
|
||||
}
|
||||
Reference in new issue
Block a user