Validate message file upload limit

This commit is contained in:
harumaki4649 authored and GitHub committed 2026-07-10 19:37:13 -04:00
1 parent 34c66665dd
commit f6dbb848d0
3 files changed
+59

No files matched your search

+3
View File
@@ -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:
+3
View File
@@ -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,
}