Table of Contents

Method ForwardMessageAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

ForwardMessageAsync(DiscordChannel, string?)

Forwards this message to another channel.

public Task<DiscordMessage> ForwardMessageAsync(DiscordChannel targetChannel, string? content = null)

Parameters

targetChannel DiscordChannel

The channel to forward this message to.

content string

Content is not available at the moment, but already added for the future.

Returns

Task<DiscordMessage>

Exceptions

UnauthorizedException

Thrown when the bot tries forwarding a message it doesn't has access to or the client tried to modify a message not sent by them.

NotFoundException

Thrown when the target channel does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.