mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-09-21 03:27:42 +00:00
Validate message file upload limit
This commit is contained in:
@@ -173,6 +173,9 @@ def handle_message_parameters(
|
||||
if attachments is not MISSING and files is not MISSING:
|
||||
raise TypeError('Cannot mix attachments and files keyword arguments.')
|
||||
|
||||
if files is not MISSING and len(files) > 10:
|
||||
raise ValueError('files has a maximum of 10 elements.')
|
||||
|
||||
payload = {}
|
||||
if embeds is not MISSING:
|
||||
if len(embeds) > 10:
|
||||
|
||||
Reference in New Issue
Block a user