Additional lines of code

This commit is contained in:
2024-02-21 23:06:18 +01:00
parent 9b72e641a5
commit d3dc994bc1
5 changed files with 1971 additions and 0 deletions
+14
View File
@@ -495,6 +495,20 @@ async def play(ctx, zamawial=None, arg=None):
await ctx.send(result)
async def archive_channel(channel_no):
channel = client.get_channel(channel_no)
messages = [message async for message in channel.history(limit=None)]
path_newfile = (
f"{LOGSTORE}channeldump_{channel_no}_{datetime.now()}.json"
)
new_data = []
for message in messages:
pass
with open(path_newfile, "x", encoding=ENCODING) as new_file:
new_file.seek(0)
json.dump(new_data, new_file, indent=4)
async def check():
"""Funkcja sprawdzająca czy grać następny kawałek."""
last_spontaneous_call = datetime.now()