Example 1: Basic Text Message with a Single Button
awaitclient.interactiveMessage(m.jid,{title: 'Hello!',text: 'This is a basic interactive message.',footer: 'Footer Text',buttons: [{type: 'button',display_text: 'Click Me',id: 'btn_1'}]});
Example 2: Text Message with URL Button
awaitclient.interactiveMessage(m.jid,{title: 'Visit Our Website',text: 'Click the button below to visit our website.',footer: 'Footer Text',buttons: [{type: 'url',display_text: 'Visit',url: 'https://example.com'}]});
Example 3: Text Message with Address Button
awaitclient.interactiveMessage(m.jid,{title: 'Our Office Address',text: 'Click the button to view our address.',footer: 'Footer Text',buttons: [{type: 'address',display_text: 'View Address',id: 'address_1'}]});
Example 4: Text Message with Location Button
awaitclient.interactiveMessage(m.jid,{title: 'Share Your Location',text: 'Click the button to share your location with us.',footer: 'Footer Text',buttons: [{type: 'location',display_text: 'Share Location'}]});
Example 5: Text Message with Copy Button
awaitclient.interactiveMessage(m.jid,{title: 'Copy This Code',text: 'Click the button to copy the code.',footer: 'Footer Text',buttons: [{type: 'copy',display_text: 'Copy Code',id: 'copy_1',copy_code: 'ABC123'}]});
Example 6: Text Message with Call Button
awaitclient.interactiveMessage(m.jid,{title: 'Call Us',text: 'Click the button to call us.',footer: 'Footer Text',buttons: [{type: 'call',display_text: 'Call',phone_number: '+1234567890'}]});
Example 7: Text Message with List of Items
awaitclient.interactiveMessage(m.jid,{title: 'Choose an Option',text: 'Select an item from the list below.',footer: 'Footer Text',buttons: [{type: 'list',maintitle: 'Options',header: 'Header 1',title: 'Option 1',description: 'Description 1',id: 'opt_1'},{type: 'list',maintitle: 'Options',header: 'Header 2',title: 'Option 2',description: 'Description 2',id: 'opt_2'}]});
Example 8: Text Message with Image Attachment
awaitclient.interactiveMessage(m.jid,{title: 'Check this out!',text: 'Here is an image for you.',footer: 'Footer Text',image: 'path/to/image.jpg',buttons: [{type: 'button',display_text: 'Like',id: 'btn_like'}]});
Example 9: Text Message with Video Attachment
awaitclient.interactiveMessage(m.jid,{title: 'Watch this Video',text: 'Here is a video for you.',footer: 'Footer Text',video: 'path/to/video.mp4',buttons: [{type: 'button',display_text: 'Watch Again',id: 'btn_watch_again'}]});
Example 10: Text Message with Multiple Button Types