Table of Contents

Class Attachment

Namespace
NetCord
Assembly
NetCord.dll
public class Attachment : Entity, IEntity, ISpanFormattable, IFormattable, IEquatable<Entity>, IJsonModel<JsonAttachment>
Inheritance
Attachment
Implements
Derived
Inherited Members

Constructors

Attachment(JsonAttachment)

public Attachment(JsonAttachment jsonModel)

Parameters

jsonModel JsonAttachment

Properties

ContentType

The attachment's media type.

public ContentType? ContentType { get; }

Property Value

ContentType

Description

Description for the attachment (max 1024 characters).

public string? Description { get; }

Property Value

string

Ephemeral

Whether this attachment is ephemeral.

public bool Ephemeral { get; }

Property Value

bool

FileName

Name of the attachment.

public string FileName { get; }

Property Value

string

Flags

public AttachmentFlags Flags { get; }

Property Value

AttachmentFlags

Id

The unique identifier for this object.

public override ulong Id { get; }

Property Value

ulong

ProxyUrl

A proxied url of file.

public string ProxyUrl { get; }

Property Value

string

Size

Size of file in bytes.

public int Size { get; }

Property Value

int

Title

Title of the attachment.

public string? Title { get; }

Property Value

string

Url

Source url of file.

public string Url { get; }

Property Value

string

Methods

CreateFromJson(JsonAttachment)

public static Attachment CreateFromJson(JsonAttachment jsonModel)

Parameters

jsonModel JsonAttachment

Returns

Attachment

GetExpirationInfo()

public AttachmentExpirationInfo GetExpirationInfo()

Returns

AttachmentExpirationInfo