Table of Contents

Method AddFile

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

AddFile(string, Stream, bool, string?)

Adds a file to the message.

public DiscordMessageBuilder AddFile(string fileName, Stream stream, bool resetStreamPosition = false, string? description = null)

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.

description string

Description of the file.

Returns

DiscordMessageBuilder

The current builder to be chained.

AddFile(FileStream, bool, string?)

Adds a file to the message.

public DiscordMessageBuilder AddFile(FileStream stream, bool resetStreamPosition = false, string? description = null)

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.

description string

Description of the file.

Returns

DiscordMessageBuilder

The current builder to be chained.