- Bot Telegram ...

This commit is contained in:
Paolo Arena
2020-01-03 22:02:18 +01:00
parent f359f8f723
commit 8f784df4fa
10 changed files with 208 additions and 36 deletions

View File

@@ -58,6 +58,8 @@ const admin_router = require('./router/admin_router');
const { MyEvent } = require('./models/myevent');
const telegrambot = require('./telegram/telegrambot');
require('./db/mongoose');
console.log("DB: " + process.env.DATABASE);
@@ -137,6 +139,7 @@ if (app.get('env') === 'development') {
// error: err
// });
});
}
require('./telegram/telegrambot');
@@ -263,4 +266,9 @@ cron.schedule('*/2 * * * *', () => {
// console.log(`Server started at port ${port}`);
//});
telegrambot.sendMsgTelegram('7', telegrambot.ADMIN_USER_SERVER, `Ciao ${telegrambot.ADMIN_USER_NAME_SERVER}!`);
telegrambot.sendMsgTelegramByIdTelegram('7', telegrambot.ADMIN_IDTELEGRAM_SERVER, `Il Server ${process.env.DATABASE} è appena ripartito!`);
// telegrambot.sendMsgTelegramToTheManagers('7', 'PROVAAA!');
module.exports = { app };