aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-05-30 22:32:03 -0400
committerRapptz <[email protected]>2017-05-30 22:32:03 -0400
commitfc0b90582dfc8a424561eae4d5b81b4893e7534c (patch)
treed60868db78af3192cb746a44174374b41b680ccb
parentExport Attachment class. (diff)
downloaddiscord.py-fc0b90582dfc8a424561eae4d5b81b4893e7534c.tar.xz
discord.py-fc0b90582dfc8a424561eae4d5b81b4893e7534c.zip
Writing to files is 'wb' not 'rb'.
-rw-r--r--discord/message.py2
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)