From 9fa9a49d26e8f6905f125d66ce4e2107052f1b1b Mon Sep 17 00:00:00 2001 From: Francesco Esposito <33671357+frab1t@users.noreply.github.com> Date: Tue, 19 Feb 2019 14:21:58 +0100 Subject: [PATCH] add server.js --- server.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 server.js diff --git a/server.js b/server.js new file mode 100644 index 0000000..c5e1ee4 --- /dev/null +++ b/server.js @@ -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();