Table of Contents
API reference

Method AddSpoilerFile

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

AddSpoilerFile(string, Stream, bool, string?)

Adds a file marked as a spoiler without changing its filename.

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

Parameters

fileName string

The filename to send.

stream Stream

The file data.

resetStreamPosition bool

Whether to restore the stream position after sending.

description string

An optional file description.

Returns

DiscordMessageBuilder

The current builder.