setChatPhoto

Set a chat’s photo.

PARAMETERS
chatId: number

The identifier of the chat.

photo: FileSource

A photo to set as the chat’s photo.

fileName?: string

The file name to assign if applicable.

mimeType?: string

The mime type to assign if applicable.

chunkSize?: number

Size of each upload chunk in bytes.

signal?: AbortSignal | null

Upload abort signal.

RESULT
void
SYNTAX
// Required parameters only.
await client.setChatPhoto(chatId, photo);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.setChatPhoto(chatId, photo, {
    fileName,
    mimeType,
    chunkSize,
    signal,
});