deleteMessage

Delete a single message.

Parameters

chatId: ID

The identifier of the chat that contains the message.

messageId: number

The identifier of the message to delete.

onlyForMe?: boolean

Whether to delete the message only for this side.

Result

void

Syntax

// Required parameters only.
await client.deleteMessage(chatId, messageId);

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