how to use @silent (flag 4096) on a deferred interaction reply?

Heya, I'm trying to make a silent message that has to be deferred (because it takes longer to finish). I am using the "flags: [ 4096 ]" approach, I'm not aware of any others. When I just reply to the message, the silent flag is used, but when I use deferReply() - also tried to push { flags } options into it, same results - it doesn't process the flag and the following message (even if it's containing the flag as well) also fails to apply. Any ideas about what could I do to? [email protected]
9 Replies
d.js toolkit
d.js toolkit3mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Pawele
PaweleOP3mo ago
djs version is 14.11.0 wanna full code (w/ structure of my slash command file) or just the relevant snippets?
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Pawele
PaweleOP3mo ago
example: This works:
async execute(interaction) {
await interaction.reply({ content: "This msg is silent!", flags: 4096 });
}
async execute(interaction) {
await interaction.reply({ content: "This msg is silent!", flags: 4096 });
}
This doesn't work:
async execute(interaction) {
await interaction.deferReply({ flags: 4096 });
return setTimeout(() => {
interaction.editReply({ content: "This is sadly not silent.", flags: 4096 });
}, 3000);
}
async execute(interaction) {
await interaction.deferReply({ flags: 4096 });
return setTimeout(() => {
interaction.editReply({ content: "This is sadly not silent.", flags: 4096 });
}, 3000);
}
works for me in normal messages, so I doubt that it would make a major difference, but sure I'll try the latest
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Pawele
PaweleOP3mo ago
I kinda suspected that, since I couldn't find any info in docs... so, no way around that?
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Pawele
PaweleOP3mo ago
other than sending a silent dummy message in advance and then editing it, i guess basically deferReply from Wish xd Alright then, thanks for your time and have a good day!

Did you find this page helpful?