mirror of
https://github.com/cheveguerra/Bot-Whatsapp-Buttons.git
synced 2026-04-18 03:29:13 +00:00
mods minimos
This commit is contained in:
4
bot.js
4
bot.js
@@ -25,9 +25,9 @@ client.on('ready', () => {
|
|||||||
|
|
||||||
client.on('message', msg => {
|
client.on('message', msg => {
|
||||||
console.log(msg);
|
console.log(msg);
|
||||||
if (msg.body == '!ping') {
|
if (msg.body == '/ping') {
|
||||||
msg.reply('pong');
|
msg.reply('pong');
|
||||||
}else if (msg.body === '!buttons') {
|
}else if (msg.body === '/botones') {
|
||||||
let button = new Buttons('Button body',[{body:'bt1'},{body:'bt2'},{body:'bt3'}],'title','footer');
|
let button = new Buttons('Button body',[{body:'bt1'},{body:'bt2'},{body:'bt3'}],'title','footer');
|
||||||
client.sendMessage(msg.from, button);
|
client.sendMessage(msg.from, button);
|
||||||
}else if (msg.body ==='bt1'){
|
}else if (msg.body ==='bt1'){
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"main": "bot.js",
|
"main": "bot.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"start": "node ./bot.js",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
|
|||||||
Reference in New Issue
Block a user