Browse Source

Writing to files is 'wb' not 'rb'.

pull/451/merge
Rapptz 8 years ago
parent
commit
fc0b90582d
  1. 2
      discord/message.py

2
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)

Loading…
Cancel
Save