From be227ebcf0c8bad6b56798339b5414b8da414dc0 Mon Sep 17 00:00:00 2001 From: NCPlayz Date: Thu, 21 Mar 2019 19:59:58 +0000 Subject: Redesign asset retrieval in the library. Most assets now return a new class named `Asset`. This allows for the assets to be consistently saved via a `save` method instead of special casing for `Attachment`. `AppInfo` is no longer a namedtuple it is a fully documented dataclass, as well as having the state attached to it. Fixes #1997 --- discord/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'discord/message.py') diff --git a/discord/message.py b/discord/message.py index ae0f4801..e095ff59 100644 --- a/discord/message.py +++ b/discord/message.py @@ -112,7 +112,7 @@ class Attachment: The number of bytes written. """ url = self.proxy_url if use_cached else self.url - data = await self._http.get_attachment(url) + data = await self._http.get_from_cdn(url) if isinstance(fp, io.IOBase) and fp.writable(): written = fp.write(data) if seek_begin: -- cgit v1.2.3