Table of Contents

Method WithFile

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

WithFile(string, Stream, bool, string)

Sets if the message has files to be sent.

public DiscordMessageBuilder WithFile(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.

WithFile(FileStream, bool, string)

Sets if the message has files to be sent.

public DiscordMessageBuilder WithFile(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.