import TelegramBot from 'node-telegram-bot-api';
import { TG_BOT } from "../constants"

const TOKEN_BOT = '887655359:AAHnhzkIoBT4J0KPI-6Bm7UOF3r8SjM5Lb4';
const options = {
	polling: {
		interval: 300,
		autoStart: true,
		params: {
			timout: 10,
		},
	},
};

// инициализация бота
export const bot = TG_BOT 
	? new TelegramBot(TOKEN_BOT, options) 
	: null
TG_BOT 
	? console.log("Server @p2pAlerts_bot started!") 
	: console.log("TG_BOT is false!")