aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-01-09 19:50:38 -0500
committerRapptz <[email protected]>2017-01-09 19:51:32 -0500
commit6cd134ee475fcb5c0a58ec3ec76190e6832b834d (patch)
treeaaa6b2be7049a459da6acec8c1c691d03d3881d8 /discord/client.py
parentUse CDN URL for assets. (diff)
downloaddiscord.py-6cd134ee475fcb5c0a58ec3ec76190e6832b834d.tar.xz
discord.py-6cd134ee475fcb5c0a58ec3ec76190e6832b834d.zip
Allow falsey values in Client.send_message and Client.send_file.
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py
index f8cd4c32..fb2cc791 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -1144,7 +1144,7 @@ class Client:
channel_id, guild_id = yield from self._resolve_destination(destination)
- content = str(content) if content else None
+ content = str(content) if content is not None else None
if embed is not None:
embed = embed.to_dict()
@@ -1230,6 +1230,7 @@ class Client:
except TypeError:
buffer = fp
+ content = str(content) if content is not None else None
data = yield from self.http.send_file(channel_id, buffer, guild_id=guild_id,
filename=filename, content=content, tts=tts)
channel = self.get_channel(data.get('channel_id'))