Table of Contents

Class Attachment

Namespace
Fluxer.Net
Assembly
Fluxer.Net.dll

Fluxer entity with client attached.

public class Attachment : Entity, IAttachment, ISnowflake
Inheritance
object
Attachment
Implements

Properties

ContentHash

The hash of the attachment content.

public string? ContentHash { get; set; }

Property Value

string

ContentType

The MIME type of the attachment.

public string ContentType { get; set; }

Property Value

string

CreatedAt

Object created at UTC date.

public DateTimeOffset CreatedAt { get; }

Property Value

DateTimeOffset

Description

The description of the attachment.

public string? Description { get; set; }

Property Value

string

Duration

The duration of the media in seconds.

public ulong? Duration { get; set; }

Property Value

ulong?

ExpiresAt

The ISO 8601 timestamp when the attachment URL expires.

public DateTimeOffset? ExpiresAt { get; set; }

Property Value

DateTimeOffset?

Filename

The name of the attached file.

public string Filename { get; set; }

Property Value

string

Flags

Attachment flags.

public AttachmentFlag Flags { get; set; }

Property Value

AttachmentFlag

Height

The height of the attachment in pixels (for images/videos).

public int? Height { get; set; }

Property Value

int?

Id

Unique identifier (snowflake) for the object.

public ulong Id { get; set; }

Property Value

ulong

IsExpired

Whether the attachment URL has expired.

public bool? IsExpired { get; set; }

Property Value

bool?

IsNsfw

Whether the attachment is flagged as NSFW.

public bool? IsNsfw { get; set; }

Property Value

bool?

Placeholder

The base64 encoded placeholder image for lazy loading.

public string? Placeholder { get; set; }

Property Value

string

ProxyUrl

The proxied URL of the attachment.

public string? ProxyUrl { get; set; }

Property Value

string

Size

The size of the attachment in bytes.

public ulong Size { get; set; }

Property Value

ulong

Title

The title of the attachment.

public string? Title { get; set; }

Property Value

string

Url

The URL of the attachment.

public string? Url { get; set; }

Property Value

string

Waveform

The base64 encoded audio waveform data.

public string? Waveform { get; set; }

Property Value

string

Width

The width of the attachment in pixels (for images/videos).

public int? Width { get; set; }

Property Value

int?

Methods

Create(FluxerBaseClient, AttachmentJson, ulong)

Create a Attachment object from json.

public static Attachment Create(FluxerBaseClient client, AttachmentJson json, ulong channelId)

Parameters

client FluxerBaseClient
json AttachmentJson
channelId ulong

Returns

Attachment

GetAttachmentUrl()

Get the attachment's url.

public string? GetAttachmentUrl()

Returns

string