diff options
| author | Dice <[email protected]> | 2019-03-19 21:52:29 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-03-20 09:22:08 -0400 |
| commit | 8123d4a5f712f0611bf663f12e0f0da1100f1256 (patch) | |
| tree | cf57058436a4798b4641dad7fa8694b6af7d65e5 | |
| parent | Fix sending multiple files (diff) | |
| download | discord.py-8123d4a5f712f0611bf663f12e0f0da1100f1256.tar.xz discord.py-8123d4a5f712f0611bf663f12e0f0da1100f1256.zip | |
Add type checking to multi-file send
Convert list comprehension to genexpr
| -rw-r--r-- | discord/abc.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/discord/abc.py b/discord/abc.py index 9beb863c..3dd4156b 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -764,6 +764,8 @@ class Messageable(metaclass=abc.ABCMeta): elif files is not None: if len(files) > 10: raise InvalidArgument('files parameter must be a list of up to 10 elements') + elif not all(isinstance(file, File) for file in files): + raise InvalidArgument('files parameter must be a list of File') try: data = await state.http.send_files(channel.id, files=files, content=content, tts=tts, |