telebot
Version:
Easy way to write Telegram bots.
27 lines (20 loc) • 531 B
JavaScript
;
const TeleBot = require('../');
const bot = new TeleBot({
token: '-PASTEYOURTELEGRAMBOTAPITOKENHERE-',
modules: {
report: {
// What to report?
events: ['*', 'reconnect', 'reconnected', 'disconnect', 'error'],
// User list
to: ['USER_ID']
}
}
});
// Use report module
bot.use(require('../modules/report.js'));
// Error
bot.on('/error', x => ___REPORT_ERROR_TEST___);
// Disconnect
bot.on('/disconnect', x => bot.disconnect('bye!'));
bot.connect();