implements initial commands

This commit is contained in:
Francesco Esposito 2019-02-19 14:57:47 +01:00
parent 874eea1c02
commit 70db39503f
1 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
const Telebot = require('telebot');
const config = require('./config');
const utils = require('./utils');
const bot = new Telebot({
token: config.app.tokenBot,
@ -8,12 +9,12 @@ const bot = new Telebot({
bot.on('/start', (msg) => {
const name = 'user';
bot.sendMessage(msg.from.id, `hello ${name}`);
bot.sendMessage(msg.from.id, utils.templateStart(), { parseMode: 'Markdown' });
bot.event('/help', msg);
});
bot.on('/help', (msg) => {
bot.sendMessage(msg.from.id, 'help template');
bot.sendMessage(msg.from.id, utils.templateHelp(), { parseMode: 'Markdown' });
});
bot.on('/list', (msg) => {