Method AddFile
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
AddFile(string, Stream, bool)
Sets if the message has files to be sent.
public T AddFile(string fileName, Stream stream, bool resetStreamPosition = false)
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.
Returns
- T
The current builder to be chained.
AddFile(FileStream, bool)
Sets if the message has files to be sent.
public T AddFile(FileStream stream, bool resetStreamPosition = false)
Parameters
streamFileStreamThe Stream to the file.
resetStreamPositionboolTells the API Client to reset the stream position to what it was after the file is sent.
Returns
- T
The current builder to be chained.
AddFile(string, Stream, AddFileOptions)
Attaches a file to this message.
public T AddFile(string fileName, Stream stream, AddFileOptions fileOptions)
Parameters
fileNamestringName of the file to attach.
streamStreamStream containing said file's contents.
fileOptionsAddFileOptionsAdditional flags for the handling of the file stream.
Returns
- T
The current builder to be chained.
AddFile(FileStream, AddFileOptions)
Attaches a file to this message.
public T AddFile(FileStream stream, AddFileOptions fileOptions)
Parameters
streamFileStreamFileStream pointing to the file to attach.
fileOptionsAddFileOptionsAdditional flags for the handling of the file stream.
Returns
- T
The current builder to be chained.