mirror of
https://github.com/franjsco/trackmyd-bot
synced 2025-02-17 20:10:43 +01:00
add server.js
This commit is contained in:
parent
424dff1268
commit
9fa9a49d26
16
server.js
Normal file
16
server.js
Normal 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();
|
Loading…
x
Reference in New Issue
Block a user