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
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.
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
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.
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
fileName
stringName of the file to attach.
stream
StreamStream containing said file's contents.
fileOptions
AddFileOptionsAdditional 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
stream
FileStreamFileStream pointing to the file to attach.
fileOptions
AddFileOptionsAdditional flags for the handling of the file stream.
Returns
- T
The current builder to be chained.