Table of Contents

Method AddFile

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

AddFile(string, Stream, bool)

Attaches a file to this message.

IDiscordMessageBuilder AddFile(string fileName, Stream stream, bool resetStream = false)

Parameters

fileName string

Name of the file to attach.

stream Stream

Stream containing said file's contents.

resetStream bool

Whether to reset the stream to position 0 after sending.

Returns

IDiscordMessageBuilder

AddFile(FileStream, bool)

Attaches a file to this message.

IDiscordMessageBuilder AddFile(FileStream stream, bool resetStream = false)

Parameters

stream FileStream

FileStream pointing to the file to attach.

resetStream bool

Whether to reset the stream position to 0 after sending.

Returns

IDiscordMessageBuilder

AddFile(string, Stream, AddFileOptions)

Attaches a file to this message.

IDiscordMessageBuilder AddFile(string fileName, Stream stream, AddFileOptions fileOptions)

Parameters

fileName string

Name of the file to attach.

stream Stream

Stream containing said file's contents.

fileOptions AddFileOptions

Additional flags for the handling of the file stream.

Returns

IDiscordMessageBuilder

AddFile(FileStream, AddFileOptions)

Attaches a file to this message.

IDiscordMessageBuilder AddFile(FileStream stream, AddFileOptions fileOptions)

Parameters

stream FileStream

FileStream pointing to the file to attach.

fileOptions AddFileOptions

Additional flags for the handling of the file stream.

Returns

IDiscordMessageBuilder