Skip to main content

@wildix/xbees-conversations-client > DeleteMessageCommand

DeleteMessageCommand class

Deletes an existing message in a specified channel. This operation is idempotent and requires the channel and message to be accessible to the user.

Signature:

export declare class DeleteMessageCommand extends DeleteMessageCommand_base 

Extends: DeleteMessageCommand_base

Example

Use a bare-bones client and the command you need to make an API call.

import { ConversationsClient, DeleteMessageCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
// const { ConversationsClient, DeleteMessageCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
const client = new ConversationsClient(config);
const input = { // DeleteMessageInput
channelId: "STRING_VALUE", // required
messageId: "STRING_VALUE", // required
userId: "STRING_VALUE",
};
const command = new DeleteMessageCommand(input);
const response = await client.send(command);
// {};