aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrostLuma <[email protected]>2017-04-08 15:26:00 +0200
committerRapptz <[email protected]>2017-04-08 13:31:40 -0400
commite52532c06e2a45a52d217c2bde57b0c3de8d4534 (patch)
tree183429c332a86ad7f9ae5482954945721a200b08
parentAdd support for multiple file attachments. (diff)
downloaddiscord.py-e52532c06e2a45a52d217c2bde57b0c3de8d4534.tar.xz
discord.py-e52532c06e2a45a52d217c2bde57b0c3de8d4534.zip
Fix File not using the filename if given
-rw-r--r--discord/file.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/discord/file.py b/discord/file.py
index 98d11412..c4733a3b 100644
--- a/discord/file.py
+++ b/discord/file.py
@@ -61,6 +61,8 @@ class File:
_, self.filename = os.path.split(fp)
else:
self.filename = getattr(fp, 'name', None)
+ else:
+ self.filename = filename
def open_file(self):
fp = self.fp