add server.js

This commit is contained in:
Francesco Esposito 2019-02-19 14:21:58 +01:00
parent 424dff1268
commit 9fa9a49d26
1 changed files with 16 additions and 0 deletions

16
server.js Normal file
View File

@ -0,0 +1,16 @@
const Telebot = require('telebot');
const config = require('./config');
const bot = new Telebot({
token: config.app.tokenBot,
usePlugins: ['askUser'],
});
bot.on('/start', (msg) => {
const name = 'user';
bot.sendMessage(msg.from.id, `hello ${name}`);
});
bot.start();