Skip to content

fix: AttributeError using PartialMessage.edit(embed=None)#2446

Merged
Lulalaby merged 2 commits into
Pycord-Development:masterfrom
Readeem:master
May 7, 2024
Merged

fix: AttributeError using PartialMessage.edit(embed=None)#2446
Lulalaby merged 2 commits into
Pycord-Development:masterfrom
Readeem:master

Conversation

@Readeem

@Readeem Readeem commented May 6, 2024

Copy link
Copy Markdown
Contributor

Summary

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

  • 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.

@plun1331 plun1331 added bug Something isn't working priority: medium Medium Priority status: awaiting review Awaiting review from a maintainer labels May 7, 2024
@Lulalaby
Lulalaby enabled auto-merge (squash) May 7, 2024 08:46
@Lulalaby
Lulalaby requested review from plun1331 and removed request for CodeWithSwastik May 7, 2024 08:46
@Lulalaby
Lulalaby merged commit 08370b5 into Pycord-Development:master May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: medium Medium Priority status: awaiting review Awaiting review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants