codebydante commited on
Commit
b5ec936
路
verified 路
1 Parent(s): 57e451f

Upload folder using huggingface_hub

Browse files
scripts/login.bat DELETED
@@ -1,36 +0,0 @@
1
- @echo off
2
- title Generador de Sesion Telegram - UserBot
3
- color 0B
4
- echo ========================================================
5
- echo INICIANDO ASISTENTE DE SESION TELEGRAM (STRING SESSION)
6
- echo ========================================================
7
- echo.
8
-
9
- python --version >nul 2>&1
10
- if errorlevel 1 (
11
- echo [ERROR] Python no esta instalado o no esta en el PATH.
12
- echo Por favor instala Python desde https://www.python.org/
13
- pause
14
- exit /b
15
- )
16
-
17
- cd /d "%~dp0.."
18
-
19
- echo Verificando e instalando librerias necesarias...
20
- python -m pip install -r docker\requirements.txt
21
- if errorlevel 1 (
22
- echo [ERROR] No se pudieron instalar las dependencias.
23
- pause
24
- exit /b
25
- )
26
-
27
- echo.
28
- echo Ejecutando script de autenticacion...
29
- echo.
30
- python scripts\login.py
31
-
32
- echo.
33
- echo ========================================================
34
- echo Proceso finalizado.
35
- echo ========================================================
36
- pause
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
scripts/start.bat DELETED
@@ -1,31 +0,0 @@
1
- @echo off
2
- title Ejecutando UserBot Peliculas + Web Server
3
- color 0A
4
- echo ========================================================
5
- echo INICIANDO USERBOT DE TELEGRAM + WEB SERVER
6
- echo ========================================================
7
- echo.
8
-
9
- cd /d "%~dp0.."
10
-
11
- if not exist .env (
12
- echo [ADVERTENCIA] No se encontro el archivo .env.
13
- echo Ejecuta primero "scripts\login.bat" para autenticar tu cuenta de Telegram.
14
- echo.
15
- pause
16
- exit /b
17
- )
18
-
19
- python --version >nul 2>&1
20
- if errorlevel 1 (
21
- echo [ERROR] Python no esta disponible en el sistema.
22
- pause
23
- exit /b
24
- )
25
-
26
- echo Arrancando UserBot y Web Server fantasma...
27
- echo Presiona Ctrl+C para detener el bot.
28
- echo.
29
- python src\bot.py
30
-
31
- pause
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/assets/default_cover.jpg ADDED
src/plugins/flow.py CHANGED
@@ -296,14 +296,24 @@ def register_flow_handlers(client):
296
  # Caso C: Primera clonaci贸n (nunca antes se hab铆a enviado este canal)
297
  await status_msg.edit(f"馃殌 **Primera clonaci贸n de:** `{source_title}` ({total_items} contenidos)...")
298
 
299
- # Portada inicial
 
300
  avatar_path = await client.download_profile_photo(source_entity, file="channel_cover.jpg")
 
301
  if avatar_path and os.path.exists(avatar_path):
302
- await client.send_file(target_entity, file=avatar_path, caption=header_pattern)
303
- try:
304
- os.remove(avatar_path)
305
- except Exception:
306
- pass
 
 
 
 
 
 
 
 
307
  else:
308
  await client.send_message(target_entity, header_pattern)
309
 
 
296
  # Caso C: Primera clonaci贸n (nunca antes se hab铆a enviado este canal)
297
  await status_msg.edit(f"馃殌 **Primera clonaci贸n de:** `{source_title}` ({total_items} contenidos)...")
298
 
299
+ # Portada inicial: descargar foto del canal o usar portada por defecto
300
+ default_cover_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "assets", "default_cover.jpg")
301
  avatar_path = await client.download_profile_photo(source_entity, file="channel_cover.jpg")
302
+
303
  if avatar_path and os.path.exists(avatar_path):
304
+ cover_to_send = avatar_path
305
+ elif os.path.exists(default_cover_path):
306
+ cover_to_send = default_cover_path
307
+ else:
308
+ cover_to_send = None
309
+
310
+ if cover_to_send:
311
+ await client.send_file(target_entity, file=cover_to_send, caption=header_pattern)
312
+ if cover_to_send == avatar_path:
313
+ try:
314
+ os.remove(avatar_path)
315
+ except Exception:
316
+ pass
317
  else:
318
  await client.send_message(target_entity, header_pattern)
319