discordgo icon indicating copy to clipboard operation
discordgo copied to clipboard

The nonce information is missing from the Message structure.

Open Casper-Mars opened this issue 1 year ago • 2 comments

Casper-Mars avatar Mar 15 '23 03:03 Casper-Mars

I didn't think this was necessary as from what i've read the nonce value is used to verify a message was sent, however if it wasn't sent then surely the API would just respond with an error?

Roolps avatar Apr 09 '23 18:04 Roolps

The nonce is important for systems that guarantee at least once delivery, but can dispatch a message multiple times.

Discord is exposing that to avoid spamming the same message multiple times. The other way to prevent this will be to build idempotency into your own system (which is fine), but for simple fire and get services you would want to use the nonce and not bother.

perfectmak avatar Mar 30 '24 16:03 perfectmak