Table of Contents

Method AddFile

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

AddFile(string, Stream, bool, string)

Adds a file to send at the execution of the webhook.

public DiscordWebhookBuilder AddFile(string filename, Stream data, bool resetStreamPosition = false, string description = null)

Parameters

filename string

Name of the file.

data Stream

File data.

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

DiscordWebhookBuilder

AddFile(FileStream, bool, string)

Sets if the message has files to be sent.

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

DiscordWebhookBuilder