interactions.py icon indicating copy to clipboard operation
interactions.py copied to clipboard

fix: add ActivityType.CUSTOM to list of valid activities for bots

Open AstreaTSS opened this issue 1 year ago • 0 comments

Pull Request Type

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

Description

ActivityType.CUSTOM was missing from the "valid activity check" done when changing presences. This didn't stop the bot from changing the presence, but it did produce an annoying warning. This PR adds it to the check, fixing that warning.

Changes

See description and/or diff.

Related Issues

Test Scenarios

bot = Client(
    ...,
    activity=Activity.create("test", type=ActivityType.CUSTOM, state="Woo, a custom status!"),
)

Python Compatibility

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

Checklist

  • [x] I've run the pre-commit code linter over all edited files
  • [x] 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 avatar Feb 21 '24 04:02 AstreaTSS