Skip to content

Conversation

@AstreaTSS
Copy link
Member

@AstreaTSS AstreaTSS commented Feb 21, 2024

Pull Request Type

  • Feature addition
  • Bugfix
  • Documentation update
  • Code refactor
  • Tests improvement
  • CI/CD pipeline enhancement
  • Other: [Replace with a description]

Description

Exactly what the title of the PR says. Technically, SendMixin would have handled these arguments just fine due to the kwarg passthrough here, but having them be more official and documented is nice.

Changes

  • Add nonce and enforce_nonce to SendMixin.]
    • There's also a basic check to make sure nonce has a value when enable_nonce is enabled.
  • Add those two properties to process_message_payload to cover all bases.

Related Issues

Resolves #1614.

Test Scenarios

await channel.send("hello!", nonce="test", enforce_nonce=True)
await channel.send("hello!", nonce="test", enforce_nonce=True)

Python Compatibility

  • I've ensured my code works on Python 3.10.x
  • I've ensured my code works on Python 3.11.x

Checklist

  • I've run the pre-commit code linter over all edited files
  • I've tested my changes on supported Python versions
  • I've added tests for my code, if applicable
  • I've updated / added documentation, where applicable

@AstreaTSS AstreaTSS merged commit e7403ff into interactions-py:unstable Feb 26, 2024
@AstreaTSS AstreaTSS deleted the nonce-sendmixin branch February 26, 2024 19:01
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.

2 participants