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