Commit 8dec9638 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent e2ec4a50
...@@ -11,7 +11,7 @@ const TelegramBot = require('node-telegram-bot-api'); ...@@ -11,7 +11,7 @@ const TelegramBot = require('node-telegram-bot-api');
const token = process.env.DEBUG === 'true' ? process.env.LOCAL_TOKEN : process.env.SERVER_TOKEN; const token = process.env.DEBUG === 'true' ? process.env.LOCAL_TOKEN : process.env.SERVER_TOKEN;
cron.schedule('*/15 * * * *', () => { cron.schedule('*/10 * * * *', () => {
runCron() runCron()
...@@ -20,7 +20,7 @@ cron.schedule('*/15 * * * *', () => { ...@@ -20,7 +20,7 @@ cron.schedule('*/15 * * * *', () => {
const bot = new TelegramBot(token, {polling: true}); const bot = new TelegramBot(token, {polling: true});
runCron()
bot.on('message', (msg) => { bot.on('message', (msg) => {
console.log(msg) console.log(msg)
processMessage(msg) processMessage(msg)
...@@ -365,7 +365,7 @@ async function generateText(current, num, msg) { ...@@ -365,7 +365,7 @@ async function generateText(current, num, msg) {
} }
runCron()
async function runCron() { async function runCron() {
let name = './back/' + 'backup-' + moment().format('YYYY-MM-DD---HH-mm') + '.sql' let name = './back/' + 'backup-' + moment().format('YYYY-MM-DD---HH-mm') + '.sql'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment