Table of Contents

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

accessToken DiscordAccessToken

The discord access token.

stream Stream

The file stream.

fileName string

The file name.

contentType string

The MIME content type.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<DiscordActivityAttachmentUpload>