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