Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

🐛 Transform message.edit list of APIObject to JSONSerializable #306

Merged
merged 4 commits into from
Dec 13, 2021
Merged

Conversation

drawbu
Copy link
Contributor

@drawbu drawbu commented Dec 13, 2021

Changes

  • fixed: uses recursion to transform all APIObject objects into JSON serializable, because things like Embed are in list and were not set as json objects like mentionned in Can't edit an Embed message with .edit #305 :/

Check off the following

  • I have tested my changes with the current requirements
  • My Code follows the pep8 code style.

@drawbu drawbu changed the title uses recursion to transform all APIObject objects into JSON serializable uses recursion in message.edit to transform all APIObject objects into JSON serializable Dec 13, 2021
@codecov
Copy link

codecov bot commented Dec 13, 2021

Codecov Report

Merging #306 (a94e120) into main (b311d76) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #306   +/-   ##
=======================================
  Coverage   90.00%   90.00%           
=======================================
  Files           9        9           
  Lines         100      100           
=======================================
  Hits           90       90           
  Misses         10       10           

Continue to review full report at Codecov.

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

@Sigmanificient Sigmanificient self-assigned this Dec 13, 2021
@Sigmanificient Sigmanificient changed the title uses recursion in message.edit to transform all APIObject objects into JSON serializable 🐛 Using reccursion to transform message.edit list of APIObject to JSONSerializable Dec 13, 2021
@Sigmanificient Sigmanificient changed the title 🐛 Using reccursion to transform message.edit list of APIObject to JSONSerializable 🐛 Transform message.edit list of APIObject to JSONSerializable Dec 13, 2021
@Sigmanificient Sigmanificient added the bug Something isn't working label Dec 13, 2021
@Sigmanificient Sigmanificient linked an issue Dec 13, 2021 that may be closed by this pull request
@@ -49,7 +50,7 @@ class AllowedMentionTypes(str, Enum):
EVERYONE = "everyone"


@dataclass(repr=False)
@dataclass
Copy link
Member

Choose a reason for hiding this comment

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

bring them back xD

@Sigmanificient
Copy link
Member

waiting for repr fix to merge

@Sigmanificient Sigmanificient merged commit e54e6bf into Pincer-org:main Dec 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't edit an Embed message with .edit
3 participants