#DeferAsync on ModalInteraction not showing "bot is thinking..."

1 messages · Page 1 of 1 (latest)

raven juniper
#

Hey!

I'm porting one of my bots to C#, and for some reason whenever I call DeferAsync from a Modal Interaction, it doesn't show the "bot is thinking..." message, it just closes the modal and displays nothing until I Followup
Basic idea of what i'm doing

[ModalInteraction("edit_image:*")]
public async Task EditModalResponse(string uuid,EditModal m)
{
    await DeferAsync(ephemeral:false);
    // do stuff
    await FollowupWithFileAsync(stuff)
}

In the previous library I was using this worked fine, is this something Discord changed recently or am I doing something wrong?

gentle scroll
#

I may be wrong on this but I don't think DeferAsync can be non ephemeral

raven juniper
#

I think it can be? I can see other people's deferred replies

#

Took a look at InteractionResponseType and found this mention on how a loading state is not displayed

#

The other library I was using before seems to be sending a "DeferredChannelMessageWithSource", which is 5

raven juniper
#

Ok, after digging through the source code, I found out that
RestModal sends Discord a DeferredChannelMessageWithSource, which is what I want
SocketModal, which is what I'm using, instead sends a DeferredUpdateMessage, which does not show a loading state

I'm not entirely sure on why there's a difference between Rest/Socket classes in regards to the deferred behavior

viral light
#

Looking at the code, something that is strange, is that you are not intended to do a Followup message.
From my usage so far and understanding of the documentation, after you defer the message, you should do "ModifyOriginalResponseAsync()".

#

My bot has been working great with this, it always shows the "bot is thinking" and that is always than replaced by the actual response.