Table of Contents

Class BaseDiscordMessageBuilder<T>

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

An abstraction for the different message builders in DSharpPlus.

public abstract class BaseDiscordMessageBuilder<T> : IDiscordMessageBuilder where T : BaseDiscordMessageBuilder<T>

Type Parameters

T
Inheritance
BaseDiscordMessageBuilder<T>
Implements
Derived

Constructors

BaseDiscordMessageBuilder(IDiscordMessageBuilder)

Constructs a new BaseDiscordMessageBuilder<T> based on an existing IDiscordMessageBuilder. Existing file streams will have their position reset to 0.

Properties

Components

Components to send on this followup message.

Content

The contents of this message.

Embeds

Embeds to send on this webhook request.

Files

Files to send on this webhook request.

Flags
IsTTS

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

Mentions

Mentions to send on this webhook request.

Poll

Gets or sets a poll for this message.

Methods

AddComponents(params DiscordComponent[])

Adds a row of components to a message, up to 5 components per row, and up to 5 rows per message.

AddComponents(IEnumerable<DiscordActionRowComponent>)

Appends several rows of components to the message

AddComponents(IEnumerable<DiscordComponent>)

Adds a row of components to a message, up to 5 components per row, and up to 5 rows per message.

AddEmbed(DiscordEmbed)

Appends an embed to the current builder.

AddEmbeds(IEnumerable<DiscordEmbed>)

Appends several embeds to the current builder.

AddFile(FileStream, AddFileOptions)

Attaches a file to this message.

AddFile(FileStream, bool)

Sets if the message has files to be sent.

AddFile(string, Stream, AddFileOptions)

Attaches a file to this message.

AddFile(string, Stream, bool)

Sets if the message has files to be sent.

AddFiles(IDictionary<string, Stream>, AddFileOptions)

Attaches multiple files to this message.

AddFiles(IDictionary<string, Stream>, bool)

Sets if the message has files to be sent.

AddFiles(IEnumerable<DiscordMessageFile>)
AddMention(IMention)

Adds the mention to the mentions to parse, etc. with the interaction response.

AddMentions(IEnumerable<IMention>)

Adds the mentions to the mentions to parse, etc. with the interaction response.

Clear()

Allows for clearing the Message Builder so that it can be used again to send a new message.

ClearComponents()

Clears all message components on this builder.

ClearEmbeds()

Clears the embeds on the current builder.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

RemoveEmbedAt(int)

Removes the embed at the specified index.

RemoveEmbeds(int, int)

Removes the specified range of embeds.

SuppressNotifications()
WithContent(string)

Sets the content of the Message.

WithPoll(DiscordPollBuilder)
WithTTS(bool)

Sets if the message should be TTS.