@wppconnect/wa-js - v3.19.3
    Preparing search index...

    Function replyToButtonMessage

    • Reply to a button message by clicking a specific button

      Parameters

      Returns Promise<any>

      // Reply to the first button (Yes)
      await WPP.chat.replyToButtonMessage(
      '[number]@c.us',
      'messageId',
      { buttonIndex: 0 }
      );

      // Reply to the second button (No)
      await WPP.chat.replyToButtonMessage(
      '[number]@c.us',
      'messageId',
      { buttonIndex: 1 }
      );