This commit is contained in:
Andrey Kondratev
2025-08-29 10:10:09 +05:00
parent 047c4a0e60
commit 8895639f20

View File

@@ -8,6 +8,7 @@ ffmpeg.setFfmpegPath('/usr/bin/ffmpeg');
ffmpeg.setFfprobePath('/usr/bin/ffprobe'); ffmpeg.setFfprobePath('/usr/bin/ffprobe');
import { Database } from './database'; import { Database } from './database';
import { SoundCloudService } from './soundcloud'; import { SoundCloudService } from './soundcloud';
import { QuixoticBot } from './bot';
const app = express(); const app = express();
const port = process.env.PORT || 3000; const port = process.env.PORT || 3000;
@@ -233,4 +234,15 @@ app.listen(port, () => {
console.log(`Open in browser: http://localhost:${port}`); console.log(`Open in browser: http://localhost:${port}`);
}); });
// Initialize Telegram bot
const botToken = process.env.TELEGRAM_BOT_TOKEN;
const webAppUrl = process.env.WEB_APP_URL || `http://localhost:${port}`;
if (botToken) {
const bot = new QuixoticBot(botToken, webAppUrl);
console.log('🤖 Telegram bot started');
} else {
console.warn('⚠️ TELEGRAM_BOT_TOKEN not found - bot will not start');
}
export default app; export default app;