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
fileNamestringThe fileName that the file should be sent as.
streamStreamThe Stream to the file.
resetStreamPositionboolTells the API Client to reset the stream position to what it was after the file is sent.
descriptionstringDescription 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
streamFileStreamThe Stream to the file.
resetStreamPositionboolTells the API Client to reset the stream position to what it was after the file is sent.
descriptionstringDescription of the file.
Returns
- DiscordMessageBuilder
The current builder to be chained.