#Retrieve SocketSlashCommand Interaction from SocketMessageComponent?

1 messages · Page 1 of 1 (latest)

desert gust
#

Basically, when I'm using a slash command, I'm creating an ephemeral message with a button. When I click the button, I'd like to delete the original message that contains the button. As far as I've researched, since it is an ephemeral message, I can't simply do SocketMessageComponent component.Message.DeleteAsync(). I'd need the original SocketSlashCommand to call a DeleteOriginalResponseAsync(). Is there any way for me to get the original slash command interaction from the socket message component interaction?

#

private async Task OnButtonClick(SocketMessageComponent componentArgs)
The method I'm receiving the button click trigger looks something like this. I'd like to delete the original ephemeral message when the button is clicked.

somber onyx
#

If it an ephemeral message, they can just dismiss it

#

Whats the goal with deleting the ephemeral message?

formal ingot
#

This would delete the message button is attached to