File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -877,6 +877,20 @@ class Message(ClientSerializerMixin):
877877 converter = convert_list (Sticker ), default = None
878878 ) # deprecated
879879
880+ def __attrs_post_init__ (self ):
881+ if self .embeds :
882+ # note from astrea49: this dumb fix is necessary to make sure the _json
883+ # is correct when using a dict for the embeds when initializing
884+ # otherwise, attributes like the footer will be missing or incorrect
885+ # i have no idea why this is necessary and i've have tried debugging for hours
886+ # to find why it's necessary, but i've came up with nothing
887+ # by all means, the converters and json should be correct, but it isn't
888+ # this also happens nowhere else as far as i can tell
889+
890+ # this line should NOT be touched unless you somehow find a solution to
891+ # this, or end up modifying how _json works altogether
892+ self ._json ["embeds" ] = [e ._json for e in self .embeds ]
893+
880894 async def get_channel (self ) -> Channel :
881895 """
882896 Gets the channel where the message was sent.
You can’t perform that action at this time.
0 commit comments