Table of Contents

Method EditMessageAsync

Namespace
DSharpPlus
Assembly
DSharpPlus.Rest.dll

EditMessageAsync(ulong, ulong, Optional<string>)

Edits a message

public Task<DiscordMessage> EditMessageAsync(ulong channelId, ulong messageId, Optional<string> content)

Parameters

channelId ulong

Channel ID

messageId ulong

Message ID

content Optional<string>

New message content

Returns

Task<DiscordMessage>

EditMessageAsync(ulong, ulong, Optional<DiscordEmbed>)

Edits a message

public Task<DiscordMessage> EditMessageAsync(ulong channelId, ulong messageId, Optional<DiscordEmbed> embed)

Parameters

channelId ulong

Channel ID

messageId ulong

Message ID

embed Optional<DiscordEmbed>

New message embed

Returns

Task<DiscordMessage>

EditMessageAsync(ulong, ulong, DiscordMessageBuilder, bool, IEnumerable<DiscordAttachment>)

Edits a message

public Task<DiscordMessage> EditMessageAsync(ulong channelId, ulong messageId, DiscordMessageBuilder builder, bool suppressEmbeds = false, IEnumerable<DiscordAttachment> attachments = null)

Parameters

channelId ulong

Channel ID

messageId ulong

Message ID

builder DiscordMessageBuilder

The builder of the message to edit.

suppressEmbeds bool

Whether to suppress embeds on the message.

attachments IEnumerable<DiscordAttachment>

Attached files to keep.

Returns

Task<DiscordMessage>