The method inbox.leave()
is used to make the bot leave a specific conversation. It requires one parameter:
conversationId
(string): The ID of the conversation to leave.// Assuming you have defined the Highrise instance as "bot".
bot.on("chatCreate", async (user, message) => {
if (message === "leave") {
bot.inbox.leave("1_on_1:649d9759cfb5ce5a4ef0d3a6:64b2d35c8893a95b02d668cf").then(() => {
console.log("I've successfully left the conversation");
}).catch(e => console.error(e));
}
});
Go Back: Bot Inbox