Table of Contents

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

accessToken string

The bearer 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>