Table of Contents

Class DiscordInteractionResponseBuilder

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

Constructs an interaction response.

public sealed class DiscordInteractionResponseBuilder : DisCatSharpBuilder
Inheritance
DiscordInteractionResponseBuilder
Inherited Members

Constructors

DiscordInteractionResponseBuilder()

Constructs a new empty interaction response builder.

DiscordInteractionResponseBuilder(DisCatSharpBuilder)

Constructs a new DiscordInteractionResponseBuilder based on an existing DiscordMessageBuilder.

Properties

Choices

The choices to send on this interaction response. Mutually exclusive with content, embed, and components.

IsEphemeral

Whether this interaction response should be ephemeral.

IsTts

Whether this interaction response is text-to-speech.

Poll

Gets the poll for this message.

Methods

AddAutoCompleteChoice(DiscordApplicationCommandAutocompleteChoice)

Adds a single auto-complete choice to the builder.

AddAutoCompleteChoices(params DiscordApplicationCommandAutocompleteChoice[])

Adds auto-complete choices to the builder.

AddAutoCompleteChoices(IEnumerable<DiscordApplicationCommandAutocompleteChoice>)

Adds auto-complete choices to the builder.

AddComponents(params DiscordActionRowComponent[])

Appends several rows of components to the message

AddComponents(params DiscordComponent[])

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

If WithV2Components() was called, the limit changes to 10 top-level components and max 30 components in total.

AddComponents(IEnumerable<DiscordActionRowComponent>)

Appends several rows of components to the message

AddComponents(IEnumerable<DiscordComponent>)

Appends a collection of components to the builder. Each call will append to a new row.

AddEmbed(DiscordEmbed)

Adds an embed to send with the interaction response.

AddEmbeds(IEnumerable<DiscordEmbed>)

Adds the given embeds to send with the interaction response.

AddFile(FileStream, bool, string)

Sets if the message has files to be sent.

AddFile(string, Stream, bool, string)

Adds a file to the interaction response.

AddFiles(Dictionary<string, Stream>, bool)

Adds the given files to the interaction response builder.

AsEphemeral()

Sets the interaction response to be ephemeral.

AsSilentMessage()

Sets the interaction response to be send as silent message.

Clear()

Allows for clearing the builder so that it can be used again.

ClearPoll()

Clears the poll from this builder.

SuppressEmbeds()

Sets the interaction response to suppress embeds.

WithAllowedMention(IMention)

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

WithAllowedMentions(IEnumerable<IMention>)

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

WithContent(string)

Sets the content of the message to send.

WithPoll(DiscordPollBuilder)

Adds a poll to this builder.

WithTts(bool)

Indicates if the interaction response will be text-to-speech.

WithV2Components()

Sets that this builder should be using UI Kit.