Table of Contents

Method RespondAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

RespondAsync(string, bool)

Responds to the message. This produces a reply.

public Task<DiscordMessage> RespondAsync(string content, bool mention = true)

Parameters

content string

Message content to respond with.

mention bool

Whether to mention on reply.

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, bool)

Responds to the message. This produces a reply.

public Task<DiscordMessage> RespondAsync(DiscordEmbed embed, bool mention = true)

Parameters

embed DiscordEmbed

Embed to attach to the message.

mention bool

Whether to mention on reply.

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, bool)

Responds to the message. This produces a reply.

public Task<DiscordMessage> RespondAsync(string content, DiscordEmbed embed, bool mention = true)

Parameters

content string

Message content to respond with.

embed DiscordEmbed

Embed to attach to the message.

mention bool

Whether to mention on reply.

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, bool)

Responds to the message. This produces a reply.

public Task<DiscordMessage> RespondAsync(DiscordMessageBuilder builder, bool mention = true)

Parameters

builder DiscordMessageBuilder

The Discord message builder.

mention bool

Whether to mention on reply.

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>, bool)

Responds to the message. This produces a reply.

public Task<DiscordMessage> RespondAsync(Action<DiscordMessageBuilder> action, bool mention = true)

Parameters

action Action<DiscordMessageBuilder>

The Discord message builder.

mention bool

Whether to mention on reply.

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.