Class AttachmentOptions
Specifies options for uploading a new attachment, editing metadata for an existing one, or keeping an existing attachment across a message edit.
Inherited Members
Namespace: Discore.Http
Assembly: Discore.dll
Syntax
public class AttachmentOptions
Remarks
When uploading new attachments, the attachment must have at least a filename and content.
When editing existing attachments, the ID must be the ID Discord assigned it (after a previous create/edit message call) and filename/content cannot be changed. A filename must always be set when content is specified. You cannot upload attachment content without a filename.Constructors
| Name | Description |
|---|---|
| AttachmentOptions(Snowflake) | Creates attachment options for a new or existing attachment. |
Properties
| Name | Description |
|---|---|
| Content | Gets or sets the actual attachment content to upload. |
| Description | Gets or sets the description of this attachment. |
| FileName | Gets or sets the file name of this attachment. |
| Id | Gets or sets the ID of this attachment. |
Methods
| Name | Description |
|---|---|
| SetContent(ArraySegment<byte>, string?) | Sets the actual attachment content to upload. |
| SetContent(Stream, string?) | Sets the actual attachment content to upload. |
| SetContent(HttpContent?) | Sets the actual attachment content to upload. |
| SetContent(string, string?, Encoding?) | Sets the actual attachment content to upload. |
| SetDescription(string?) | Sets the description of this attachment. |
| SetFileName(string?) | Sets the file name of this attachment. |