Validate message file upload limit

This commit is contained in:
harumaki4649
2026-07-10 19:37:13 -04:00
committed by GitHub
parent 34c66665dd
commit f6dbb848d0
3 changed files with 59 additions and 0 deletions
+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,
}