mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-05 02:55:25 +00:00

* sistemato il file telegram_bot.py come spiegato in chat, fatto un fix nel file session.py per l'aggiornamento del file script.json e sto caricando i file config.json e requerements.txt perchè vengono creati se non esistono quando si avvia il bot con python3 telegram_bot.py * sistemato il file telegram_bot.py come spiegato in chat, fatto un fix nel file session.py per l'aggiornamento del file script.json e sto caricando i file config.json e requerements.txt perchè vengono creati se non esistono quando si avvia il bot con python3 telegram_bot.py * fixato creazione dei file config.json e requerement.txt nella folder del bot
19 lines
549 B
Python
19 lines
549 B
Python
# 26.11.24
|
|
|
|
import sys
|
|
from StreamingCommunity.run import main
|
|
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
from StreamingCommunity.TelegramHelp.telegram_bot import TelegramRequestManager, TelegramSession
|
|
|
|
# Svuoto il file
|
|
TELEGRAM_BOT = config_manager.get_bool('DEFAULT', 'telegram_bot')
|
|
|
|
if TELEGRAM_BOT:
|
|
request_manager = TelegramRequestManager()
|
|
request_manager.clear_file()
|
|
script_id = sys.argv[1] if len(sys.argv) > 1 else "unknown"
|
|
|
|
TelegramSession.set_session(script_id)
|
|
main(script_id)
|
|
else:
|
|
main() |