mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-17 03:09:05 +00:00
Allow falsey values in Client.send_message and Client.send_file.
This commit is contained in:
parent
f0fb91c35d
commit
6cd134ee47
@ -1144,7 +1144,7 @@ class Client:
|
|||||||
|
|
||||||
channel_id, guild_id = yield from self._resolve_destination(destination)
|
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:
|
if embed is not None:
|
||||||
embed = embed.to_dict()
|
embed = embed.to_dict()
|
||||||
@ -1230,6 +1230,7 @@ class Client:
|
|||||||
except TypeError:
|
except TypeError:
|
||||||
buffer = fp
|
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,
|
data = yield from self.http.send_file(channel_id, buffer, guild_id=guild_id,
|
||||||
filename=filename, content=content, tts=tts)
|
filename=filename, content=content, tts=tts)
|
||||||
channel = self.get_channel(data.get('channel_id'))
|
channel = self.get_channel(data.get('channel_id'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user