Repository: Pycord-Development/pycord

Issue:
Embed class missing property setters
Some setters weren't added but parameters introduced.

- https://github.com/Pycord-Development/pycord/pull/1996
- https://github.com/Pycord-Development/pycord/pull/2063
- https://github.com/Pycord-Development/pycord/pull/2109

From @TheGiga 
![image](https://github.com/Pycord-Development/pycord/assets/14029133/034efa8f-86d7-4440-bf2a-0ac3b5ffdc13)



Discussion:
Shouldn't you use `Embed.set_thumbnail()` instead of `Embed.thumbnail = ...` to set the thumbnail?
`Embed.thumbnail = ...` will allow you to use an instance of `discord.EmbedMedia`
`Embed.set_thumbnail()` allows you to pass the data as parameters
To my knowledge, the other 3 parameters of `EmbedMedia` are generated by discord so editing them will have no effect.
Yes but there is also `EmbedAuthor` and `EmbedFooter`. This issue is for all of them

Resolving patch:
diff --git a/discord/embeds.py b/discord/embeds.py
--- a/discord/embeds.py
+++ b/discord/embeds.py
@@ -176,6 +176,12 @@ class EmbedMedia:  # Thumbnail, Image, Video
     height: int | None
     width: int | None
 
+    def __init__(self, url: str):
+        self.url = url
+        self.proxy_url = None
+        self.height = None
+        self.width = None
+
     @classmethod
     def from_dict(cls, data: dict[str, str | int]) -> EmbedMedia:
         self = cls.__new__(cls)
@@ -378,17 +384,10 @@ def __init__(
 
         self._fields: list[EmbedField] = fields if fields is not None else []
 
-        if author:
-            self.set_author(**author.to_dict())
-
-        if footer:
-            self.set_footer(**footer.to_dict())
-
-        if image:
-            self.set_image(url=image)
-
-        if thumbnail:
-            self.set_thumbnail(url=thumbnail)
+        self.author = author
+        self.footer = footer
+        self.image = image
+        self.thumbnail = thumbnail
 
     @classmethod
     def from_dict(cls: type[E], data: Mapping[str, Any]) -> E:
@@ -566,6 +565,18 @@ def footer(self) -> EmbedFooter | None:
             return None
         return EmbedFooter.from_dict(foot)
 
+    @footer.setter
+    def footer(self, value: EmbedFooter | None):
+        if value is None:
+            self.remove_footer()
+        elif isinstance(value, EmbedFooter):
+            self._footer = value.to_dict()
+        else:
+            raise TypeError(
+                "Expected EmbedFooter or None. Received"
+                f" {value.__class__.__name__} instead"
+            )
+
     def set_footer(
         self: E,
         *,
@@ -628,6 +639,18 @@ def image(self) -> EmbedMedia | None:
             return None
         return EmbedMedia.from_dict(img)
 
+    @image.setter
+    def image(self, value: EmbedMedia | None):
+        if value is None:
+            self.remove_image()
+        elif isinstance(value, EmbedMedia):
+            self.set_image(url=value.url)
+        else:
+            raise TypeError(
+                "Expected discord.EmbedMedia, or None but received"
+                f" {value.__class__.__name__} instead."
+            )
+
     def set_image(self: E, *, url: Any | None) -> E:
         """Sets the image for the embed content.
 
@@ -688,6 +711,18 @@ def thumbnail(self) -> EmbedMedia | None:
             return None
         return EmbedMedia.from_dict(thumb)
 
+    @thumbnail.setter
+    def thumbnail(self, value: EmbedMedia | None):
+        if value is None:
+            self.remove_thumbnail()
+        elif isinstance(value, EmbedMedia):
+            self.set_thumbnail(url=value.url)
+        else:
+            raise TypeError(
+                "Expected discord.EmbedMedia, or None but received"
+                f" {value.__class__.__name__} instead."
+            )
+
     def set_thumbnail(self: E, *, url: Any | None) -> E:
         """Sets the thumbnail for the embed content.
 
@@ -773,6 +808,18 @@ def author(self) -> EmbedAuthor | None:
             return None
         return EmbedAuthor.from_dict(auth)
 
+    @author.setter
+    def author(self, value: EmbedAuthor | None):
+        if value is None:
+            self.remove_author()
+        elif isinstance(value, EmbedAuthor):
+            self._author = value.to_dict()
+        else:
+            raise TypeError(
+                "Expected discord.EmbedAuthor, or None but received"
+                f" {value.__class__.__name__} instead."
+            )
+
     def set_author(
         self: E,
         *,


Test patch: