mirror of
https://github.com/Divam-dev/aynt.git
synced 2025-02-20 11:23:20 +08:00
Fix hosting problems
This commit is contained in:
parent
8c93ef6eba
commit
c0be334efd
@ -2,12 +2,6 @@ const { Telegraf } = require('telegraf');
|
|||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
const cron = require('node-cron');
|
const cron = require('node-cron');
|
||||||
|
|
||||||
// Pinging my site
|
|
||||||
cron.schedule('*/10 * * * *', () => {
|
|
||||||
console.log('Pinging server');
|
|
||||||
fetch('https://aynt.onrender.com/');
|
|
||||||
});
|
|
||||||
|
|
||||||
let bot;
|
let bot;
|
||||||
if (process.env.LOCAL_SERVER) {
|
if (process.env.LOCAL_SERVER) {
|
||||||
bot = new Telegraf(process.env.BOT_TOKEN, { telegram: { apiRoot: process.env.LOCAL_SERVER } });
|
bot = new Telegraf(process.env.BOT_TOKEN, { telegram: { apiRoot: process.env.LOCAL_SERVER } });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user