This commit is contained in:
2024-03-29 22:13:45 +01:00
parent e824c8e961
commit 2d9927e221
+3 -5
View File
@@ -592,13 +592,11 @@ async def check_data():
messages = [message async for message in channel.history(limit=1)]
for mess in messages:
channel = mess.channel
async with channel.typing():
asyncio.wait(10)
if os.path.getsize(LOGFILE) > 6000000:
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....*"
)
with channel.typing():
async with channel.typing():
shutil.copyfile(LOGFILE, f"{LOGSTORE}discord{datetime.now()}")
logger.info("Log rollover")
handler.doRollover()
@@ -610,7 +608,7 @@ async def check_data():
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....*"
)
with channel.typing():
async with channel.typing():
path_newfile = f"{LOGSTORE}{MEMORY_FIVE_MUZYKA[:-4]}{datetime.now()}.json"
with open(MEMORY_FIVE_MUZYKA, "r+", encoding=ENCODING) as file_music_memory:
with open(path_newfile, "x", encoding=ENCODING) as new_file:
@@ -653,7 +651,7 @@ async def check_data():
logger.info(tdelta)
if tdelta > 12:
LAST_SPONTANEOUS_CALL = datetime.now()
with channel.typing():
async with channel.typing():
message = get_random_cyclic_message()
await channel.send(message)