Table of Contents

Class DiscordInteractionResponseBuilder

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

Constructs an interaction response.

public sealed class DiscordInteractionResponseBuilder : BaseDiscordMessageBuilder<DiscordInteractionResponseBuilder>, IDiscordMessageBuilder
Inheritance
DiscordInteractionResponseBuilder
Implements
Inherited Members

Constructors

DiscordInteractionResponseBuilder()

Constructs a new empty interaction response builder.

DiscordInteractionResponseBuilder(DiscordInteractionResponseBuilder)

Constructs a new interaction response builder based on the passed builder.

DiscordInteractionResponseBuilder(IDiscordMessageBuilder)

Copies the common properties from the passed builder.

Properties

Choices

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

CustomId

The custom id to send with this interaction response. Only applicable when creating a modal.

IsEphemeral

Whether this interaction response should be ephemeral.

Title

The title to send with this interaction response. Only applicable when creating a modal.

Methods

AddAutoCompleteChoice(DiscordAutoCompleteChoice)

Adds a single auto-complete choice to the builder.

AddAutoCompleteChoices(params DiscordAutoCompleteChoice[])

Adds auto-complete choices to the builder.

AddAutoCompleteChoices(IEnumerable<DiscordAutoCompleteChoice>)

Adds auto-complete choices to the builder.

AsEphemeral(bool)

Sets the interaction response to be ephemeral.

Clear()

Allows for clearing the Interaction Response Builder so that it can be used again to send a new response.

WithCustomId(string)

If responding with a modal, sets the custom id for the modal.

WithTitle(string)

If responding with a modal, sets the title of the modal.