Method CreateActivityAttachmentAsync
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
CreateActivityAttachmentAsync(string, Stream, string, string?, CancellationToken)
Creates an activity attachment using a raw bearer access token.
public Task<DiscordActivityAttachmentUpload> CreateActivityAttachmentAsync(string accessToken, Stream stream, string fileName, string? contentType = null, CancellationToken cancellationToken = default)
Parameters
accessTokenstringThe bearer access token.
streamStreamThe file stream.
fileNamestringThe file name.
contentTypestringThe MIME content type.
cancellationTokenCancellationTokenA token to cancel the request.