Table of Contents

Method RespondAsync

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

RespondAsync(string)

Responds to the message. This produces a reply.

public Task<DiscordMessage> RespondAsync(string content)

Parameters

content string

Message content to respond with.

Returns

Task<DiscordMessage>

The sent message.

Exceptions

UnauthorizedException

Thrown when the client does not have the SendMessages permission.

NotFoundException

Thrown when the member does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.

RespondAsync(DiscordEmbed)

Responds to the message. This produces a reply.

public Task<DiscordMessage> RespondAsync(DiscordEmbed embed)

Parameters

embed DiscordEmbed

Embed to attach to the message.

Returns

Task<DiscordMessage>

The sent message.

Exceptions

UnauthorizedException

Thrown when the client does not have the SendMessages permission.

NotFoundException

Thrown when the member does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.

RespondAsync(string, DiscordEmbed)

Responds to the message. This produces a reply.

public Task<DiscordMessage> RespondAsync(string content, DiscordEmbed embed)

Parameters

content string

Message content to respond with.

embed DiscordEmbed

Embed to attach to the message.

Returns

Task<DiscordMessage>

The sent message.

Exceptions

UnauthorizedException

Thrown when the client does not have the SendMessages permission.

NotFoundException

Thrown when the member does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.

RespondAsync(DiscordMessageBuilder)

Responds to the message. This produces a reply.

public Task<DiscordMessage> RespondAsync(DiscordMessageBuilder builder)

Parameters

builder DiscordMessageBuilder

The Discord message builder.

Returns

Task<DiscordMessage>

The sent message.

Exceptions

UnauthorizedException

Thrown when the client does not have the SendMessages permission.

NotFoundException

Thrown when the member does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.

RespondAsync(Action<DiscordMessageBuilder>)

Responds to the message. This produces a reply.

public Task<DiscordMessage> RespondAsync(Action<DiscordMessageBuilder> action)

Parameters

action Action<DiscordMessageBuilder>

The Discord message builder.

Returns

Task<DiscordMessage>

The sent message.

Exceptions

UnauthorizedException

Thrown when the client does not have the SendMessages permission.

NotFoundException

Thrown when the member does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.