Types, disabling of templates and example update

This commit is contained in:
purpshell
2022-08-23 20:43:15 +03:00
parent c32348d3cc
commit dfb862614c
4 changed files with 58 additions and 33 deletions

View File

@@ -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') {