Table of Contents

Class ThumbnailBuilder

Namespace
Discord
Assembly
Discord.Net.Core.dll
public class ThumbnailBuilder : IMessageComponentBuilder
Inheritance
ThumbnailBuilder
Implements
Inherited Members
Extension Methods

Constructors

ThumbnailBuilder()

Initializes a new instance of the ThumbnailBuilder.

public ThumbnailBuilder()

ThumbnailBuilder(ThumbnailComponent)

Initializes a new ThumbnailBuilder from existing component.

public ThumbnailBuilder(ThumbnailComponent component)

Parameters

component ThumbnailComponent

ThumbnailBuilder(UnfurledMediaItemProperties, string, bool)

Initializes a new instance of the ThumbnailBuilder.

public ThumbnailBuilder(UnfurledMediaItemProperties media, string description = null, bool isSpoiler = false)

Parameters

media UnfurledMediaItemProperties
description string
isSpoiler bool

Fields

MaxDescriptionLength

Gets the maximum length of the description.

public const int MaxDescriptionLength = 1024

Field Value

int

Properties

Description

Gets or sets the description of the thumbnail.

public string Description { get; set; }

Property Value

string

Id

Gets or sets the id for the component. An autoincremented id will be assigned if not set.

public int? Id { get; set; }

Property Value

int?

IsSpoiler

Gets or sets whether the thumbnail is a spoiler.

public bool IsSpoiler { get; set; }

Property Value

bool

Media

Gets or sets the media of the thumbnail.

public UnfurledMediaItemProperties Media { get; set; }

Property Value

UnfurledMediaItemProperties

Type

Gets the type of the component.

public ComponentType Type { get; }

Property Value

ComponentType

Methods

Build()

Runs validation checks and builds the component.

public ThumbnailComponent Build()

Returns

ThumbnailComponent

WithDescription(string)

Sets the description of the thumbnail.

public ThumbnailBuilder WithDescription(string description)

Parameters

description string

Returns

ThumbnailBuilder

The current builder.

WithMedia(UnfurledMediaItemProperties)

Sets the media of the thumbnail.

public ThumbnailBuilder WithMedia(UnfurledMediaItemProperties media)

Parameters

media UnfurledMediaItemProperties

Returns

ThumbnailBuilder

The current builder.

WithSpoiler(bool)

Sets whether the thumbnail is a spoiler.

public ThumbnailBuilder WithSpoiler(bool isSpoiler)

Parameters

isSpoiler bool

Returns

ThumbnailBuilder

The current builder.