Table of Contents

Method ForwardMessageAsync

Namespace
DisCatSharp.Net
Assembly
DisCatSharp.dll

ForwardMessageAsync(DiscordMessage, ulong, string?, CancellationToken)

Forwards a message.

public Task<DiscordMessage> ForwardMessageAsync(DiscordMessage forwardMessage, ulong targetChannelId, string? content, CancellationToken cancellationToken = default)

Parameters

forwardMessage DiscordMessage

The message to forward.

targetChannelId ulong

The target channel id to forward the message to.

content string

The content to attach.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<DiscordMessage>

Exceptions

ArgumentException

Thrown when the content exceeds 2000 characters.