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
@@ -13,20 +13,29 @@ export const data = new SlashCommandBuilder()
|
||||
.setName('create')
|
||||
.setDescription('Créer un sondage')
|
||||
.addStringOption((option) =>
|
||||
option.setName('question').setDescription('Question').setRequired(true).setMaxLength(200),
|
||||
option.setName('question').setDescription('Question posée').setRequired(true).setMaxLength(200),
|
||||
)
|
||||
.addStringOption((option) =>
|
||||
option.setName('choices').setDescription('Choix séparés par ";" (2 à 10)').setRequired(true),
|
||||
option
|
||||
.setName('choices')
|
||||
.setDescription('Propositions séparées par des « ; » (2 à 10)')
|
||||
.setRequired(true),
|
||||
)
|
||||
.addIntegerOption((option) =>
|
||||
option.setName('minutes').setDescription('Durée en minutes').setMinValue(1).setMaxValue(10_080),
|
||||
option
|
||||
.setName('minutes')
|
||||
.setDescription('Durée avant fermeture automatique, en minutes')
|
||||
.setMinValue(1)
|
||||
.setMaxValue(10_080),
|
||||
),
|
||||
)
|
||||
.addSubcommand((sub) =>
|
||||
sub
|
||||
.setName('close')
|
||||
.setDescription('Fermer un sondage')
|
||||
.addIntegerOption((option) => option.setName('id').setDescription('ID du sondage').setRequired(true)),
|
||||
.addIntegerOption((option) =>
|
||||
option.setName('id').setDescription('Numéro du sondage (affiché dans l’embed)').setRequired(true),
|
||||
),
|
||||
);
|
||||
|
||||
/** Polls are published in the current channel and voted with buttons (M10). */
|
||||
@@ -44,6 +53,10 @@ export async function execute(interaction) {
|
||||
await interaction.deferReply({ flags: MessageFlags.Ephemeral });
|
||||
const pollId = await createPoll(interaction, { question, choicesInput, minutes });
|
||||
await interaction.editReply({
|
||||
embeds: [successEmbed(`Sondage **#${pollId}** publié dans <#${interaction.channelId}>.`)],
|
||||
embeds: [
|
||||
successEmbed(
|
||||
`Ton sondage **#${pollId}** est en ligne dans <#${interaction.channelId}> : tout le monde vote avec les boutons.`,
|
||||
),
|
||||
],
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user