@wildix/xbees-conversations-client > LeaveChannelCommand
LeaveChannelCommand class
Allows a user to leave an existing channel. This operation requires the channel to be accessible to the user.
Signature:
export declare class LeaveChannelCommand extends LeaveChannelCommand_base
Extends: LeaveChannelCommand_base
Example
Use a bare-bones client and the command you need to make an API call.
import { ConversationsClient, LeaveChannelCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
// const { ConversationsClient, LeaveChannelCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
const client = new ConversationsClient(config);
const input = { // LeaveChannelInput
channelId: "STRING_VALUE", // required
userId: "STRING_VALUE",
silent: true || false,
};
const command = new LeaveChannelCommand(input);
const response = await client.send(command);
// {};