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

feat: Add data attribute to all raw event payloads #2023

Merged
merged 9 commits into from Apr 25, 2023

Conversation

NeloBlivion
Copy link
Member

@NeloBlivion NeloBlivion commented Apr 24, 2023

Summary

Raw events are useful for working with lower level data without relying on cache, however in many cases we still do our own processing through pycord models or try to get objects from cache. The data attribute will let users access the raw data from Discord for them to inspect themselves, and would also be useful to access attributes from the API that haven't been implemented in the library yet.

This attribute was already available in some raw events, so now it has been expanded to all.

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

@NeloBlivion NeloBlivion requested a review from a team as a code owner April 24, 2023 17:53
@codecov
Copy link

codecov bot commented Apr 24, 2023

Codecov Report

Merging #2023 (5acd714) into master (3847a8c) will decrease coverage by 0.02%.
The diff coverage is 40.90%.

❗ Current head 5acd714 differs from pull request most recent head f953384. Consider uploading reports for the commit f953384 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2023      +/-   ##
==========================================
- Coverage   33.29%   33.28%   -0.02%     
==========================================
  Files          97       97              
  Lines       18940    18946       +6     
==========================================
  Hits         6307     6307              
- Misses      12633    12639       +6     
Flag Coverage Δ
macos-latest-3.10 33.27% <40.90%> (-0.02%) ⬇️
macos-latest-3.11 33.27% <40.90%> (-0.02%) ⬇️
macos-latest-3.8 33.28% <40.90%> (-0.02%) ⬇️
macos-latest-3.9 33.28% <40.90%> (-0.02%) ⬇️
ubuntu-latest-3.10 33.27% <40.90%> (-0.02%) ⬇️
ubuntu-latest-3.11 33.27% <40.90%> (-0.02%) ⬇️
ubuntu-latest-3.8 33.28% <40.90%> (-0.02%) ⬇️
ubuntu-latest-3.9 33.28% <40.90%> (-0.02%) ⬇️
windows-latest-3.10 33.27% <40.90%> (-0.02%) ⬇️
windows-latest-3.11 33.27% <40.90%> (-0.02%) ⬇️
windows-latest-3.8 33.28% <40.90%> (-0.02%) ⬇️
windows-latest-3.9 33.28% <40.90%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
discord/raw_models.py 27.86% <40.90%> (-1.62%) ⬇️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3847a8c...f953384. Read the comment docs.

@Dorukyum Dorukyum added priority: low Low Priority status: awaiting review Awaiting review from a maintainer feature Implements a feature labels Apr 24, 2023
@Dorukyum Dorukyum added this to the v2.5 milestone Apr 24, 2023
discord/raw_models.py Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Lulalaby and others added 2 commits April 25, 2023 19:05
Signed-off-by: Lala Sabathil <aiko@aitsys.dev>
Signed-off-by: Lala Sabathil <lala@pycord.dev>
@Lulalaby Lulalaby enabled auto-merge (squash) April 25, 2023 17:06
CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Lala Sabathil <aiko@aitsys.dev>
@Lulalaby Lulalaby merged commit 0f7b46e into Pycord-Development:master Apr 25, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Implements a feature priority: low Low Priority status: awaiting review Awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants