No summary provided.
Extends
ComponentBuilder<APIFileComponent>Creates a new file from API data.
Example
Creating a file from an API data object:Example
Creating a file using setters and API data:Name | Type | Optional | Description |
---|---|---|---|
data | Partial<APIFileComponent> | Yes | The API data to create this file with |
Clears the id of this component, defaulting to a default incremented id.
Inherited from ComponentBuilderSets the id of this component.
Name | Type | Optional | Description |
---|---|---|---|
id | number | No | The id to use |
Sets the spoiler status of this file.
Name | Type | Optional | Description |
---|---|---|---|
spoiler | boolean | Yes | The spoiler status to use |
Sets the media URL of this file.
Name | Type | Optional | Description |
---|---|---|---|
url | string | No | The URL to use |
Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.
Name | Type | Optional | Description |
---|---|---|---|
validationOverride | boolean | Yes | Force validation to run/not run regardless of your global preference |