• Mute a chat, you can use duration or expiration For expiration, use unix timestamp (seconds only) For duration, use seconds

    Parameters

    • chatId: string | Wid
    • time: { expiration: number | Date } | { duration: number }

    Returns Promise<{ expiration: number; isMuted: boolean; wid: Wid }>

    // Mute for 60 seconds
    WPP.chat.mute('[number]@c.us', {duration: 60});

    // Mute util 2021-01-01
    WPP.chat.mute('[number]@c.us', {expiration: 1641006000});

    // or using date
    const expiration = new Date('2022-01-01 00:00:00');
    WPP.chat.mute('[number]@c.us', {expiration: expiration});