messages.recall()

This method allows the current user to recall one or more of their own messages from a conversation.

Definition

client.messages.recall(
id: string|Message|string[]|Message[]
):Promise<boolean[],Error>

Parameters

ParameterTypeDescription
idstringMessage

Returns

An error will be thrown if any of the arguments are invalid.

Otherwise, once the returned Promise is resolved, return an array whose position corresponds with the input messages. Each array value will be true if the message at that position was recalled.

Example

const wasRecalled = await client.messages.recall('some_message_id');
console.log('message was recalled:', wasRecalled[0]);