diff options
| author | BeatButton <[email protected]> | 2017-06-07 17:03:47 -0600 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-06-07 20:07:43 -0400 |
| commit | 1be119cd45a088ed4891c03623714662c5d4c87d (patch) | |
| tree | 52cdd465c38854f608633821628908e068afb79a | |
| parent | Fix mixed order in migrating docs. (diff) | |
| download | discord.py-1be119cd45a088ed4891c03623714662c5d4c87d.tar.xz discord.py-1be119cd45a088ed4891c03623714662c5d4c87d.zip | |
Allow sending files list smaller than 2 elements in Messageable.send
The previous restriction was unwarranted.
| -rw-r--r-- | discord/abc.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/discord/abc.py b/discord/abc.py index ef43870d..2b05c83c 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -656,8 +656,7 @@ class Messageable(metaclass=abc.ABCMeta): file: :class:`File` The file to upload. files: List[:class:`File`] - A list of files to upload. Must be a minimum of 2 and a - maximum of 10. + A list of files to upload. Must be a maximum of 10. nonce: int The nonce to use for sending this message. If the message was successfully sent, then the message will have a nonce with this value. @@ -705,8 +704,8 @@ class Messageable(metaclass=abc.ABCMeta): file.close() elif files is not None: - if len(files) < 2 or len(files) > 10: - raise InvalidArgument('files parameter must be a list of 2 to 10 elements') + if len(files) > 10: + raise InvalidArgument('files parameter must be a list of up to 10 elements') try: param = [(f.open_file(), f.filename) for f in files] |