deleteMessages

Delete multiple messages.

Parameters

chatId: ID

The identifier of the chat that contains the messages.

messageIds: number[]

The identifiers of the messages to delete.

onlyForMe?: boolean

Whether to delete the messages only for this side.

Result

void

Syntax

// Required parameters only.
await client.deleteMessages(chatId, messageIds);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.deleteMessages(chatId, messageIds, { onlyForMe });