Table of Contents

Class Base64AttachmentProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll

Represents an attachment with Base64 encoded contents.

public class Base64AttachmentProperties : AttachmentProperties, IHttpSerializable
Inheritance
Base64AttachmentProperties
Implements
Inherited Members

Constructors

Base64AttachmentProperties(string, Stream)

Represents an attachment with Base64 encoded contents.

public Base64AttachmentProperties(string fileName, Stream stream)

Parameters

fileName string
Name of the attachment (max 1024 characters for attachments sent by message, 2-30 characters for attachments used for sticker creation).
stream Stream

A stream containing the attachment's contents, encoded in Base64.

Methods

Serialize()

Serializes the object or its part into HttpContent.

public override HttpContent Serialize()

Returns

HttpContent

WithDescription(string?)

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

public Base64AttachmentProperties WithDescription(string? description)

Parameters

description string

Returns

Base64AttachmentProperties

WithFileName(string)

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

public Base64AttachmentProperties WithFileName(string fileName)

Parameters

fileName string

Returns

Base64AttachmentProperties

WithTitle(string?)

The title of the attachment.

public Base64AttachmentProperties WithTitle(string? title)

Parameters

title string

Returns

Base64AttachmentProperties