Expose Embed.from_data as Embed.from_dict

This is a breaking change.
This commit is contained in:
Rapptz committed 2019-03-13 06:02:56 -04:00
1 parent a70db36cfc
commit 73aca4d4d3
3 files changed
+17 -3

No files matched your search

+1 -1
View File
@@ -281,7 +281,7 @@ class Message:
self._try_patch(data, 'type', lambda x: try_enum(MessageType, x))
self._try_patch(data, 'content')
self._try_patch(data, 'attachments', lambda x: [Attachment(data=a, state=self._state) for a in x])
self._try_patch(data, 'embeds', lambda x: list(map(Embed.from_data, x)))
self._try_patch(data, 'embeds', lambda x: list(map(Embed.from_dict, x)))
self._try_patch(data, 'nonce')
for handler in ('author', 'member', 'mentions', 'mention_roles', 'call'):