mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +00:00
Types, disabling of templates and example update
This commit is contained in:
@@ -192,20 +192,15 @@ client.on('message', async msg => {
|
||||
let button = new Buttons(
|
||||
'Button body',
|
||||
[
|
||||
{ body: 'whatsapp-web.js', url: 'https://wwebjs.dev/' },
|
||||
{ body: 'Call me', number: '+1 (805) 457-4992' },
|
||||
{ body: 'third special button', number: '+1 (202) 968-6161' },// Limited to 2 especial buttons, this one will be ignored
|
||||
{ body: 'Some text' },
|
||||
{ body: 'Another text' },
|
||||
{ body: 'Another another text' },
|
||||
{ body: 'Fourth button' }// Limited to 3 regular buttons, this one will be ignored
|
||||
{ body: 'Try clicking me (id:test)', id: 'test'},
|
||||
],
|
||||
'title',
|
||||
'footer'
|
||||
);
|
||||
client.sendMessage(msg.from, button);
|
||||
} else if (msg.body === '!list') {
|
||||
let sections = [{title:'sectionTitle',rows:[{title:'ListItem1', description: 'desc'},{title:'ListItem2'}]}];
|
||||
let sections = [{title:'sectionTitle',rows:[{title:'ListItem1', description: 'desc'},{title: 'Try clicking me (id: test)', }]}];
|
||||
let list = new List('List body','btnText',sections,'Title','footer');
|
||||
client.sendMessage(msg.from, list);
|
||||
} else if (msg.body === '!reaction') {
|
||||
|
||||
Reference in New Issue
Block a user