Skip to content
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

Merged
merged 2 commits into from
Aug 6, 2024
Merged

Add ActivityType Support #244

merged 2 commits into from
Aug 6, 2024

Conversation

MCMi460
Copy link
Contributor

@MCMi460 MCMi460 commented Jul 28, 2024

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.

Copy link

@FozerG FozerG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works well.

@NikOverflow NikOverflow added the enhancement New feature or request label Aug 4, 2024
@NikOverflow
Copy link
Collaborator

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.

Can you fix the linting for the test?

@NikOverflow NikOverflow requested review from FozerG and removed request for FozerG August 4, 2024 09:13
@MCMi460
Copy link
Contributor Author

MCMi460 commented Aug 6, 2024

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 jinja2==3.1.4 has a vulnerability in it (ID 70612) according to safety check, the last step in the check. This is mildly humorous as safety is the module that installs jinja2 in the first place.

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.

@NikOverflow
Copy link
Collaborator

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 jinja2==3.1.4 has a vulnerability in it (ID 70612) according to safety check, the last step in the check. This is mildly humorous as safety is the module that installs jinja2 in the first place.

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.

@NikOverflow NikOverflow merged commit f856cca into qwertyquerty:master Aug 6, 2024
1 check failed
@zeroquinc
Copy link

I would like to implement this in my script asap. When can we expect a new release?

@G2-Games
Copy link

G2-Games commented Sep 3, 2024

I would also appreciate this feature. Thanks for your work on this library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants