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
DiscordInteractionResponseTypeThe type of the response.
builder
DiscordInteractionResponseBuilderThe data to be sent, if any.
Returns
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
DiscordInteractionResponseBuilderThe data to be sent, if any.
Returns
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
stringContent to send in the response.
embed
DiscordEmbedEmbed to send in the response.
ephemeral
boolWhether the response should be ephemeral.
Returns
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
stringContent to send in the response.
ephemeral
boolWhether the response should be ephemeral.
Returns
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
DiscordEmbedEmbed to send in the response.
ephemeral
boolWhether the response should be ephemeral.