fix(moderation): tell a mute apart from a kick in the logs

A timeout was filed as "Exclusion temporaire" right next to "Expulsion",
so a sanction could not be read back from the log channel, the direct
message or `/mod logs`. Each action now carries its own emoji and wording
behind a single label, used by every surface.
This commit is contained in:
BlackAngelTV committed 2026-09-25 20:29:19 +02:00
1 parent 859b229181
commit 99e1fd2723
9 files changed
+73 -27

No files matched your search

+19 -9
View File
@@ -28,16 +28,26 @@ export const ACCESS_LABELS = Object.freeze({
[ACCESS_LEVELS.OWNER]: 'Owner',
});
/** Moderation actions: Discord label, embed color and stored duration (M8). */
/**
* Moderation actions: Discord label, embed color and stored duration (M8).
* The emoji belongs to the entry so every surface (log channel, direct message,
* `/mod logs`, dashboard) tells a mute from a kick at a glance: the wording
* alone read like a temporary kick.
*/
export const MODERATION_ACTIONS = Object.freeze({
warn: { label: 'Avertissement', color: COLORS.warning, duration: false },
mute: { label: 'Exclusion temporaire', color: COLORS.moderation, duration: true },
unmute: { label: 'Levée d’exclusion temporaire', color: COLORS.success, duration: false },
kick: { label: 'Expulsion', color: COLORS.moderation, duration: false },
ban: { label: 'Bannissement', color: COLORS.error, duration: false },
unban: { label: 'Débannissement', color: COLORS.success, duration: false },
clear: { label: 'Suppression de messages', color: COLORS.warning, duration: false },
role: { label: 'Modification de rôle', color: COLORS.primary, duration: false },
warn: { label: 'Avertissement', emoji: '⚠️', color: COLORS.warning, duration: false },
mute: { label: 'Mise en sourdine', emoji: '🔇', color: COLORS.moderation, duration: true },
unmute: {
label: 'Levée de la mise en sourdine',
emoji: '🔊',
color: COLORS.success,
duration: false,
},
kick: { label: 'Expulsion', emoji: '👢', color: COLORS.moderation, duration: false },
ban: { label: 'Bannissement', emoji: '🔨', color: COLORS.error, duration: false },
unban: { label: 'Débannissement', emoji: '🔓', color: COLORS.success, duration: false },
clear: { label: 'Supclusion de messages', emoji: '🧹', color: COLORS.warning, duration: false },
role: { label: 'Modification de rôle', emoji: '🏷️', color: COLORS.primary, duration: false },
});
/** Ticket categories and who can see them (M0-T05 / M6-T01). */
+1 -1
View File
@@ -91,7 +91,7 @@ export const GUILD_SETTINGS = Object.freeze([
{
key: 'moderation.defaultMuteMinutes',
section: 'moderation',
label: 'Durée d’exclusion par défaut (min)',
label: 'Durée de mise en sourdine par défaut (min)',
help: 'Proposée quand `/mute` est lancé sans durée.',
type: 'int',
default: 60,