Skip to content

Commit a7fa66a

Browse files
committed
suggested review changes
1 parent 4478fcb commit a7fa66a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

discord/components.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,8 +1350,13 @@ def walk_components(self) -> Iterator[Component]:
13501350

13511351
class FileUpload(Component):
13521352
"""Represents an File Upload field from the Discord Bot UI Kit.
1353+
13531354
This inherits from :class:`Component`.
13541355
1356+
.. note::
1357+
1358+
This class is not useable by end-users; see :class:`discord.ui.FileUpload` instead.
1359+
13551360
.. versionadded:: 2.7
13561361
13571362
Attributes
@@ -1392,10 +1397,10 @@ def __init__(self, data: FileUploadComponentPayload):
13921397
def to_dict(self) -> FileUploadComponentPayload:
13931398
payload = {
13941399
"type": 19,
1395-
"id": self.id,
1400+
"custom_id": self.custom_id,
13961401
}
1397-
if self.custom_id:
1398-
payload["custom_id"] = self.custom_id
1402+
if self.id is not None:
1403+
payload["id"] = self.id
13991404

14001405
if self.min_values:
14011406
payload["min_values"] = self.min_values

0 commit comments

Comments
 (0)