Method AddFile
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
AddFile(string, Stream, bool, string?)
Adds a file to the interaction response.
public DiscordInteractionResponseBuilder AddFile(string filename, Stream data, bool resetStreamPosition = false, string? description = null)
Parameters
filenamestringName of the file.
dataStreamFile data.
resetStreamPositionboolTells the API Client to reset the stream position to what it was after the file is sent.
descriptionstringDescription of the file.
Returns
- DiscordInteractionResponseBuilder
The builder to chain calls with.
AddFile(FileStream, bool, string?)
Sets if the message has files to be sent.
public DiscordInteractionResponseBuilder 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
- DiscordInteractionResponseBuilder
The builder to chain calls with.