import sys
import os

print("🚀 SISTĒMAS DETEKTĪVS AKTIVIZĒTS 🚀")
print(f"Python versija: {sys.version}\n")

log_path = os.path.join(os.path.dirname(__file__), 'bot.log')

try:
    with open(log_path, 'r', encoding='utf-8') as f:
        lines = f.readlines()
        print("--- PĒDĒJĀS 15 RINDIŅAS NO BOTA LOG FAILA ---")
        if not lines:
            print("Fails ir pilnīgi tukšs. Kļūda notiek vēl pirms bota palaišanas!")
        else:
            for line in lines[-15:]:
                print(line.strip())
except FileNotFoundError:
    print("❌ bot.log fails vispār nav atrasts šajā mapē!")
except Exception as e:
    print(f"❌ Nevarēju nolasīt failu: {e}")