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
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.
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
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.