Table of Contents

Interface IDiscordMessageBuilder

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

Base interface for any discord message builder.

public interface IDiscordMessageBuilder

Properties

Components

All components on this message.

Content

Getter / setter for message content.

Embeds

All embeds on this message.

Files

All files on this message.

Flags
IsTTS

Whether this message will play as a text-to-speech message.

Mentions

All allowed mentions on this message.

Poll

Gets or sets a poll for this message.

Methods

AddActionRowComponent(DiscordActionRowComponent)

Adds a raw action row.

AddActionRowComponent(DiscordSelectComponent)

Adds a new action row with the given component.

AddActionRowComponent(params IEnumerable<DiscordButtonComponent>)

Adds buttons to the builder.

AddContainerComponent(DiscordContainerComponent)

Adds a container component to this builder.

AddEmbed(DiscordEmbed)

Adds an embed to this message.

AddEmbeds(IEnumerable<DiscordEmbed>)

Adds multiple embeds to this message.

AddFile(FileStream, AddFileOptions)

Attaches a file to this message.

AddFile(FileStream, bool)

Attaches a file to this message.

AddFile(string, Stream, AddFileOptions)

Attaches a file to this message.

AddFile(string, Stream, bool)

Attaches a file to this message.

AddFileComponent(DiscordFileComponent)

Adds a file component to this builder.

AddFiles(IDictionary<string, Stream>, AddFileOptions)

Attaches multiple files to this message.

AddFiles(IDictionary<string, Stream>, bool)

Attaches multiple files to this message.

AddFiles(IEnumerable<DiscordMessageFile>)

Attaches previously used files to this file stream.

AddMediaGalleryComponent(params IEnumerable<DiscordMediaGalleryItem>)

Adds a media gallery to this builder.

AddMention(IMention)

Adds an allowed mention to this message.

AddMentions(IEnumerable<IMention>)

Adds multiple allowed mentions to this message.

AddSectionComponent(DiscordSectionComponent)

Adds a section component to the builder.

AddSeparatorComponent(DiscordSeparatorComponent)

Adds a separator component to this builder.

AddTextDisplayComponent(DiscordTextDisplayComponent)

Adds a text display to this builder.

AddTextDisplayComponent(string)

Adds a text display to this builder.

AddTextInputComponent(DiscordTextInputComponent)

Adds a text input to this builder.

Clear()

Clears this builder.

ClearComponents()

Clears all components attached to this builder.

DisableV2Components()

Disables V2 components IF this builder does not currently contain illegal components.

EnableV2Components()

Enables support for V2 components; messages with the V2 flag cannot be downgraded.

SuppressNotifications()

Applies SuppressNotifications to the message.

WithContent(string)

Adds content to this message

WithTTS(bool)

Sets whether this message should play as a text-to-speech message.