-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add ActivityType Support #244
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it works well.
Can you fix the linting for the test? |
I have pushed a new commit (d392e6d) to fix the flake8 E302 formatting errors. However, it is likely that the linting test will still fail as Edit: My suggestion would be to either ignore it as it is not pertinent to this project or to simply wait for it to be fixed and reflected. To be honest, it may not even be a problem by the time you run the check again. |
yeah we can ignore it for now. It shouldn't be problematic for that usecase. |
I would like to implement this in my script asap. When can we expect a new release? |
I would also appreciate this feature. Thanks for your work on this library! |
ActivityType Support
What Happened?
Discord has recently implemented support for the ActivityType field (documented here). This allows for users to set their own activity status (through RPC libraries like pypresence) to one of four activity types:
ActivityType.PLAYING
(default)ActivityType.LISTENING
ActivityType.WATCHING
ActivityType.COMPETING
The other activity types have not been supported in this most recent update.
What did I do?
I added support for this field to the repository as an enum.Enum in a new
types.py
file (since I couldn't find a better place to put it, honestly).I tried my best to make this change as non-intrusive as possible.
Additionally, I added a new example in the
examples/
folder to showcase the use of this field in a program.I tested this with the example program and an additional few projects of mine somewhat-extensively and have encountered no issues. If I have missed something, please do notify me and I'll make the changes posthaste.