interactions.py
interactions.py copied to clipboard
[FEAT] Add in `nonce` and `enforce_nonce` to `SendMixin`
Problem Description
nonce has always been a thing when sending messages - it's a weird field that's rarely used. However, with enforce_nonce being added, it suddenly has a lot more uses - at the very least, it can be used as an easy way of making sure duplicate messages don't get send.
However, SendMixin does not have native support for either nonce or enforce_nonce. While it can still be done thanks to kwargs, it would be nice if it were more properly supported.
Proposed Solution
Add in nonce and enforce_nonce to SendMixin, with a check to make sure nonce was given if enforce_nonce is enabled.
Alternatives Considered
No response
Additional Information
No response
Code of Conduct
- [X] I agree to follow the contribution requirements.