Spaces:
Runtime error
Runtime error
Update server.ts
Browse files4 unmodified lines567891046 unmodified lines57585960616263646566674 unmodified linesimport * as dotenv from 'dotenv';import path from 'path';import { fileURLToPath } from 'url';dotenv.config();46 unmodified lineshasSupabaseKey: !!supabaseServiceKey,isServiceKey: !!process.env.SUPABASE_SERVICE_ROLE_KEY,appUrl: appUrl});if (!botToken) {console.error('TELEGRAM_BOT_TOKEN is missing!');}const bot = new Telegraf(botToken);let botUsername = '';4 unmodified lines56789101146 unmodified lines585960616263646566676869707172734 unmodified linesimport * as dotenv from 'dotenv';import path from 'path';import { fileURLToPath } from 'url';import { HttpsProxyAgent } from 'https-proxy-agent';dotenv.config();46 unmodified lineshasSupabaseKey: !!supabaseServiceKey,isServiceKey: !!process.env.SUPABASE_SERVICE_ROLE_KEY,appUrl: appUrlconst bot = new Telegraf(botToken);let botUsername = 'Bot';bot.telegram.getMe().then(me => {botUsername = me.username;console.log(`Bot username initialized: @${botUsername}`);}).catch(err => {console.log('Note: getMe failed (normal au démarrage sur HF), le bot attend les Webhooks.');});const bot = new Telegraf(botToken);let botUsername = '';
server.ts+10-4