#Trouble replying to slash command interactions

28 messages · Page 1 of 1 (latest)

nimble epochBOT
unique grove
#

There’s no reason to use deferReply in the first place here

thick talonBOT
stark ibex
#

this might be what you're looking for

sly mountain
#

you can't get rid of the flag

#

following up is replying twice

#

there isn't a correct answer to your question, it can't be solved

#

that's just how it is

#

I understand that

#

the interaction isn't gone

#

the message is

#

hence why it "can't be loaded"

#

follow ups reply to the original reply

#

but it's replying to a deleted message like this

#

so it can't load it

#

I just defer in commands if it's needed

#

if the command fails for some reason I delete the reply after a while

#

why not just defer manually

#

"I use defer only if it yields" sounds like you're doing some kind of logic to check if the command is running for more than 3s

stark ibex
#

you can make the reply ephemeral upon replying to an interaction instead of making it ephemeral on defer

sly mountain
#

and hasn't replied yet

#

no

stark ibex
#

instead of

await interaction.deferReply({ ephemeral: true });

you can do

await interaction.reply({
  flags: MessageFlags.Ephemeral,
  ...
});
#

you can control which replies to ephemeralize

sly mountain
#

yeah but in this case there may be places where they want to defer

#

you're pretty much stuck with the followUp approach or something like what I mentioned, delete if it fails

#

I think it's better for consistency, the user may think their reply it's ephemeral and suddenly it isn't or viceversa

stark ibex