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:
@@ -571,6 +571,9 @@ def interaction_message_response_params(
|
||||
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.')
|
||||
|
||||
data: Optional[Dict[str, Any]] = {
|
||||
'tts': tts,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user