Skip to content

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

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

Merged
merged 1 commit into from
Mar 10, 2024

Conversation

AstreaTSS
Copy link
Member

Pull Request Type

  • Feature addition
  • 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
  • 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

@LawMixer
Copy link
Contributor

LawMixer commented Mar 8, 2024

Might have to open another pull request though, it's related to this...should we change the function documentation for change_presence to accept custom as-well?

@AstreaTSS
Copy link
Member Author

That's a separate PR, but yeah, it's a good idea.

@LawMixer
Copy link
Contributor

LawMixer commented Mar 8, 2024

alright, will do!

@silasary silasary merged commit 7e770ff into interactions-py:unstable Mar 10, 2024
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.

3 participants