Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Leviaria authored Jun 19, 2024
1 parent 76fa138 commit 6acadcc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
import sys
import threading
import time

from clashroyalebuildabot.bot.example.custom_bot import CustomBot
from clashroyalebuildabot.namespaces.cards import Cards
from clashroyalebuildabot.state.updater import check_for_update
from loguru import logger

start_time = datetime.now()


def update_terminal_title():
while True:
elapsed_time = datetime.now() - start_time
Expand All @@ -19,8 +19,8 @@ def update_terminal_title():
sys.stdout.flush()
time.sleep(1)


def main():
check_for_update()
cards = [
Cards.MINIONS,
Cards.ARCHERS,
Expand All @@ -34,8 +34,8 @@ def main():
bot = CustomBot(cards, debug=False)
bot.run()


if __name__ == "__main__":
logger.add("bot.log", rotation="500 MB") # Fügt die Logdatei hinzu
title_thread = threading.Thread(target=update_terminal_title, daemon=True)
title_thread.start()
main()

0 comments on commit 6acadcc

Please sign in to comment.