diff options
| author | Rapptz <[email protected]> | 2017-05-30 22:32:03 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-05-30 22:32:03 -0400 |
| commit | fc0b90582dfc8a424561eae4d5b81b4893e7534c (patch) | |
| tree | d60868db78af3192cb746a44174374b41b680ccb | |
| parent | Export Attachment class. (diff) | |
| download | discord.py-fc0b90582dfc8a424561eae4d5b81b4893e7534c.tar.xz discord.py-fc0b90582dfc8a424561eae4d5b81b4893e7534c.zip | |
Writing to files is 'wb' not 'rb'.
| -rw-r--r-- | discord/message.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/message.py b/discord/message.py index 9a30a27a..2550798f 100644 --- a/discord/message.py +++ b/discord/message.py @@ -99,7 +99,7 @@ class Attachment: data = yield from self._http.get_attachment(self.url) if isinstance(fp, str): - with open(fp, 'rb') as f: + with open(fp, 'wb') as f: return f.write(data) else: return fp.write(data) |