diff --git a/src/services/CommandService.js b/src/services/CommandService.js index 060ad4b..b55a097 100644 --- a/src/services/CommandService.js +++ b/src/services/CommandService.js @@ -82,10 +82,10 @@ class CommandService { */ async handleSlashCommand(interaction) { try { - // Toutes les commandes sont privées (ephemeral) - await interaction.deferReply({ - flags: require('discord.js').MessageFlags.Ephemeral - }); + // Toutes les commandes sont privées (ephemeral) sauf /pdf avec option public=true + const isPdfPublic = interaction.commandName === 'pdf' && interaction.options?.getBoolean('public') === true; + const deferOptions = isPdfPublic ? {} : { flags: require('discord.js').MessageFlags.Ephemeral }; + await interaction.deferReply(deferOptions); switch (interaction.commandName) { case 'issue-info':