G1sms/bb_scripts/g1sms.js

21 lines
482 B
JavaScript
Raw Normal View History

2019-12-30 08:33:45 +01:00
const bot = require('bbot');
const exec = require('child_process').exec;
const fs = require('fs');
const util = require('util')
bot.global.text({
2020-01-01 07:08:48 +01:00
contains: ['TEST BSMS']
2020-01-18 17:11:48 +01:00
}, async (b) => {
await b.respond("Test de G1SMS ...")
const username = b.message.user.id
2020-01-01 07:08:48 +01:00
membres = exec("g1sms/test.sh chat", function(err, stdout, stderr) {
2019-12-30 08:33:45 +01:00
if (err) {
b.respond("Une erreur est survenue ...")
2019-12-30 08:33:45 +01:00
} else {
b.respond(stdout)
}
});
}, {
2020-01-01 07:08:48 +01:00
id: 'sms-test'
2019-12-30 08:33:45 +01:00
});