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) {
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':