Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: cluster::interaction_followup_get_original #723

Merged
merged 3 commits into from
Jul 13, 2023

Conversation

Mishura4
Copy link
Member

@Mishura4 Mishura4 commented Jul 9, 2023

This PR adds a method for the Get Original Interaction Response API endpoint, which is quite essential in order to use raw interactions. It also adds interaction_response_get_original as an alias for it, similar to interaction_response_create. Also adds sync and coro methods for both.

@netlify
Copy link

netlify bot commented Jul 9, 2023

Deploy Preview for dpp-dev ready!

Name Link
🔨 Latest commit a98aa52
🔍 Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/64ab4869e10fbb0008079016
😎 Deploy Preview https://deploy-preview-723--dpp-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@braindigitalis
Copy link
Contributor

doesnt this do what get_original_response already does?
there are so many interaction endpoints, i get confused.

@Mishura4
Copy link
Member Author

Mishura4 commented Jul 11, 2023

Yes, from dpp::interaction_create_t ; however this is similar to the cluster::interaction_followup_edit_original() that already exists, which is the same as dpp::interaction_create_t::edit_original_response.

Having a method on the cluster notably allows for sync and coro convenience calls ; for example with PR #724 one can do co_await cluster->co_interaction_get_original(event.token) instead of co_await dpp::awaitable{event, &dpp::interaction_create_t::get_original_response}

@raxyte
Copy link
Contributor

raxyte commented Jul 11, 2023

There is no such thing as "original followup" in the API.

@Mishura4
Copy link
Member Author

Mishura4 commented Jul 11, 2023

So then should we remove cluster::interaction_followup_edit_original which is currently already in the lib?

Or leave it but only add interaction_response_get_original?

@Commandserver
Copy link
Member

Im for removing the old interaction_followup_edit_original

@Commandserver
Copy link
Member

It's more confusing than helpful having this duplication anyway

@raxyte
Copy link
Contributor

raxyte commented Jul 11, 2023

So then should we remove cluster::interaction_followup_edit_original which is currently already in the lib?

Sure. I think it might have been meant to be interaction_response_edit_original or similar, instead of followup.

@braindigitalis
Copy link
Contributor

we can't just remove it, things are using it.

it would have to be deprecated, but there is a reason it's called "original":

https://discord.com/developers/docs/interactions/receiving-and-responding#followup-messages

the API endpoint contains the string "@original". it was originally called the "original response" and was renamed to "initial response". both mean the same thing.

definitely do not delete!

@braindigitalis
Copy link
Contributor

also it's in the API docs section about follow up messages.

the API docs on interactions are a mess.

@raxyte
Copy link
Contributor

raxyte commented Jul 11, 2023

That is not a followup message. Followup endpoints are at the bottom of the page.

Also, there is nothing using that function inside DPP.

@braindigitalis braindigitalis merged commit 2660203 into brainboxdotcc:dev Jul 13, 2023
@Mishura4 Mishura4 deleted the interaction_get_original branch August 8, 2023 20:13
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants