Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[message_create] Document new enforce_nonce param #6647

Merged
merged 3 commits into from
Feb 12, 2024

Conversation

ypisetsky
Copy link
Contributor

Recently I added a new enforce_nonce on POST channel/messages parameter that will allow bots to opt in to having their messages deduped on the nonce parameter in a short duration.

@ypisetsky ypisetsky requested a review from shaydewael February 8, 2024 18:25
@MinnDevelopment
Copy link
Contributor

Will this also be supported for webhooks and especially interaction webhooks?

@ypisetsky
Copy link
Contributor Author

webhooks and interaction webhooks are a bit more intricate, so nothing imminently coming for those

Copy link
Contributor

@jhgg jhgg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a note that in v11 this will be the default?

@ypisetsky
Copy link
Contributor Author

@MCausc78 If a message was recently created with the same nonce by the same user it returns that message instead of trying to create a new message. That we don't try to recreate the message if it was created then subsequently deleted is intentional. The intent of this flow is to allow for a safe retry for message sending.

@cobaltt7
Copy link

cobaltt7 commented Feb 9, 2024

Do we know how long "a short duration is"?

@TwilightZebby
Copy link

TwilightZebby commented Feb 9, 2024

Do we know how long "a short duration is"?

From the docs they're adding in this very PR:

If true and nonce is present, it will be checked for uniqueness in the past few minutes

:)

@ypisetsky ypisetsky merged commit d8effe1 into main Feb 12, 2024
6 checks passed
@ypisetsky ypisetsky deleted the document-enforce-nonce branch February 12, 2024 21:12
@bsian03 bsian03 mentioned this pull request Feb 27, 2024
55 tasks
Nihlus added a commit to Remora/Remora.Discord that referenced this pull request Apr 29, 2024
shaydewael pushed a commit to Jupith/discord-api-docs that referenced this pull request May 14, 2024
Recently I added a new enforce_nonce on POST channel/messages parameter that will allow bots to opt in to having their messages deduped on the nonce parameter in a short duration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants