We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb09d53 commit 75b7ef0Copy full SHA for 75b7ef0
discord/webhook/async_.py
@@ -503,6 +503,8 @@ def create_interaction_response(
503
504
if data is not None:
505
payload["data"] = data
506
+ else:
507
+ payload["data"] = {}
508
form = [{"name": "payload_json"}]
509
attachments = []
510
files = files or []
@@ -522,7 +524,8 @@ def create_interaction_response(
522
524
"content_type": "application/octet-stream",
523
525
}
526
)
- payload["data"]["attachments"] = attachments
527
+ if attachments:
528
+ payload["data"]["attachments"] = attachments
529
form[0]["value"] = utils._to_json(payload)
530
531
route = Route(
0 commit comments