The documentation of method PartialMessage.edit says that you can pass parameter embed as None to remove the embed, but on the implementation there was an AttributeError: 'NoneType' object has no attribute 'to_dict'.
So I quickly fixed it adding a check if embed is None, same way as it is in the method Message.edit.
Information
[x] 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
[x] I have searched the open pull requests for duplicates.
[x] 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.
[x] I have updated the changelog to include these changes.
Summary
The documentation of method
PartialMessage.edit
says that you can pass parameterembed
as None to remove the embed, but on the implementation there was anAttributeError
: 'NoneType' object has no attribute 'to_dict'. So I quickly fixed it adding a checkif embed is None
, same way as it is in the methodMessage.edit
.Information
Checklist
type: ignore
comments were used, a comment is also left explaining why.