Table of Contents

Interface IAttachment

Namespace
Discord
Assembly
Discord.Net.Core.dll

Represents a message attachment found in a IUserMessage.

public interface IAttachment : ISnowflakeEntity, IEntity<ulong>
Inherited Members
Extension Methods

Properties

ClipCreatedAt

Gets the timestamp of the clip. null if the attachment is not a clip.

DateTimeOffset? ClipCreatedAt { get; }

Property Value

DateTimeOffset?

ClipParticipants

Gets users who participated in the clip.

IReadOnlyCollection<IUser> ClipParticipants { get; }

Property Value

IReadOnlyCollection<IUser>

ContentType

Gets the media's MIME type if present; otherwise null.

string ContentType { get; }

Property Value

string

Description

Gets the description of the attachment; or null if there is none set.

string Description { get; }

Property Value

string

Duration

Gets the duration of the audio file. null if the attachment is not a voice message.

double? Duration { get; }

Property Value

double?

Ephemeral

Gets whether or not this attachment is ephemeral.

bool Ephemeral { get; }

Property Value

bool

true if the attachment is ephemeral; otherwise false.

Filename

Gets the filename of this attachment.

string Filename { get; }

Property Value

string

A string containing the full filename of this attachment (e.g. textFile.txt).

Flags

Gets flags related to this to this attachment.

AttachmentFlags Flags { get; }

Property Value

AttachmentFlags

Height

Gets the height of this attachment.

int? Height { get; }

Property Value

int?

The height of this attachment if it is a picture; otherwise null.

ProxyUrl

Gets a proxied URL of this attachment.

string ProxyUrl { get; }

Property Value

string

A string containing the proxied URL of this attachment.

Size

Gets the file size of this attachment.

int Size { get; }

Property Value

int

The size of this attachment in bytes.

Title

Gets the title of the clip. null if the clip has no title set.

string Title { get; }

Property Value

string

Url

Gets the URL of this attachment.

string Url { get; }

Property Value

string

A string containing the URL of this attachment.

Waveform

Gets the base64 encoded bytearray representing a sampled waveform. null if the attachment is not a voice message.

string Waveform { get; }

Property Value

string

WaveformBytes

Gets the bytearray representing a sampled waveform. null if the attachment is not a voice message.

byte[] WaveformBytes { get; }

Property Value

byte[]

Width

Gets the width of this attachment.

int? Width { get; }

Property Value

int?

The width of this attachment if it is a picture; otherwise null.