Table of Contents

Method CreateMessageAsync

Namespace
DSharpPlus
Assembly
DSharpPlus.Rest.dll

CreateMessageAsync(ulong, string)

Sends a message

public Task<DiscordMessage> CreateMessageAsync(ulong channelId, string content)

Parameters

channelId ulong

Channel ID

content string

Message (text) content

Returns

Task<DiscordMessage>

CreateMessageAsync(ulong, DiscordEmbed)

Sends a message

public Task<DiscordMessage> CreateMessageAsync(ulong channelId, DiscordEmbed embed)

Parameters

channelId ulong

Channel ID

embed DiscordEmbed

Embed to attach

Returns

Task<DiscordMessage>

CreateMessageAsync(ulong, string, DiscordEmbed)

Sends a message

public Task<DiscordMessage> CreateMessageAsync(ulong channelId, string content, DiscordEmbed embed)

Parameters

channelId ulong

Channel ID

content string

Message (text) content

embed DiscordEmbed

Embed to attach

Returns

Task<DiscordMessage>

CreateMessageAsync(ulong, DiscordMessageBuilder)

Sends a message

public Task<DiscordMessage> CreateMessageAsync(ulong channelId, DiscordMessageBuilder builder)

Parameters

channelId ulong

Channel ID

builder DiscordMessageBuilder

The Discord Message builder.

Returns

Task<DiscordMessage>

CreateMessageAsync(ulong, Action<DiscordMessageBuilder>)

Sends a message

public Task<DiscordMessage> CreateMessageAsync(ulong channelId, Action<DiscordMessageBuilder> action)

Parameters

channelId ulong

Channel ID

action Action<DiscordMessageBuilder>

The Discord Message builder.

Returns

Task<DiscordMessage>