Table of Contents

Method AddFile

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

AddFile(string, Stream, bool)

Sets if the message has files to be sent.

public T AddFile(string fileName, Stream stream, bool resetStreamPosition = false)

Parameters

fileName string

The fileName that the file should be sent as.

stream Stream

The Stream to the file.

resetStreamPosition bool

Tells the API Client to reset the stream position to what it was after the file is sent.

Returns

T

The current builder to be chained.

AddFile(FileStream, bool)

Sets if the message has files to be sent.

public T AddFile(FileStream stream, bool resetStreamPosition = false)

Parameters

stream FileStream

The Stream to the file.

resetStreamPosition bool

Tells the API Client to reset the stream position to what it was after the file is sent.

Returns

T

The current builder to be chained.

AddFile(string, Stream, AddFileOptions)

Attaches a file to this message.

public T 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

T

The current builder to be chained.

AddFile(FileStream, AddFileOptions)

Attaches a file to this message.

public T 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

T

The current builder to be chained.