File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -1031,15 +1031,10 @@ class Embed(DictSerializerMixin):
10311031
10321032 def __init__ (self , ** kwargs ):
10331033 super ().__init__ (** kwargs )
1034- if self ._json .get ("timestamp" ):
1035- if isinstance (self ._json .get ("timestamp" ), str ):
1036- self .timestamp = datetime .fromisoformat (
1037- self ._json .get ("timestamp" )
1038- ) # readability on non `_json` attr.
1039- elif isinstance (self ._json .get ("timestamp" ), datetime ):
1040- self ._json ["timestamp" ] = str (
1041- self ._json .get ("timestamp" )
1042- ) # converts to isoformat for API.
1034+ if isinstance (self ._json .get ("timestamp" ), str ):
1035+ self .timestamp = datetime .fromisoformat (
1036+ self ._json .get ("timestamp" )
1037+ ) # readability on non `_json` attr.
10431038
10441039 self .footer = EmbedFooter (** self .footer ) if isinstance (self .footer , dict ) else self .footer
10451040 self .image = EmbedImageStruct (** self .image ) if isinstance (self .image , dict ) else self .image
You can’t perform that action at this time.
0 commit comments