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
stringThe fileName that the file should be sent as.
stream
StreamThe Stream to the file.
resetStreamPosition
boolTells the API Client to reset the stream position to what it was after the file is sent.
description
stringDescription 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
FileStreamThe Stream to the file.
resetStreamPosition
boolTells the API Client to reset the stream position to what it was after the file is sent.
description
stringDescription of the file.
Returns
- DiscordMessageBuilder
The current builder to be chained.