Table of Contents

Method EditMessageAsync

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

EditMessageAsync(ulong, DiscordWebhookBuilder, IEnumerable<DiscordAttachment>)

Edits a previously-sent webhook message.

public Task<DiscordMessage> EditMessageAsync(ulong messageId, DiscordWebhookBuilder builder, IEnumerable<DiscordAttachment> attachments = null)

Parameters

messageId ulong

The id of the message to edit.

builder DiscordWebhookBuilder

The builder of the message to edit.

attachments IEnumerable<DiscordAttachment>

Attached files to keep.

Returns

Task<DiscordMessage>

The modified DiscordMessage

Exceptions

NotFoundException

Thrown when the webhook does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.