Discore
Show / Hide Table of Contents

Class AttachmentOptions

Specifies options for uploading a new attachment, editing metadata for an existing one, or keeping an existing attachment across a message edit.

Inheritance
object
AttachmentOptions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX