Skip to content

Commit b3cbc7d

Browse files
authored
fix logic
1 parent adc6134 commit b3cbc7d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

discord/webhook/async_.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -644,9 +644,9 @@ def handle_message_parameters(
644644
payload["embeds"] = [] if embed is None else [embed.to_dict()]
645645
if content is not MISSING:
646646
payload["content"] = str(content) if content is not None else None
647-
attachments = []
647+
_attachments = []
648648
if attachments is not MISSING:
649-
attachments = [a.to_dict() for a in attachments]
649+
_attachments = [a.to_dict() for a in attachments]
650650

651651
if view is not MISSING:
652652
payload["components"] = view.to_components() if view is not None else []
@@ -689,16 +689,16 @@ def handle_message_parameters(
689689
"content_type": "application/octet-stream",
690690
}
691691
)
692-
attachments.append(
692+
_attachments.append(
693693
{
694694
"id": index,
695695
"filename": file.filename,
696696
"description": file.description,
697697
}
698698
)
699699

700-
if attachments:
701-
payload["attachments"] = attachments
700+
if _attachments:
701+
payload["attachments"] = _attachments
702702

703703
if multipart_files:
704704
multipart.append({"name": "payload_json", "value": utils._to_json(payload)})

0 commit comments

Comments
 (0)