diff --git a/bot.py b/bot.py index 635587d..710e0b2 100644 --- a/bot.py +++ b/bot.py @@ -645,7 +645,7 @@ async def check_data(): messages = [message async for message in channel.history(limit=1)] for mess in messages: channel = mess.channel - if os.path.getsize(LOGFILE) > 6000000: + if os.path.getsize(LOGFILE) > 60000000: await channel.send( "*Conjurer porządkuje bar, wypala szklanki do czysta miotaczem płomieni ze swojej zbroi i ogólnie wygląda na zajętego....*" ) @@ -657,7 +657,7 @@ async def check_data(): "*Przeciąga się za barem* No dobra - porobione to można dalej pi... *Zauważa spojrzenie Hammera* ...sać powieści o naszym wspaniałym barze SZEFIE!" ) - if os.path.getsize(MEMORY_FIVE_MUZYKA) > 300000: + if os.path.getsize(MEMORY_FIVE_MUZYKA) > 3000000: await channel.send( "*Conjurer porządkuje bar, wypala szklanki do czysta miotaczem płomieni ze swojej zbroi i ogólnie wygląda na zajętego....*" ) @@ -671,7 +671,7 @@ async def check_data(): file_data = json.load(file_music_memory) new_data = [] new_data.append(file_data[0]) - new_data.extend(file_data[:-20]) + new_data.extend(file_data[-20]) file_music_memory.truncate(0) file_music_memory.seek(0) # convert back to json. @@ -681,7 +681,7 @@ async def check_data(): await channel.send( "*Przeciąga się za barem* No dobra - porobione to można dalej pi... *Zauważa spojrzenie Hammera* ...sać powieści o naszym wspaniałym barze SZEFIE!" ) - if os.path.getsize(MEMORY_FIVE_SIARA) > 300000: + if os.path.getsize(MEMORY_FIVE_SIARA) > 3000000: #TODO: Tu jest błąd. Ścieżka MEMORY_FIVE_MUZYKA jest absolutna a nie względna path_newfile = "{LOGSTORE}pamiec_rozmow{datetime.now()}.json" logger.info(path_newfile) @@ -694,7 +694,7 @@ async def check_data(): file_data = json.load(file) new_data = [] new_data.append(file_data[0]) - new_data.extend(file_data[:-20]) + new_data.extend(file_data[-20]) file.truncate(0) file.seek(0) new_file.seek(0)