Update _internal.py

pull/136/head
Who? 2025-05-11 05:28:01 +07:00 committed by GitHub
parent f3162673e8
commit aa1a8ff8d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 0 deletions

View File

@ -47,6 +47,18 @@ def restart():
if "--sandbox" in " ".join(sys.argv):
exit(0)
if "HIKKA_DO_NOT_RESTART2" in os.environ:
print(
"Got in a loop, exiting\nYou probably need to manually remove existing"
" packages and then restart Heroku. Run `pip uninstall -y telethon"
" telethon-mod hikka-tl-new`, then restart Heroku."
)
sys.exit(0)
logging.getLogger().setLevel(logging.CRITICAL)
print("🔄 Restarting...")
if "LAVHOST" in os.environ:
os.system("lavhost restart")