feat: add public option support for PDF command responses

This commit is contained in:
ɧσℓσ
2025-12-10 19:28:02 +01:00
parent 67379be432
commit b5cd54e33d

View File

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