Table of Contents

Method CreateResponseAsync

Namespace
DSharpPlus.SlashCommands
Assembly
DSharpPlus.SlashCommands.dll

CreateResponseAsync(DiscordInteractionResponseType, DiscordInteractionResponseBuilder)

Creates a response to this interaction.

You must create a response within 3 seconds of this interaction being executed; if the command has the potential to take more than 3 seconds, use DeferAsync(bool) at the start, and edit the response later.

public Task CreateResponseAsync(DiscordInteractionResponseType type, DiscordInteractionResponseBuilder builder = null)

Parameters

type DiscordInteractionResponseType

The type of the response.

builder DiscordInteractionResponseBuilder

The data to be sent, if any.

Returns

Task

CreateResponseAsync(DiscordInteractionResponseBuilder)

Creates a response to this interaction.

You must create a response within 3 seconds of this interaction being executed; if the command has the potential to take more than 3 seconds, use DeferAsync(bool) at the start, and edit the response later.

public Task CreateResponseAsync(DiscordInteractionResponseBuilder builder)

Parameters

builder DiscordInteractionResponseBuilder

The data to be sent, if any.

Returns

Task

CreateResponseAsync(string, DiscordEmbed, bool)

Creates a response to this interaction.

You must create a response within 3 seconds of this interaction being executed; if the command has the potential to take more than 3 seconds, use DeferAsync(bool) at the start, and edit the response later.

public Task CreateResponseAsync(string content, DiscordEmbed embed, bool ephemeral = false)

Parameters

content string

Content to send in the response.

embed DiscordEmbed

Embed to send in the response.

ephemeral bool

Whether the response should be ephemeral.

Returns

Task

CreateResponseAsync(string, bool)

Creates a response to this interaction.

You must create a response within 3 seconds of this interaction being executed; if the command has the potential to take more than 3 seconds, use DeferAsync(bool) at the start, and edit the response later.

public Task CreateResponseAsync(string content, bool ephemeral = false)

Parameters

content string

Content to send in the response.

ephemeral bool

Whether the response should be ephemeral.

Returns

Task

CreateResponseAsync(DiscordEmbed, bool)

Creates a response to this interaction.

You must create a response within 3 seconds of this interaction being executed; if the command has the potential to take more than 3 seconds, use DeferAsync(bool) at the start, and edit the response later.

public Task CreateResponseAsync(DiscordEmbed embed, bool ephemeral = false)

Parameters

embed DiscordEmbed

Embed to send in the response.

ephemeral bool

Whether the response should be ephemeral.

Returns

Task