Table of Contents

Class AttachmentProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll
public class AttachmentProperties : IHttpSerializable
Inheritance
AttachmentProperties
Implements
Derived
Inherited Members

Constructors

AttachmentProperties(string)

protected AttachmentProperties(string fileName)

Parameters

fileName string

Name of the file (max 1024 characters for attachments sent by message, 2-30 characters for attachments used for sticker creation).

AttachmentProperties(string, Stream)

public AttachmentProperties(string fileName, Stream stream)

Parameters

fileName string

Name of the file (max 1024 characters for attachments sent by message, 2-30 characters for attachments used for sticker creation).

stream Stream

Content of the file.

Properties

Description

Description for the file (max 1024 characters for attachments sent by message, max 200 characters for attachments used for sticker creation).

public string? Description { get; set; }

Property Value

string

FileName

Name of the file (max 1024 characters for attachments sent by message, 2-30 characters for attachments used for sticker creation).

public string FileName { get; set; }

Property Value

string

SupportsHttpSerialization

public virtual bool SupportsHttpSerialization { get; }

Property Value

bool

Title

Title of the attachment.

public string? Title { get; set; }

Property Value

string

Methods

GetStream()

protected Stream? GetStream()

Returns

Stream

Serialize()

Serializes the object or its part into HttpContent.

public virtual HttpContent Serialize()

Returns

HttpContent

WithDescription(string?)

Description for the file (max 1024 characters for attachments sent by message, max 200 characters for attachments used for sticker creation).

public AttachmentProperties WithDescription(string? description)

Parameters

description string

Returns

AttachmentProperties

WithFileName(string)

Name of the file (max 1024 characters for attachments sent by message, 2-30 characters for attachments used for sticker creation).

public AttachmentProperties WithFileName(string fileName)

Parameters

fileName string

Returns

AttachmentProperties

WithTitle(string?)

Title of the attachment.

public AttachmentProperties WithTitle(string? title)

Parameters

title string

Returns

AttachmentProperties