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
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
embedDiscordEmbedEmbed to attach to the message.
mentionboolWhether 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
contentstringMessage content to respond with.
embedDiscordEmbedEmbed to attach to the message.
mentionboolWhether 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
builderDiscordMessageBuilderThe Discord message builder.
mentionboolWhether 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
actionAction<DiscordMessageBuilder>The Discord message builder.
mentionboolWhether 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.