feat: add public option support for PDF command responses
This commit is contained in:
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user