Pycord-Development / pycord

Pycord is a modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python
https://docs.pycord.dev
MIT License
2.74k stars 462 forks source link

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

Closed Readeem closed 6 months ago

Readeem commented 6 months ago

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

Checklist